-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 2.05 KB
/
Copy pathci-cd.yml
File metadata and controls
76 lines (64 loc) · 2.05 KB
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
73
74
75
76
on:
push:
env:
CLANG_VERSION: "20.1.8"
MSVC_VERSION: "19.44.35214"
VERBOSE: 1
jobs:
CI:
runs-on: ${{ matrix.os }}
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
build_type:
- Release
compiler:
- clang
- msvc
generator:
- "Ninja"
exclude:
- os: ubuntu-latest
compiler: msvc
steps:
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: ${{matrix.compiler}}
conan: true
cmake: true
ninja: true
vcvarsall: false
clangtidy: true
cppcheck: true
ccache: false
- name: Checkout
uses: actions/checkout@v3
- name: Set env profile
shell: bash
run: |
os="${{ matrix.os}}"
system="${os%%-*}"
[[ "$system" == "ubuntu" ]] && system="linux"
echo "PROFILE=profiles/${system}-${{ matrix.compiler }}" >> "$GITHUB_ENV"
- name: Install
run: conan install . -pr:a=${{env.PROFILE}} -s build_type=${{ matrix.build_type }} --build=missing
- name: Build
run: conan build . -pr:a=${{env.PROFILE}} -s build_type=${{ matrix.build_type }} --build=missing
- name: Set env preset and build folder
shell: bash
run: echo "PRESET=$(cmake --list-presets | tail -n 1 | awk '{print $1}' | tr -d '"')" >> "$GITHUB_ENV"
- name: Test
run: ctest --preset ${{env.PRESET}}
- name: Package
run: cpack --preset ${{env.PRESET}} -B ${{ github.workspace }}/packages
- name: Upload Artifact
uses: actions/upload-artifact@v4.6.2
with:
name: ${{matrix.os}}-${{matrix.compiler}}
path: ./packages/*.*
if-no-files-found: error