Skip to content

Commit f59c5b5

Browse files
committed
Add CMake CI
1 parent a3d0a30 commit f59c5b5

File tree

17 files changed

+959
-0
lines changed

17 files changed

+959
-0
lines changed

.dockerignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Project Files unneeded by docker
2+
ci/cache
3+
ci/docker
4+
.git
5+
.gitignore
6+
.github
7+
.dockerignore
8+
.travis.yml
9+
.clang-format
10+
AUTHORS
11+
INSTALL
12+
install-sh
13+
missing
14+
README
15+
README.md
16+
17+
build/
18+
19+
# Editor directories and files
20+
*.user
21+
*.swp

.github/workflows/amd64_docker.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# ref: https://github.com/docker-library/official-images
2+
name: amd64 Docker
3+
4+
on: [push, pull_request, workflow_dispatch]
5+
6+
jobs:
7+
docker:
8+
strategy:
9+
matrix:
10+
distro: [
11+
almalinux,
12+
alpine,
13+
archlinux,
14+
debian,
15+
fedora,
16+
opensuse,
17+
rockylinux,
18+
ubuntu
19+
]
20+
fail-fast: false
21+
name: amd64 • ${{ matrix.distro }}
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Check docker
26+
run: |
27+
docker info
28+
docker buildx ls
29+
- name: Build env image
30+
run: make --directory=ci amd64_${{ matrix.distro }}_env
31+
- name: Build devel project
32+
run: make --directory=ci amd64_${{ matrix.distro }}_devel
33+
- name: Build project
34+
run: make --directory=ci amd64_${{ matrix.distro }}_build
35+
- name: Test project
36+
run: make --directory=ci amd64_${{ matrix.distro }}_test
37+
38+
- name: Build install env image
39+
run: make --directory=ci amd64_${{ matrix.distro }}_install_env
40+
- name: Build install devel project
41+
run: make --directory=ci amd64_${{ matrix.distro }}_install_devel
42+
- name: Build install project
43+
run: make --directory=ci amd64_${{ matrix.distro }}_install_build
44+
- name: Test install project
45+
run: make --directory=ci amd64_${{ matrix.distro }}_install_test

.github/workflows/amd64_linux.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# ref: https://github.com/actions/runner-images
2+
name: amd64 Linux
3+
4+
on: [push, pull_request, workflow_dispatch]
5+
6+
# Building using the github runner environement directly.
7+
jobs:
8+
native:
9+
strategy:
10+
matrix:
11+
cmake: [
12+
{generator: "Unix Makefiles", config: "Release"},
13+
{generator: "Ninja", config: "Release"},
14+
{generator: "Ninja Multi-Config", config: "Release"},
15+
]
16+
fail-fast: false
17+
name: Linux • ${{ matrix.cmake.generator }}
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Install Ninja
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install ninja-build
25+
- name: Check cmake
26+
run: cmake --version
27+
- name: Install CoinUtils
28+
run: >
29+
cd /tmp
30+
&& git clone -b stable/2.11 --depth=1 https://github.com/Mizux/CoinUtils.git
31+
&& cd CoinUtils
32+
&& cmake -S. -Bbuild
33+
&& cmake --build build --config Release
34+
&& sudo cmake --build build --config Release --target install
35+
&& cd ..
36+
&& rm -rf CoinUtils
37+
- name: Configure
38+
run: >
39+
cmake -S. -Bbuild
40+
-G "${{ matrix.cmake.generator }}"
41+
-DCMAKE_BUILD_TYPE="$BUILD_TYPE"
42+
-DCMAKE_INSTALL_PREFIX=build/install
43+
- name: Build
44+
run: >
45+
cmake --build build
46+
--config ${{ matrix.cmake.config }}
47+
--target all
48+
-v -j2
49+
- name: Test
50+
run: >
51+
CTEST_OUTPUT_ON_FAILURE=1
52+
cmake --build build
53+
--config ${{ matrix.cmake.config }}
54+
--target test
55+
-v
56+
- name: Install
57+
run: >
58+
cmake --build build
59+
--config ${{ matrix.cmake.config }}
60+
--target install
61+
-v

.github/workflows/amd64_macos.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# ref: https://github.com/actions/runner-images
2+
name: amd64 MacOS
3+
4+
on: [push, pull_request, workflow_dispatch]
5+
6+
# Building using the github runner environement directly.
7+
jobs:
8+
native:
9+
strategy:
10+
matrix:
11+
cmake: [
12+
{generator: "Xcode", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: install},
13+
{generator: "Unix Makefiles", config: Release, build_target: all, test_target: test, install_target: install},
14+
]
15+
fail-fast: false
16+
name: MacOS • ${{ matrix.cmake.generator }}
17+
runs-on: macos-13 # last macos intel based runner
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Check cmake
21+
run: cmake --version
22+
- name: Install CoinUtils
23+
run: >
24+
cd /tmp
25+
&& git clone -b stable/2.11 --depth=1 https://github.com/Mizux/CoinUtils.git
26+
&& cd CoinUtils
27+
&& cmake -S. -Bbuild
28+
&& cmake --build build --config Release
29+
&& sudo cmake --build build --config Release --target install
30+
&& cd ..
31+
&& rm -rf CoinUtils
32+
- name: Configure
33+
run: >
34+
cmake -S. -Bbuild
35+
-G "${{ matrix.cmake.generator }}"
36+
-DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }}
37+
-DCMAKE_INSTALL_PREFIX=build/install
38+
- name: Build
39+
run: >
40+
cmake --build build
41+
--config ${{ matrix.cmake.config }}
42+
--target ${{ matrix.cmake.build_target }}
43+
-v -j2
44+
- name: Test
45+
run: >
46+
CTEST_OUTPUT_ON_FAILURE=1
47+
cmake --build build
48+
--config ${{ matrix.cmake.config }}
49+
--target ${{ matrix.cmake.test_target }}
50+
-v
51+
- name: Install
52+
run: >
53+
cmake --build build
54+
--config ${{ matrix.cmake.config }}
55+
--target ${{ matrix.cmake.install_target }}
56+
-v

