Skip to content

Commit 8fd3e56

Browse files
lihuibaColdwings
andauthored
simplify workflow scripts with matrix (#1515)
Co-authored-by: Coldwings <coldwings@me.com>
1 parent 28ae57a commit 8fd3e56

4 files changed

Lines changed: 52 additions & 434 deletions

File tree

.github/workflows/ci.linux.arm.yml

Lines changed: 25 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,29 @@ on:
77

88
jobs:
99
arm-linux-build-and-test:
10+
name: gcc${{ matrix.gcc }}-C++${{ matrix.cxx }}
1011
if: ${{ !contains(github.event.pull_request.labels.*.name, 'needs-manual-merge') && (github.event.action != 'unlabeled' || github.event.label.name == 'needs-manual-merge') }}
11-
runs-on: ubuntu-24.04-arm
12-
12+
runs-on: ubuntu-26.04-arm
1313
container:
1414
image: ghcr.io/alibaba/photon-ut-base:latest
1515
options: --cpus 4 --shm-size 512m --privileged
16-
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- gcc: 9
21+
cxx: 14
22+
- gcc: 9
23+
cxx: 17
24+
- gcc: 11
25+
cxx: 20
26+
- gcc: 12
27+
cxx: 23
28+
- gcc: 13
29+
cxx: 23
30+
- gcc: 14
31+
cxx: 23
32+
run_test: true
1733
steps:
1834
- uses: szenius/set-timezone@v2.0
1935
with:
@@ -23,85 +39,11 @@ jobs:
2339

2440
- uses: actions/checkout@v4
2541

26-
- name: Build-Debug-921-C++14
27-
run: |
28-
source /opt/rh/gcc-toolset-9/enable
29-
cmake -B build -D CMAKE_BUILD_TYPE=MinSizeRel \
30-
-D PHOTON_ENABLE_ECOSYSTEM=ON \
31-
-D PHOTON_BUILD_TESTING=ON \
32-
-D PHOTON_ENABLE_SASL=ON \
33-
-D PHOTON_ENABLE_FUSE=ON \
34-
-D PHOTON_ENABLE_URING=ON \
35-
-D PHOTON_ENABLE_LIBCURL=ON \
36-
-D PHOTON_ENABLE_EXTFS=ON
37-
cmake --build build -j $(nproc) -- VERBOSE=1
38-
39-
- name: Build-Debug-921-C++17
40-
run: |
41-
source /opt/rh/gcc-toolset-9/enable
42-
rm -fr build
43-
cmake -B build -D CMAKE_BUILD_TYPE=MinSizeRel \
44-
-D PHOTON_CXX_STANDARD=17 \
45-
-D PHOTON_ENABLE_ECOSYSTEM=ON \
46-
-D PHOTON_BUILD_TESTING=ON \
47-
-D PHOTON_ENABLE_SASL=ON \
48-
-D PHOTON_ENABLE_FUSE=ON \
49-
-D PHOTON_ENABLE_URING=ON \
50-
-D PHOTON_ENABLE_LIBCURL=ON \
51-
-D PHOTON_ENABLE_EXTFS=ON
52-
cmake --build build -j $(nproc) -- VERBOSE=1
53-
54-
- name: Build-Debug-1121-C++20
55-
run: |
56-
source /opt/rh/gcc-toolset-11/enable
57-
rm -fr build
58-
cmake -B build -D CMAKE_BUILD_TYPE=MinSizeRel \
59-
-D PHOTON_CXX_STANDARD=20 \
60-
-D PHOTON_ENABLE_ECOSYSTEM=ON \
61-
-D PHOTON_BUILD_TESTING=ON \
62-
-D PHOTON_ENABLE_SASL=ON \
63-
-D PHOTON_ENABLE_FUSE=ON \
64-
-D PHOTON_ENABLE_URING=ON \
65-
-D PHOTON_ENABLE_LIBCURL=ON \
66-
-D PHOTON_ENABLE_EXTFS=ON
67-
cmake --build build -j $(nproc) -- VERBOSE=1
68-
69-
- name: Build-Debug-1211-C++23
70-
run: |
71-
source /opt/rh/gcc-toolset-12/enable
72-
rm -fr build
73-
cmake -B build -D CMAKE_BUILD_TYPE=MinSizeRel \
74-
-D PHOTON_CXX_STANDARD=23 \
75-
-D PHOTON_ENABLE_ECOSYSTEM=ON \
76-
-D PHOTON_BUILD_TESTING=ON \
77-
-D PHOTON_ENABLE_SASL=ON \
78-
-D PHOTON_ENABLE_FUSE=ON \
79-
-D PHOTON_ENABLE_URING=ON \
80-
-D PHOTON_ENABLE_LIBCURL=ON \
81-
-D PHOTON_ENABLE_EXTFS=ON
82-
cmake --build build -j $(nproc) -- VERBOSE=1
83-
84-
- name: Build-Debug-13-C++23
85-
run: |
86-
source /opt/rh/gcc-toolset-13/enable
87-
rm -fr build
88-
cmake -B build -D CMAKE_BUILD_TYPE=MinSizeRel \
89-
-D PHOTON_CXX_STANDARD=23 \
90-
-D PHOTON_ENABLE_ECOSYSTEM=ON \
91-
-D PHOTON_BUILD_TESTING=ON \
92-
-D PHOTON_ENABLE_SASL=ON \
93-
-D PHOTON_ENABLE_FUSE=ON \
94-
-D PHOTON_ENABLE_URING=ON \
95-
-D PHOTON_ENABLE_LIBCURL=ON \
96-
-D PHOTON_ENABLE_EXTFS=ON
97-
cmake --build build -j $(nproc) -- VERBOSE=1
98-
99-
- name: Build-Debug-14-C++23
42+
- name: Build
10043
run: |
101-
source /opt/rh/gcc-toolset-14/enable
102-
rm -fr build
44+
source /opt/rh/gcc-toolset-${{ matrix.gcc }}/enable
10345
cmake -B build -D CMAKE_BUILD_TYPE=MinSizeRel \
104-
-D PHOTON_CXX_STANDARD=23 \
46+
-D PHOTON_CXX_STANDARD=${{ matrix.cxx }} \
10547
-D PHOTON_ENABLE_ECOSYSTEM=ON \
10648
-D PHOTON_BUILD_TESTING=ON \
10749
-D PHOTON_ENABLE_SASL=ON \
@@ -112,15 +54,16 @@ jobs:
11254
cmake --build build -j $(nproc) -- VERBOSE=1
11355
11456
- name: Test
57+
if: matrix.run_test
11558
run: |
11659
cd build
11760
nohup redis-server &
118-
ctest --timeout 3600 -V
61+
ctest -E test-lockfree --timeout 3600 -V
11962
pkill redis-server
12063
12164
debug-build-from-source:
12265
if: ${{ !contains(github.event.pull_request.labels.*.name, 'needs-manual-merge') && (github.event.action != 'unlabeled' || github.event.label.name == 'needs-manual-merge') }}
123-
runs-on: ubuntu-24.04-arm
66+
runs-on: ubuntu-26.04-arm
12467
container:
12568
image: almalinux:8
12669
steps:

0 commit comments

Comments
 (0)