-
Notifications
You must be signed in to change notification settings - Fork 121
72 lines (70 loc) · 2.59 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: ci
on: [push, pull_request]
jobs:
build_linux:
runs-on: ubuntu-latest
strategy:
matrix:
build_config:
- { compiler: gcc, version: 14 }
- { compiler: gcc, version: 13 }
- { compiler: gcc, version: 12 }
- { compiler: gcc, version: 11 }
- { compiler: gcc, version: 10 }
- { compiler: gcc, version: 9 }
- { compiler: clang, version: 19 }
- { compiler: clang, version: 18 }
- { compiler: clang, version: 17 }
- { compiler: clang, version: 16 }
- { compiler: clang, version: 15 }
- { compiler: clang, version: 14 }
- { compiler: clang, version: 13 }
- { compiler: clang, version: 12 }
- { compiler: clang, version: 11 }
- { compiler: gcc, version: 10, args: "-DDEFLATE_SUPPORT=OFF" }
container:
image: ${{ matrix.build_config.compiler == 'clang' && 'teeks99/clang-ubuntu' || matrix.build_config.compiler }}:${{ matrix.build_config.version }}
env:
JOBS: 2
name: "${{ matrix.build_config.compiler }}-${{ matrix.build_config.version }} ${{ matrix.build_config.args }}"
steps:
- uses: actions/checkout@main
- name: Setup Clang
if: matrix.build_config.compiler == 'clang'
run: |
scripts/ci_setup_clang.sh ${{ matrix.build_config.version }}
echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV
echo "CC=clang-${{ matrix.build_config.version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.build_config.version }}" >> $GITHUB_ENV
- name: Setup
run: apt-get update && apt-get install -y cmake valgrind zlib1g-dev git
- name: Build
run: |
cmake . -Bbuild -DCMAKE_BUILD_TYPE=Release -DCOVERAGE=ON ${{ matrix.build_config.args }}
cmake --build build -- -j${JOBS}
- name: Test
run: |
cd build
cmake --build . --target test
ctest -D ExperimentalBuild -j${JOBS}
ctest -D ExperimentalMemCheck -j${JOBS}
- name: CodeCov
uses: codecov/codecov-action@v4
with:
gcov: true
build_msvc:
runs-on: windows-latest
strategy:
matrix:
build_config:
- {args: "-DDEFLATE_SUPPORT=OFF", config: "Debug"}
steps:
- uses: actions/checkout@main
- name: Build
run: |
cmake . -Bbuild ${{ matrix.build_config.args }}
cmake --build build --parallel --config ${{ matrix.build_config.config }}
- name: Test
run: |
cd build
ctest -C ${{ matrix.build_config.config }}