Skip to content

Commit 482552b

Browse files
committed
update CI
1 parent ed2413e commit 482552b

File tree

1 file changed

+64
-97
lines changed

1 file changed

+64
-97
lines changed

.github/workflows/ci.yml

Lines changed: 64 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -10,106 +10,73 @@ on:
1010
- cron: '25 12 * * *'
1111

1212
jobs:
13-
build:
14-
name: ${{ matrix.config.name }}
15-
runs-on: ubuntu-24.04
16-
container:
17-
image: ghcr.io/bemanproject/testingcontainers-${{ matrix.config.tag }}
18-
strategy:
19-
fail-fast: false
20-
matrix:
21-
config:
22-
- {name: "Ubuntu Clang 21", tag: "clang:21", toolchain: "clang-21", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
23-
- {name: "Ubuntu Clang 20", tag: "clang:20", toolchain: "clang-20", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
24-
# Note: clang-19 + Asan setup causes errors on some platforms. Temporary skip some checks via .asan_options.
25-
- {name: "Ubuntu Clang 19", tag: "clang:19", toolchain: "clang-19", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" ", asan_options: "new_delete_type_mismatch=0"}
26-
- {name: "Ubuntu Clang 18", tag: "clang:18", toolchain: "clang-18", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
27-
- {name: "Ubuntu Clang 17", tag: "clang:17", toolchain: "clang-17", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
28-
- {name: "Ubuntu GCC 14", tag: "gcc:14", toolchain: "gcc-14", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan;Gcov\" ", coverage: true}
29-
- {name: "Ubuntu GCC 13", tag: "gcc:13", toolchain: "gcc-13", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
30-
- {name: "Ubuntu GCC 12", tag: "gcc:12", toolchain: "gcc-12", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
31-
steps:
32-
- uses: actions/checkout@v3
33-
with:
34-
submodules: 'true'
35-
# If Clang 17, install a newer version of libc++ and libc++abi.
36-
- name: Update packages
37-
run: |
38-
set -x
39-
sudo apt update
40-
sudo apt -y upgrade
41-
- name: Install libc++
42-
if: matrix.config.tag == 'clang:17'
43-
run: |
44-
set -x
45-
sudo apt-get install -y libc++-dev libc++1 libc++abi-dev libc++abi1
46-
find /usr/lib/x86_64-linux-gnu/ -name libc++.so* || true
47-
- name: Install Gcovr
48-
if: matrix.config.coverage
49-
run: |
50-
set -x
51-
sudo apt-get install -y gcovr
52-
- name: CMake Configure
53-
run: |
54-
set -x
55-
echo ${{ matrix.config.cmake_args }}
56-
echo ${{ matrix.config.toolchain }}
57-
rm -rf .build
58-
cmake ${{ matrix.config.cmake_args }} \
59-
-DCMAKE_INSTALL_PREFIX=.install \
60-
-DCMAKE_TOOLCHAIN_FILE="etc/${{ matrix.config.toolchain }}-toolchain.cmake" \
61-
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="./cmake/use-fetch-content.cmake" \
62-
-B .build \
63-
-S .
64-
- name: CMake ASAN Build
65-
run: |
66-
set -x
67-
cmake --build .build --config Asan --target all_verify_interface_header_sets -- -k 0
68-
cmake --build .build --config Asan --target all -- -k 0
69-
- name: CMake ASAN Test
70-
run: |
71-
set -x
72-
[[ ! -z "${{ matrix.config.asan_options }}" ]] && export ASAN_OPTIONS="${{ matrix.config.asan_options }}"
73-
ctest --build-config Asan --output-on-failure --test-dir .build
74-
- name: CMake RWDI Build
75-
run: |
76-
set -x
77-
cmake --build .build --config RelWithDebInfo --target all_verify_interface_header_sets -- -k 0
78-
cmake --build .build --config RelWithDebInfo --target all -- -k 0
79-
- name: CMake RWDI Test
80-
run: |
81-
set -x
82-
ctest --build-config RelWithDebInfo --output-on-failure --test-dir .build
83-
- name: Install
84-
run: |
85-
set -x
86-
cmake --install .build --config RelWithDebInfo --component beman_optional_development --verbose
87-
- name: CMake Gcov Build
88-
if: matrix.config.coverage
89-
run: |
90-
set -x
91-
cmake --build .build --config Gcov --target all_verify_interface_header_sets -- -k 0
92-
cmake --build .build --config Gcov --target all -- -k 0
93-
- name: CMake Gcov Test
94-
if: matrix.config.coverage
95-
run: |
96-
set -x
97-
ctest --build-config Gcov --output-on-failure --test-dir .build
98-
- name: Generate Coverage
99-
if: matrix.config.coverage
100-
run: |
101-
set -x
102-
cmake --build .build --config Gcov --target process_coverage -- -k 0
103-
- name: Coveralls
104-
if: matrix.config.coverage
105-
uses: coverallsapp/github-action@main
106-
with:
107-
file: .build/coverage.json
108-
github-token: ${{ secrets.GITHUB_TOKEN }}
13+
build-and-test:
14+
uses: bemanproject/infra-workflows/.github/workflows/[email protected]
15+
with:
16+
matrix_config: >
17+
{
18+
"gcc": [
19+
{ "versions": ["14"],
20+
"tests": [
21+
{ "cxxversions": ["c++26"],
22+
"tests": [
23+
{ "stdlibs": ["libstdc++"],
24+
"tests": [
25+
"Debug.Default", "Release.Default", "Release.ASan",
26+
"Debug.Coverage"
27+
]
28+
}
29+
]
30+
}
31+
]
32+
},
33+
{ "versions": ["13", "12"],
34+
"tests": [
35+
{ "cxxversions": ["c++26"],
36+
"tests": [
37+
{ "stdlibs": ["libstdc++"],
38+
"tests": [
39+
"Debug.Default", "Release.Default", "Release.ASan"
40+
]
41+
}
42+
]
43+
}
44+
]
45+
}
46+
],
47+
"clang": [
48+
{ "versions": ["21", "20", "18", "17"],
49+
"tests": [
50+
{ "cxxversions": ["c++26"],
51+
"tests": [
52+
{ "stdlibs": ["libstdc++", "libc++"],
53+
"tests": [
54+
"Debug.Default", "Release.Default", "Release.ASan"
55+
]
56+
}
57+
]
58+
}
59+
]
60+
},
61+
{ "versions": ["19"],
62+
"tests": [
63+
{ "cxxversions": ["c++26"],
64+
"tests": [
65+
{ "stdlibs": ["libstdc++", "libc++"],
66+
"tests": [
67+
"Debug.Default", "Release.Default", "Release.ASan"
68+
]
69+
}
70+
]
71+
}
72+
]
73+
}
74+
]
75+
}
10976
11077
create-issue-when-fault:
11178
runs-on: ubuntu-latest
112-
needs: [build]
79+
needs: [build-and-test]
11380
if: failure() && github.event_name == 'schedule'
11481
steps:
11582
# See https://github.com/cli/cli/issues/5075

0 commit comments

Comments
 (0)