-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (58 loc) · 1.77 KB
/
Copy pathci.yml
File metadata and controls
72 lines (58 loc) · 1.77 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
name: CI
on:
push:
branches: [main]
pull_request:
env:
CPM_SOURCE_CACHE: ${{ github.workspace }}/.cpm-cache
jobs:
cmake:
name: CMake (${{ matrix.preset }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
preset: [debug, release, asan]
steps:
- uses: actions/checkout@v4
- name: Install toolchain
run: |
sudo apt-get update
sudo apt-get install -y ninja-build mold ccache libssl-dev gcc-14 g++-14
echo "CC=gcc-14" >> "$GITHUB_ENV"
echo "CXX=g++-14" >> "$GITHUB_ENV"
- name: Cache CPM packages
uses: actions/cache@v4
with:
path: ${{ env.CPM_SOURCE_CACHE }}
key: cpm-${{ runner.os }}-${{ hashFiles('cmake/deps.cmake') }}
- name: Configure
run: cmake --preset ${{ matrix.preset }}
- name: Build
run: cmake --build --preset ${{ matrix.preset }} -j$(nproc)
- name: Test
run: ctest --preset ${{ matrix.preset }} -j$(nproc)
xmake:
name: XMake (release, logs compiled out)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: '>=3.0.0'
actions-cache-folder: .xmake-cache
package-cache: true
package-cache-key: xmake-${{ runner.os }}
- name: Install toolchain
run: |
sudo apt-get update
sudo apt-get install -y mold libssl-dev gcc-14 g++-14
echo "CC=gcc-14" >> "$GITHUB_ENV"
echo "CXX=g++-14" >> "$GITHUB_ENV"
- name: Configure
run: xmake f -m release -c --log_level=none -y
- name: Build
run: xmake -y
- name: Test
run: xmake test -y