-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (55 loc) · 2.06 KB
/
ci.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
65
66
67
68
69
70
name: tests
on:
push:
branches:
- main
pull_request:
jobs:
check-format:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Add LLVM apt key
run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/llvm-toolchain-focal-18.asc
- name: Add LLVM repo
run: sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main'
- name: Install new clang-format
run: sudo apt-get install clang-format-18
- name: Check formatting
run: python ${{ github.workspace }}/scripts/check_format.py --clang-format=clang-format-18
check-tidy:
runs-on: ubuntu-22.04
env:
build_dir: ${{ github.workspace }}/build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Add LLVM apt key
run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/llvm-toolchain-focal-18.asc
- name: Add LLVM repo
run: sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main'
- name: Install dependencies
run: sudo apt-get install libfmt-dev libpq-dev clang-tidy-18
- name: Configure CMake
run: cmake -B ${{ env.build_dir }} -S ${{ github.workspace }} -DPFR_ORM_TEST
- name: Run clang-tidy
run: python ${{ github.workspace }}/scripts/tidy.py --clang-tidy=run-clang-tidy-18 --compile-commands=${{ env.build_dir }}
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
env:
build_dir: ${{ github.workspace }}/build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install libfmt-dev libpq-dev
- name: Configure CMake
run: cmake -B ${{ env.build_dir }} -S ${{ github.workspace }} -DPFR_ORM_ASAN -DPFR_ORM_TEST
- name: Build tests
run: cmake --build ${{ env.build_dir }}