Skip to content

Commit 0ce6f88

Browse files
committed
ci: rework
* Add almalinux and rockylinux * Rework github workflows
1 parent edf79c2 commit 0ce6f88

File tree

13 files changed

+393
-194
lines changed

13 files changed

+393
-194
lines changed

.github/workflows/amd64_docker.yml

+27-24
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ name: amd64 Docker
33

44
on: [push, pull_request, workflow_dispatch]
55

6+
concurrency:
7+
group: ${{github.workflow}}-${{github.ref}}
8+
cancel-in-progress: true
9+
610
jobs:
711
Distros:
8-
runs-on: ubuntu-latest
912
strategy:
1013
matrix:
1114
distro: [
@@ -19,28 +22,28 @@ jobs:
1922
ubuntu
2023
]
2124
fail-fast: false
22-
env:
23-
DISTRO: amd64_${{ matrix.distro }}
25+
name: amd64•${{matrix.distro}}
26+
runs-on: ubuntu-latest
2427
steps:
25-
- uses: actions/checkout@v4
26-
- name: Check docker
27-
run: |
28-
docker info
29-
docker buildx ls
30-
- name: Build env image
31-
run: make --directory=ci ${DISTRO}_env
32-
- name: Build devel project
33-
run: make --directory=ci ${DISTRO}_devel
34-
- name: Build project
35-
run: make --directory=ci ${DISTRO}_build
36-
- name: Test project
37-
run: make --directory=ci ${DISTRO}_test
28+
- uses: actions/checkout@v4
29+
- name: Check docker
30+
run: |
31+
docker info
32+
docker buildx ls
33+
- name: Build env image
34+
run: make --directory=ci amd64_${{matrix.distro}}_env
35+
- name: Build devel image
36+
run: make --directory=ci amd64_${{matrix.distro}}_devel
37+
- name: Build project
38+
run: make --directory=ci amd64_${{matrix.distro}}_build
39+
- name: Test project
40+
run: make --directory=ci amd64_${{matrix.distro}}_test
3841

39-
- name: Build install env image
40-
run: make --directory=ci ${DISTRO}_install_env
41-
- name: Build install devel project
42-
run: make --directory=ci ${DISTRO}_install_devel
43-
- name: Build install project
44-
run: make --directory=ci ${DISTRO}_install_build
45-
- name: Test install project
46-
run: make --directory=ci ${DISTRO}_install_test
42+
- name: Build install env image
43+
run: make --directory=ci amd64_${{matrix.distro}}_install_env
44+
- name: Build install devel image
45+
run: make --directory=ci amd64_${{matrix.distro}}_install_devel
46+
- name: Build install project
47+
run: make --directory=ci amd64_${{matrix.distro}}_install_build
48+
- name: Test install project
49+
run: make --directory=ci amd64_${{matrix.distro}}_install_test

.github/workflows/amd64_linux.yml

+60-45
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,70 @@
1+
# ref: https://github.com/actions/runner-images
12
name: amd64 Linux
23

34
on: [push, pull_request, workflow_dispatch]
45

