Skip to content

Commit 7693f5e

Browse files
committed
Add CMake CI
* Add qamd64 docker jobs * Add amd64 native jobs
1 parent 7788d6b commit 7693f5e

File tree

17 files changed

+1064
-0
lines changed

17 files changed

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

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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: Configure
48+
run: >
49+
cmake -S. -Bbuild
50+
-G "${{ matrix.cmake.generator }}"
51+
-DCMAKE_BUILD_TYPE="$BUILD_TYPE"
52+
-DCMAKE_INSTALL_PREFIX=build/install
53+
- name: Build
54+
run: >
55+
cmake --build build
56+
--config ${{ matrix.cmake.config }}
57+
--target all
58+
-v -j2
59+
- name: Test
60+
run: >
61+
CTEST_OUTPUT_ON_FAILURE=1
62+
cmake --build build
63+
--config ${{ matrix.cmake.config }}
64+
--target test
65+
-v
66+
- name: Install
67+
run: >
68+
cmake --build build
69+
--config ${{ matrix.cmake.config }}
70+
--target install
71+
-v

.github/workflows/amd64_macos.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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: Configure
43+
run: >
44+
cmake -S. -Bbuild
45+
-G "${{ matrix.cmake.generator }}"
46+
-DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }}
47+
-DCMAKE_INSTALL_PREFIX=build/install
48+
- name: Build
49+
run: >
50+
cmake --build build
51+
--config ${{ matrix.cmake.config }}
52+
--target ${{ matrix.cmake.build_target }}
53+
-v -j2
54+
- name: Test
55+
run: >
56+
CTEST_OUTPUT_ON_FAILURE=1
57+
cmake --build build
58+
--config ${{ matrix.cmake.config }}
59+
--target ${{ matrix.cmake.test_target }}
60+
-v
61+
- name: Install
62+
run: >
63+
cmake --build build
64+
--config ${{ matrix.cmake.config }}
65+
--target ${{ matrix.cmake.install_target }}
66+
-v

.github/workflows/amd64_windows.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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: Configure
45+
run: >
46+
cmake -S. -Bbuild
47+
-G "${{ matrix.cmake.generator }}"
48+
-DCMAKE_CONFIGURATION_TYPES=${{ matrix.cmake.config }}
49+
-DBUILD_DEPS=ON
50+
-DCMAKE_INSTALL_PREFIX=build/install
51+
- name: Build
52+
run: >
53+
cmake --build build
54+
--config ${{ matrix.cmake.config }}
55+
--target ${{ matrix.cmake.build_target }}
56+
-v -j2
57+
- name: Test
58+
run: >
59+
cmake --build build
60+
--config ${{ matrix.cmake.config }}
61+
--target ${{ matrix.cmake.test_target }}
62+
-v
63+
- name: Install
64+
run: >
65+
cmake --build build
66+
--config ${{ matrix.cmake.config }}
67+
--target ${{ matrix.cmake.install_target }}
68+
-v

.github/workflows/arm64_macos.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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: Configure
43+
run: >
44+
cmake -S. -Bbuild
45+
-G "${{ matrix.cmake.generator }}"
46+
-DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }}
47+
-DCMAKE_INSTALL_PREFIX=build/install
48+
- name: Build
49+
run: >
50+
cmake --build build
51+
--config ${{ matrix.cmake.config }}
52+
--target ${{ matrix.cmake.build_target }}
53+
-v -j2
54+
- name: Test
55+
run: >
56+
CTEST_OUTPUT_ON_FAILURE=1
57+
cmake --build build
58+
--config ${{ matrix.cmake.config }}
59+
--target ${{ matrix.cmake.test_target }}
60+
-v
61+
- name: Install
62+
run: >
63+
cmake --build build
64+
--config ${{ matrix.cmake.config }}
65+
--target ${{ matrix.cmake.install_target }}
66+
-v

0 commit comments

Comments
 (0)