-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (62 loc) · 2 KB
/
checks.yaml
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: Checks
on: [pull_request]
jobs:
checks:
name: Run black-desk/checks
permissions:
checks: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: black-desk/checks@master
build-and-test:
name: Build and tests
runs-on: "ubuntu-latest"
strategy:
matrix:
type: [Debug, Release, RelWithDebInfo]
cxx: [g++, clang++]
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ matrix.cxx }}-${{ matrix.type }}
- name: Cache CPM.cmake Source
uses: actions/cache@v4
with:
path: .cache/cpm/source
key: ${{ runner.os }}-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
- name: Install system dependencies
run: |
sudo apt update &&
sudo apt install libsystemd-dev
- name: Build project with cmake
run: |
mkdir -p .cache/cpm/source &&
export CXX="${{ matrix.cxx }}" &&
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" &&
export CPM_DOWNLOAD_ALL="ON" &&
export CPM_SOURCE_CACHE="$PWD/.cache/cpm/source" &&
export CFLAGS="$CFLAGS -Wall" &&
export CFLAGS="$CFLAGS -Wextra" &&
export CFLAGS="$CFLAGS -Wpedantic" &&
export CFLAGS="$CFLAGS -Wno-extra-semi -Wno-unused-command-line-argument -Wno-gnu-zero-variadic-macro-arguments" &&
export CFLAGS="$CFLAGS -fsanitize=address,undefined" &&
export CXXFLAGS="$CFLAGS" &&
cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.type }}&&
cmake --build build -j
- name: Run tests
if: ${{ false }} # This project has no tests for now.
run: |
cmake --build build -t test -j
pass:
name: Pass
needs: [checks, build-and-test]
runs-on: ubuntu-latest
steps:
- name: Placeholder
run: true