-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 2.33 KB
/
build.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
name: CI Workflow
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/panduza/pzacxx-build-img:latest
strategy:
fail-fast: false
matrix:
os: [linux, windows]
compiler: [gcc, clang]
build_type: [debug, release]
lib_type: [shared, static]
exclude:
- os: windows
compiler: clang
steps:
- name: Checkout
uses: actions/checkout@v4
- if: ${{ env.ACT }}
name: Hack container for local development
run: pacman -S --noconfirm nodejs
- name: "cache"
uses: actions/cache@v3
with:
path: ~/.conan2/p
key: conan-cache-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.build_type }}-${{ matrix.lib_type }}
- id: build_type
uses: ASzc/change-string-case-action@v6
with:
string: ${{ matrix.build_type }}
- name: "Install dependencies"
run: |
if [ "${{ matrix.lib_type }}" = "static" ]; then
shared="False"
else
shared="True"
fi
conan install -pr:b ./conan_profiles/linux_gcc -pr:h ./conan_profiles/${{ matrix.os }}_${{ matrix.compiler }} --build=missing -s build_type=${{ steps.build_type.outputs.capitalized }} -o shared=$shared .
- name: "Build for ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.lib_type }}-${{ matrix.build_type }}"
run: |
if [ "${{ matrix.compiler }}" = "clang" ] && [ "${{ matrix.build_type }}" = "debug" ] && [ "${{ matrix.lib_type }}" = "shared" ]; then
tidy="True"
else
tidy="False"
fi
cmake --preset ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.lib_type }} -DWITH_TIDY=$tidy
cmake --build --preset ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.lib_type }}-${{ matrix.build_type }}
- name: "Test for ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.lib_type }}-${{ matrix.build_type }}"
run: |
echo "Test for ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.lib_type }}-${{ matrix.build_type }}"
- name: "Coverage"
if: ${{ matrix.os == 'linux' && matrix.compiler == 'gcc' && matrix.build_type == 'debug' && matrix.lib_type == 'static' }}
run: |
echo "Coverage for ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.lib_type }}-${{ matrix.build_type }}"