-
Notifications
You must be signed in to change notification settings - Fork 2
127 lines (102 loc) · 3.08 KB
/
Copy pathci.yml
File metadata and controls
127 lines (102 loc) · 3.08 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
linux:
name: Linux (${{ matrix.compiler }})
runs-on: ubuntu-latest
container: alpine:3.20
timeout-minutes: 10
strategy:
matrix:
compiler: [gcc, clang]
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: apk add --no-cache build-base clang cmake openmp-dev python3
- name: Check documentation links
run: python3 scripts/check_markdown_links.py
- name: Configure
run: >-
cmake -S . -B build
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_COMPILER=${{ matrix.compiler }}
-DTENSORLIB_BUILD_BENCHMARKS=ON
-DTENSORLIB_WARNINGS_AS_ERRORS=ON
- name: Build
run: cmake --build build --parallel 2
- name: Test
run: ctest --test-dir build --output-on-failure
- name: Test installed package
run: |
cmake --install build --prefix "$PWD/install"
cmake -S tests/integration/package_consumer -B build-consumer \
-DCMAKE_PREFIX_PATH="$PWD/install"
cmake --build build-consumer --parallel 2
ctest --test-dir build-consumer --output-on-failure
sanitizers:
name: Sanitizers
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Configure
run: >-
cmake -S . -B build
-DCMAKE_BUILD_TYPE=Debug
-DTENSORLIB_ENABLE_OPENMP=OFF
-DTENSORLIB_BUILD_BENCHMARKS=ON
-DTENSORLIB_ENABLE_SANITIZERS=ON
- name: Build
run: cmake --build build --parallel 2
- name: Test
env:
ASAN_OPTIONS: detect_leaks=1:halt_on_error=1
UBSAN_OPTIONS: halt_on_error=1
run: ctest --test-dir build --output-on-failure
portable:
name: macOS (serial)
runs-on: macos-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Configure
run: >-
cmake -S . -B build
-DCMAKE_BUILD_TYPE=Release
-DTENSORLIB_BUILD_BENCHMARKS=ON
-DTENSORLIB_ENABLE_OPENMP=OFF
- name: Build
run: cmake --build build --config Release --parallel 2
- name: Test
run: ctest --test-dir build -C Release --output-on-failure
windows:
name: Windows (MinGW)
runs-on: windows-latest
timeout-minutes: 15
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-ninja
- name: Configure
run: >-
cmake -S . -B build -G Ninja
-DCMAKE_BUILD_TYPE=Release
-DTENSORLIB_BUILD_BENCHMARKS=ON
-DTENSORLIB_ENABLE_OPENMP=OFF
- name: Build
run: cmake --build build --parallel 2
- name: Test
run: ctest --test-dir build --output-on-failure