-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (76 loc) · 2.29 KB
/
testing.yml
File metadata and controls
83 lines (76 loc) · 2.29 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
name: testing
on:
pull_request:
push:
branches:
- main
- experimental
env:
BUILD_PRESET: "testing"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
compiler:
- llvm
- gcc
include:
- os: "windows-latest"
compiler: "msvc"
- os: "windows-11-arm"
compiler: "msvc"
- os: "macos-latest"
compiler: "llvm-20" # llvm-21 is currently broken on macos: https://github.com/llvm/llvm-project/issues/155531
- os: "macos-latest"
compiler: "gcc"
steps:
- uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: |
./build/
~/vcpkg
~/.cache/vcpkg/archives
${{ env.LOCALAPPDATA }}/vcpkg/archives
${{ env.APPDATA }}/vcpkg/archives
${{ env.XDG_CACHE_HOME }}/vcpkg/archives
~/.cache/ccache
~/.ccache
~/.config/ccache
~/Library/Caches/ccache
${{ env.LOCALAPPDATA }}/ccache
${{ env.XDG_CACHE_HOME }}/ccache
key: v2-${{ matrix.os }}-${{ matrix.compiler }}-${{ env.BUILD_PRESET }}-${{ hashFiles('**/CMakeLists.txt', './vcpkg.json') }}
restore-keys: |
${{ matrix.os }}-${{ env.BUILD_PRESET }}-${{ hashFiles('./vcpkg.json') }}
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: ${{ matrix.compiler }}
vcvarsall: ${{ contains(matrix.os, 'windows') }}
cmake: true
ninja: true
vcpkg: true
- name: Setup VCPKG_ROOT (Windows)
if: ${{ contains(matrix.os, 'windows') }}
run: |
echo "VCPKG_ROOT=C:\Users\runneradmin\vcpkg" >> $GITHUB_ENV
- name: Setup VCPKG_ROOT (Linux/macOS)
if: ${{ !contains(matrix.os, 'windows') }}
run: |
echo "VCPKG_ROOT=$HOME/vcpkg" >> $GITHUB_ENV
- name: Configure CMake
run: |
cmake --preset ${{ env.BUILD_PRESET }}
- name: "Build"
run: |
cmake --build ./build
- name: "Run Tests"
run: |
ctest --output-on-failure --test-dir ./build/tests