-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (54 loc) · 1.78 KB
/
ci.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
52
53
54
name: ci-push
on: [push]
jobs:
format-check:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: format code
run: scripts/format_code.sh
- name: check diff
run: .github/format_check_diff.sh
build-linux:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: init
run: |
sudo apt update -yqq && sudo apt install -yqq ninja-build gcc-14
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100
- name: configure gcc
run: cmake -S . --preset=default -B build
- name: configure clang
run: cmake -S . --preset=ninja-clang -B clang
- name: build gcc debug
run: cmake --build build --config=Debug
- name: build gcc release
run: cmake --build build --config=Release
- name: build clang debug
run: cmake --build clang --config=Debug
- name: build clang release
run: cmake --build clang --config=Release
- name: test gcc debug
run: cd build && ctest -C Debug
- name: test gcc release
run: cd build && ctest -C Release
- name: test clang debug
run: cd clang && ctest -C Debug
- name: test clang release
run: cd clang && ctest -C Release
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: configure
run: cmake -S . --preset=vs22 -B build
- name: build debug
run: cmake --build build --config=Debug
- name: build release
run: cmake --build build --config=Release
- name: test debug
run: cd build && ctest -C Debug
- name: test release
run: cd build && ctest -C Release