Skip to content

Commit 2fe0aaa

Browse files
committed
Add CMake CI
1 parent 6aa7b2d commit 2fe0aaa

File tree

17 files changed

+1167
-0
lines changed

17 files changed

+1167
-0
lines changed

.dockerignore

+21
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

+45
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

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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: Install Osi
38+
run: >
39+
cd /tmp
40+
&& git clone -b stable/0.108 --depth=1 https://github.com/Mizux/Osi.git
41+
&& cd Osi
42+
&& cmake -S. -Bbuild
43+
&& cmake --build build --config Release
44+
&& sudo cmake --build build --config Release --target install
45+
&& cd ..
46+
&& rm -rf Osi
47+
- name: Install Clp
48+
run: >
49+
cd /tmp
50+
&& git clone -b stable/1.17 --depth=1 https://github.com/Mizux/Clp.git
51+
&& cd Clp
52+
&& cmake -S. -Bbuild
53+
&& cmake --build build --config Release
54+
&& sudo cmake --build build --config Release --target install
55+
&& cd ..
56+
&& rm -rf Clp
57+
- name: Configure
58+
run: >
59+
cmake -S. -Bbuild
60+
-G "${{ matrix.cmake.generator }}"
61+
-DCMAKE_BUILD_TYPE="$BUILD_TYPE"
62+
-DCMAKE_INSTALL_PREFIX=build/install
63+
- name: Build
64+
run: >
65+
cmake --build build
66+
--config ${{ matrix.cmake.config }}
67+
--target all
68+
-v -j2
69+
- name: Test
70+
run: >
71+
CTEST_OUTPUT_ON_FAILURE=1
72+
cmake --build build
73+
--config ${{ matrix.cmake.config }}
74+
--target test
75+
-v
76+
- name: Install
77+
run: >
78+
cmake --build build
79+
--config ${{ matrix.cmake.config }}
80+
--target install
81+
-v

.github/workflows/amd64_macos.yml

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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: Install Osi
33+
run: >
34+
cd /tmp
35+
&& git clone -b stable/0.108 --depth=1 https://github.com/Mizux/Osi.git
36+
&& cd Osi
37+
&& cmake -S. -Bbuild
38+
&& cmake --build build --config Release
39+
&& sudo cmake --build build --config Release --target install
40+
&& cd ..
41+
&& rm -rf Osi
42+
- name: Install Clp
43+
run: >
44+
cd /tmp
45+
&& git clone -b stable/1.17 --depth=1 https://github.com/Mizux/Clp.git
46+
&& cd Clp
47+
&& cmake -S. -Bbuild
48+
&& cmake --build build --config Release
49+
&& sudo cmake --build build --config Release --target install
50+
&& cd ..
51+
&& rm -rf Clp
52+
- name: Configure
53+
run: >
54+
cmake -S. -Bbuild
55+
-G "${{ matrix.cmake.generator }}"
56+
-DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }}
57+
-DCMAKE_INSTALL_PREFIX=build/install
58+
- name: Build
59+
run: >
60+
cmake --build build
61+
--config ${{ matrix.cmake.config }}
62+
--target ${{ matrix.cmake.build_target }}
63+
-v -j2
64+
- name: Test
65+
run: >
66+
CTEST_OUTPUT_ON_FAILURE=1
67+
cmake --build build
68+
--config ${{ matrix.cmake.config }}
69+
--target ${{ matrix.cmake.test_target }}
70+
-v
71+
- name: Install
72+
run: >
73+
cmake --build build
74+
--config ${{ matrix.cmake.config }}
75+
--target ${{ matrix.cmake.install_target }}
76+
-v

.github/workflows/amd64_windows.yml

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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: Install Osi
36+
run: >
37+
git clone -b stable/0.108 --depth=1 https://github.com/Mizux/Osi.git
38+
&& cd Osi
39+
&& cmake -S. -Bbuild
40+
&& cmake --build build --config ${{ matrix.cmake.config }}
41+
&& cmake --build build --config ${{ matrix.cmake.config }} --target install
42+
&& cd ..
43+
&& Remove-Item Osi -Recurse -Include *.*
44+
- name: Install Clp
45+
run: >
46+
git clone -b stable/1.17 --depth=1 https://github.com/Mizux/Clp.git
47+
&& cd Clp
48+
&& cmake -S. -Bbuild
49+
&& cmake --build build --config ${{ matrix.cmake.config }}
50+
&& cmake --build build --config ${{ matrix.cmake.config }} --target install
51+
&& cd ..
52+
&& Remove-Item Clp -Recurse -Include *.*
53+
- name: Configure
54+
run: >
55+
cmake -S. -Bbuild
56+
-G "${{ matrix.cmake.generator }}"
57+
-DCMAKE_CONFIGURATION_TYPES=${{ matrix.cmake.config }}
58+
-DBUILD_DEPS=ON
59+
-DCMAKE_INSTALL_PREFIX=build/install
60+
- name: Build
61+
run: >
62+
cmake --build build
63+
--config ${{ matrix.cmake.config }}
64+
--target ${{ matrix.cmake.build_target }}
65+
-v -j2
66+
- name: Test
67+
run: >
68+
cmake --build build
69+
--config ${{ matrix.cmake.config }}
70+
--target ${{ matrix.cmake.test_target }}
71+
-v
72+
- name: Install
73+
run: >
74+
cmake --build build
75+
--config ${{ matrix.cmake.config }}
76+
--target ${{ matrix.cmake.install_target }}
77+
-v

.github/workflows/arm64_macos.yml

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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: Install Osi
33+
run: >
34+
cd /tmp
35+
&& git clone -b stable/0.108 --depth=1 https://github.com/Mizux/Osi.git
36+
&& cd Osi
37+
&& cmake -S. -Bbuild
38+
&& cmake --build build --config Release
39+
&& sudo cmake --build build --config Release --target install
40+
&& cd ..
41+
&& rm -rf Osi
42+
- name: Install Clp
43+
run: >
44+
cd /tmp
45+
&& git clone -b stable/1.17 --depth=1 https://github.com/Mizux/Clp.git
46+
&& cd Clp
47+
&& cmake -S. -Bbuild
48+
&& cmake --build build --config Release
49+
&& sudo cmake --build build --config Release --target install
50+
&& cd ..
51+
&& rm -rf Clp
52+
- name: Configure
53+
run: >
54+
cmake -S. -Bbuild
55+
-G "${{ matrix.cmake.generator }}"
56+
-DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }}
57+
-DCMAKE_INSTALL_PREFIX=build/install
58+
- name: Build
59+
run: >
60+
cmake --build build
61+
--config ${{ matrix.cmake.config }}
62+
--target ${{ matrix.cmake.build_target }}
63+
-v -j2
64+
- name: Test
65+
run: >
66+
CTEST_OUTPUT_ON_FAILURE=1
67+
cmake --build build
68+
--config ${{ matrix.cmake.config }}
69+
--target ${{ matrix.cmake.test_target }}
70+
-v
71+
- name: Install
72+
run: >
73+
cmake --build build
74+
--config ${{ matrix.cmake.config }}
75+
--target ${{ matrix.cmake.install_target }}
76+
-v

0 commit comments

Comments
 (0)