-
Notifications
You must be signed in to change notification settings - Fork 1
102 lines (84 loc) · 2.76 KB
/
Copy pathcmake.yml
File metadata and controls
102 lines (84 loc) · 2.76 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Cieto CI
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- name: Linux Release
os: ubuntu-latest
preset: release
package: cieto-linux-x86_64
- name: Windows Release
os: windows-latest
preset: release-windows
package: cieto-windows-x86_64
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
submodules: recursive
- name: Configure
run: cmake --preset ${{ matrix.preset }}
- name: Build
run: cmake --build --preset ${{ matrix.preset }}
- name: Run tests
run: ctest --preset ${{ matrix.preset }} --output-on-failure
- name: Stage install tree
run: cmake --install build/${{ matrix.preset }} --prefix package/cieto
- name: Create ZIP package
working-directory: package
run: |
cmake -E tar cf ../${{ matrix.package }}.zip cieto
cmake -E tar tf ../${{ matrix.package }}.zip
- name: Generate SHA256 checksum
run: |
cmake -E sha256sum ${{ matrix.package }}.zip > ${{ matrix.package }}.zip.sha256
cmake -E cat ${{ matrix.package }}.zip.sha256
- name: Upload ZIP artifact
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.package }}
path: ${{ matrix.package }}.zip
archive: false
if-no-files-found: error
retention-days: 14
- name: Upload SHA256 artifact
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.package }}.zip.sha256
path: ${{ matrix.package }}.zip.sha256
archive: false
if-no-files-found: error
retention-days: 14
sanitizers:
name: Linux ASan + UBSan
runs-on: ubuntu-latest
timeout-minutes: 20
env:
ASAN_OPTIONS: detect_leaks=1:halt_on_error=1
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
submodules: recursive
- name: Configure sanitizers
run: >-
cmake -S . -B build/sanitizers -G Ninja
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_C_COMPILER=gcc
-DBUILD_TESTING=ON
"-DCMAKE_C_FLAGS=-fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize-recover=all"
"-DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address,undefined"
- name: Build with sanitizers
run: cmake --build build/sanitizers
- name: Run sanitizer tests
run: ctest --test-dir build/sanitizers --output-on-failure --timeout 180