6+
concurrency:
7+
group: ${{github.workflow}}-${{github.ref}}
8+
cancel-in-progress: true
9+
10+
# Building using the github runner environement directly.
511
jobs:
6-
# Building using the github runner environement directly.
7-
linux:
8-
runs-on: ubuntu-latest
12+
native:
913
strategy:
1014
matrix:
11-
build: [
12-
["Unix Makefiles", "Release"],
13-
["Ninja", "Release"],
14-
["Ninja Multi-Config", "Release"]
15+
cmake: [
16+
{generator: "Unix Makefiles", config: "Release"},
17+
{generator: "Ninja", config: "Release"},
18+
{generator: "Ninja Multi-Config", config: "Release"}
1519
]
1620
fail-fast: false
17-
env:
18-
GENERATOR: ${{ matrix.build[0] }}
19-
BUILD_TYPE: ${{ matrix.build[1] }}
21+
name: amd64•Linux•CMake(${{matrix.cmake.generator}},${{matrix.cmake.config}})
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Install Ninja
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install ninja-build
29+
- name: Swig install
30+
run: |
31+
sudo apt install -y swig
32+
swig -version
33+
- name: Check java
34+
run: |
35+
java -version
36+
mvn --version
37+
- name: Check CMake
38+
run: cmake --version
39+
- name: Configure
40+
run: >
41+
cmake -S. -Bbuild
42+
-G "${{matrix.cmake.generator}}"
43+
-DCMAKE_BUILD_TYPE="${{matrix.cmake.config}}"
44+
-DSKIP_GPG=ON
45+
-DCMAKE_INSTALL_PREFIX=install
46+
- name: Build
47+
run: >
48+
cmake --build build
49+
--config ${{matrix.cmake.config}}
50+
--target all
51+
-v -j2
52+
- name: Test
53+
run: >
54+
CTEST_OUTPUT_ON_FAILURE=1
55+
cmake --build build
56+
--config ${{matrix.cmake.config}}
57+
--target test
58+
-v
59+
- name: Install
60+
run: >
61+
cmake --build build
62+
--config ${{matrix.cmake.config}}
63+
--target install
64+
-v
65+
66+
amd64_linux:
67+
runs-on: ubuntu-latest
68+
needs: native
2069
steps:
21-
- uses: actions/checkout@v4
22-
- name: Install Ninja
23-
run: |
24-
sudo apt-get update
25-
sudo apt-get install ninja-build
26-
- name: Uninstall preinstalled swig3.0
27-
run: |
28-
swig -version;
29-
sudo apt remove -y swig swig3.0
30-
- name: Install SWIG 4.0.2
31-
run: |
32-
wget "https://github.com/swig/swig/archive/refs/tags/v4.0.2.tar.gz" -O swig-4.0.2.tar.gz;
33-
tar xvf swig-4.0.2.tar.gz;
34-
rm swig-4.0.2.tar.gz;
35-
cd swig-4.0.2;
36-
./autogen.sh;
37-
./configure --prefix=/usr;
38-
make -j8;
39-
sudo make install;
40-
cd ..;
41-
rm -rf swig-4.0.2;
42-
- name: Check swig
43-
run: swig -version
44-
- name: Check mvn
45-
run: mvn --version
46-
- name: Check cmake
47-
run: cmake --version
48-
- name: Configure
49-
run: cmake -S. -Bbuild -G "$GENERATOR" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DCMAKE_INSTALL_PREFIX=install -DSKIP_GPG=ON
50-
- name: Build
51-
run: cmake --build build --config "$BUILD_TYPE" --target all -v
52-
- name: Test
53-
run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config "$BUILD_TYPE" --target test -v
54-
- name: Install
55-
run: cmake --build build --config "$BUILD_TYPE" --target install -v
70+
- uses: actions/checkout@v4

.github/workflows/amd64_macos.yml

+54-29
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,64 @@
1+
# ref: https://github.com/actions/runner-images
12
name: amd64 macOS
23

3-
on: [push, pull_request, workflow_dispatch]
4+
on: [push, pull_request,workflow_dispatch]
45

6+
concurrency:
7+
group: ${{github.workflow}}-${{github.ref}}
8+
cancel-in-progress: true
9+
10+
# Building using the github runner environement directly.
511
jobs:
6-
# Building using the github runner environement directly.
7-
macos:
8-
runs-on: macos-latest
12+
native:
913
strategy:
1014
matrix:
1115
build: [
12-
["Xcode", "Release", "ALL_BUILD", "RUN_TESTS", "install"],
13-
["Unix Makefiles", "Release", "all", "test", "install"]
16+
{generator: "Xcode", config: "Release", build: "ALL_BUILD", test: "RUN_TESTS", install: "install"},
17+
{generator: "Unix Makefiles", config: "Release", build: "all", test: "test", install: "install"}
1418
]
1519
fail-fast: false
16-
env:
17-
GENERATOR: ${{ matrix.build[0] }}
18-
BUILD_TYPE: ${{ matrix.build[1] }}
19-
BUILD_TARGET: ${{ matrix.build[2] }}
20-
TEST_TARGET: ${{ matrix.build[3] }}
21-
INSTALL_TARGET: ${{ matrix.build[4] }}
20+
runs-on: macos-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Swig install
24+
run: |
25+
brew install swig
26+
swig -version
27+
- name: Check java
28+
run: |
29+
java -version
30+
mvn --version
31+
- name: Check CMake
32+
run: cmake --version
33+
- name: Configure
34+
run: >
35+
cmake -S. -Bbuild
36+
-G "${{matrix.cmake.generator}}"
37+
-DCMAKE_BUILD_TYPE="${{matrix.cmake.config}}"
38+
-DSKIP_GPG=ON
39+
-DCMAKE_INSTALL_PREFIX=install
40+
- name: Build
41+
run: >
42+
cmake --build build
43+
--config ${{matrix.cmake.config}}
44+
--target ${{matrix.cmake.build}}
45+
-v -j2
46+
- name: Test
47+
run: >
48+
CTEST_OUTPUT_ON_FAILURE=1
49+
cmake --build build
50+
--config ${{matrix.cmake.config}}
51+
--target ${{matrix.cmake.test}}
52+
-v
53+
- name: Install
54+
run: >
55+
cmake --build build
56+
--config ${{matrix.cmake.config}}
57+
--target ${{matrix.cmake.install}}
58+
-v
59+
60+
amd64_macos:
61+
runs-on: ubuntu-latest
62+
needs: native
2263
steps:
23-
- uses: actions/checkout@v4
24-
- name: Swig install
25-
run: brew install swig
26-
- name: Check swig
27-
run: swig -version
28-
- name: Check mvn
29-
run: mvn --version
30-
- name: Check cmake
31-
run: cmake --version
32-
- name: Configure
33-
run: cmake -S. -Bbuild -G "$GENERATOR" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DCMAKE_INSTALL_PREFIX=install -DSKIP_GPG=ON
34-
- name: Build
35-
run: cmake --build build --config "$BUILD_TYPE" --target "$BUILD_TARGET" -v
36-
- name: Test
37-
run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config "$BUILD_TYPE" --target "$TEST_TARGET" -v
38-
- name: Install
39-
run: cmake --build build --config "$BUILD_TYPE" --target "$INSTALL_TARGET" -v
64+
- uses: actions/checkout@v4

.github/workflows/amd64_windows.yml

+74-22
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,81 @@
1+
# ref: https://github.com/actions/runner-images
12
name: amd64 Windows
23

34
on: [push, pull_request, workflow_dispatch]
45

6+
concurrency:
7+
group: ${{github.workflow}}-${{github.ref}}
8+
cancel-in-progress: true
9+
10+
# Building using the github runner environement directly.
511
jobs:
6-
# Building using the github runner environement directly.
7-
visual-studio:
12+
native:
13+
strategy:
14+
matrix:
15+
cmake: [
16+
{name: "VS2022", config: Release},
17+
]
18+
java: [
19+
# see https://endoflife.date/azul-zulu
20+
{distrib: 'zulu', version: '8'}, # 2030/12
21+
{distrib: 'zulu', version: '11'}, # 2026/09
22+
{distrib: 'zulu', version: '17'}, # 2029/09
23+
{distrib: 'zulu', version: '21'}, # 2031/09
24+
# see https://endoflife.date/eclipse-temurin
25+
{distrib: 'temurin', version: '8'}, # 2026/11
26+
{distrib: 'temurin', version: '11'}, # 2027/10
27+
{distrib: 'temurin', version: '17'}, # 2027/10
28+
{distrib: 'temurin', version: '21'}, # 2029/12
29+
# see https://endoflife.date/microsoft-build-of-openjdk
30+
{distrib: 'microsoft', version: '11'}, # 2027/09
31+
{distrib: 'microsoft', version: '17'}, # 2027/09
32+
{distrib: 'microsoft', version: '21'}, # 2028/09
33+
]
34+
fail-fast: false
35+
name: amd64•Windows•CMake(${{matrix.cmake.name}})•${{matrix.java.distrib}}-${{matrix.java.version}}
836
runs-on: windows-latest
37+
env:
38+
CTEST_OUTPUT_ON_FAILURE: 1
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: actions/setup-java@v4
42+
with:
43+
distribution: ${{matrix.java.distrib}}
44+
java-version: ${{matrix.java.version}}
45+
- name: Check java
46+
run: |
47+
java -version
48+
mvn --version
49+
- name: Check CMake
50+
run: cmake --version
51+
- name: Configure
52+
run: >
53+
cmake -S. -Bbuild
54+
-G "Visual Studio 17 2022"
55+
-DCMAKE_CONFIGURATION_TYPES=${{matrix.cmake.config}}
56+
-DCMAKE_INSTALL_PREFIX=install
57+
-DSKIP_GPG=ON
58+
- name: Build
59+
run: >
60+
cmake --build build
61+
--config ${{matrix.cmake.config}}
62+
--target ALL_BUILD
63+
-v -- /verbosity:diag /maxcpucount
64+
- name: Test
65+
run: >
66+
cmake --build build
67+
--config ${{matrix.cmake.config}}
68+
--target RUN_TESTS
69+
-v -- /verbosity:diag /maxcpucount
70+
- name: Install
71+
run: >
72+
cmake --build build
73+
--config ${{matrix.cmake.config}}
74+
--target INSTALL
75+
-v -- /verbosity:diag /maxcpucount
76+
77+
amd64_windows:
78+
runs-on: ubuntu-latest
79+
needs: native
980
steps:
10-
- uses: actions/checkout@v4
11-
- name: Install SWIG 4.0.2
12-
run: |
13-
(New-Object System.Net.WebClient).DownloadFile("http://prdownloads.sourceforge.net/swig/swigwin-4.0.2.zip","swigwin-4.0.2.zip");
14-
Expand-Archive .\swigwin-4.0.2.zip .;
15-
echo "$((Get-Item .).FullName)/swigwin-4.0.2" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
16-
- name: Check swig
17-
run: swig -version
18-
- name: Check mvn
19-
run: mvn.cmd --version
20-
- name: Check cmake
21-
run: cmake --version
22-
- name: Configure
23-
run: cmake -S. -Bbuild -G "Visual Studio 17 2022" -DCMAKE_CONFIGURATION_TYPES=Release -DCMAKE_INSTALL_PREFIX=install -DSKIP_GPG=ON
24-
- name: Build
25-
run: cmake --build build --config Release --target ALL_BUILD -v -- /verbosity:diag /maxcpucount
26-
- name: Test
27-
run: cmake --build build --config Release --target RUN_TESTS -v -- /verbosity:diag /maxcpucount
28-
- name: Install
29-
run: cmake --build build --config Release --target INSTALL -v -- /verbosity:diag /maxcpucount
81+
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)