-
Notifications
You must be signed in to change notification settings - Fork 38
64 lines (54 loc) · 1.6 KB
/
ci.yml
File metadata and controls
64 lines (54 loc) · 1.6 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
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
arch: x86_64
cmake_extra: ""
- os: macos-latest
arch: arm64
cmake_extra: ""
- os: windows-latest
arch: x64
cmake_extra: ""
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (${{ matrix.arch }})
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y cmake
- name: Configure CMake
run: >
cmake -B build
-DCMAKE_BUILD_TYPE=Release
-DTQ_BUILD_TESTS=ON
-DTQ_BUILD_BENCH=ON
-DTQ_BUILD_SERVER=ON
${{ matrix.cmake_extra }}
- name: Build (Unix)
if: runner.os != 'Windows'
run: cmake --build build --config Release -j$(nproc 2>/dev/null || sysctl -n hw.ncpu)
- name: Build (Windows)
if: runner.os == 'Windows'
run: cmake --build build --config Release -j $env:NUMBER_OF_PROCESSORS
- name: Run tests
run: ctest --test-dir build --output-on-failure --timeout 120 -C Release
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.os }}-${{ matrix.arch }}
path: build/Testing/
retention-days: 7