.github/workflows/amd64_windows.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# ref: https://github.com/actions/runner-images
2+
name: amd64 Windows
3+
4+
on: [push, pull_request, workflow_dispatch]
5+
6+
# Building using the github runner environement directly.
7+
jobs:
8+
native:
9+
strategy:
10+
matrix:
11+
cmake: [
12+
{generator: "Visual Studio 17 2022", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: INSTALL},
13+
{generator: "Visual Studio 17 2022", config: Debug, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: INSTALL},
14+
]
15+
fail-fast: false
16+
name: Windows • ${{ matrix.cmake.generator }} (${{ matrix.cmake.config }})
17+
runs-on: windows-latest
18+
env:
19+
CTEST_OUTPUT_ON_FAILURE: 1
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Check cmake
23+
run: |
24+
cmake --version
25+
cmake -G || true
26+
- name: Install CoinUtils
27+
run: >
28+
git clone -b stable/2.11 --depth=1 https://github.com/Mizux/CoinUtils.git
29+
&& cd CoinUtils
30+
&& cmake -S. -Bbuild
31+
&& cmake --build build --config ${{ matrix.cmake.config }}
32+
&& cmake --build build --config ${{ matrix.cmake.config }} --target install
33+
&& cd ..
34+
&& Remove-Item CoinUtils -Recurse -Include *.*
35+
- name: Configure
36+
run: >
37+
cmake -S. -Bbuild
38+
-G "${{ matrix.cmake.generator }}"
39+
-DCMAKE_CONFIGURATION_TYPES=${{ matrix.cmake.config }}
40+
-DBUILD_DEPS=ON
41+
-DCMAKE_INSTALL_PREFIX=build/install
42+
- name: Build
43+
run: >
44+
cmake --build build
45+
--config ${{ matrix.cmake.config }}
46+
--target ${{ matrix.cmake.build_target }}
47+
-v -j2
48+
- name: Test
49+
run: >
50+
cmake --build build
51+
--config ${{ matrix.cmake.config }}
52+
--target ${{ matrix.cmake.test_target }}
53+
-v
54+
- name: Install
55+
run: >
56+
cmake --build build
57+
--config ${{ matrix.cmake.config }}
58+
--target ${{ matrix.cmake.install_target }}
59+
-v

.github/workflows/arm64_macos.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# ref: https://github.com/actions/runner-images
2+
name: arm64 MacOS
3+
4+
on: [push, pull_request, workflow_dispatch]
5+
6+
# Building using the github runner environement directly.
7+
jobs:
8+
native:
9+
strategy:
10+
matrix:
11+
cmake: [
12+
{generator: "Xcode", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: install},
13+
{generator: "Unix Makefiles", config: Release, build_target: all, test_target: test, install_target: install},
14+
]
15+
fail-fast: false
16+
name: MacOS • ${{ matrix.cmake.generator }}
17+
runs-on: macos-latest # macos M1 based runner
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Check cmake
21+
run: cmake --version
22+
- name: Install CoinUtils
23+
run: >
24+
cd /tmp
25+
&& git clone -b stable/2.11 --depth=1 https://github.com/Mizux/CoinUtils.git
26+
&& cd CoinUtils
27+
&& cmake -S. -Bbuild
28+
&& cmake --build build --config Release
29+
&& sudo cmake --build build --config Release --target install
30+
&& cd ..
31+
&& rm -rf CoinUtils
32+
- name: Configure
33+
run: >
34+
cmake -S. -Bbuild
35+
-G "${{ matrix.cmake.generator }}"
36+
-DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }}
37+
-DCMAKE_INSTALL_PREFIX=build/install
38+
- name: Build
39+
run: >
40+
cmake --build build
41+
--config ${{ matrix.cmake.config }}
42+
--target ${{ matrix.cmake.build_target }}
43+
-v -j2
44+
- name: Test
45+
run: >
46+
CTEST_OUTPUT_ON_FAILURE=1
47+
cmake --build build
48+
--config ${{ matrix.cmake.config }}
49+
--target ${{ matrix.cmake.test_target }}
50+
-v
51+
- name: Install
52+
run: >
53+
cmake --build build
54+
--config ${{ matrix.cmake.config }}
55+
--target ${{ matrix.cmake.install_target }}
56+
-v

0 commit comments

Comments
 (0)