-
Notifications
You must be signed in to change notification settings - Fork 23
51 lines (41 loc) · 999 Bytes
/
build.yml
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
name: Build
on:
push:
branches:
- '*'
pull_request:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-20.04
env:
CCACHE_MAXSIZE: 400M
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: 1
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: ./.github/workflows/deps/linux.sh
- name: Retrieve cache
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ runner.os }}-ccache-${{ github.sha }}
restore-keys: ${{ runner.os }}-ccache-
- name: Configure build
run: |
mkdir build
cd build
cmake \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Debug \
-G Ninja \
..
- name: Build
run: |
cd build
cmake --build .
ccache -s