Skip to content

Commit 09a83ca

Browse files
committed
Add CI
1 parent 1d0923b commit 09a83ca

File tree

1 file changed

+105
-0
lines changed

1 file changed

+105
-0
lines changed

.github/workflows/ci.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: ci-pr
2+
on: [pull_request, workflow_dispatch]
3+
jobs:
4+
x64-linux-gcc:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v4
8+
- name: init
9+
run: uname -m; sudo apt install -yqq ninja-build
10+
- name: configure
11+
run: cmake -S . --preset=ninja-gcc -B build -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14
12+
- name: build debug
13+
run: cmake --build build --config=Debug -- -v
14+
- name: build release
15+
run: cmake --build build --config=Release -- -v
16+
- name: test debug
17+
run: cd build && ctest -V -C Debug
18+
- name: test release
19+
run: cd build && ctest -V -C Release
20+
x64-linux-clang:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: init
25+
run: |
26+
uname -m
27+
sudo apt update -yqq && sudo apt install -yqq clang-19 ninja-build
28+
sudo update-alternatives --remove-all clang++
29+
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 10
30+
- name: configure
31+
run: cmake -S . --preset=ninja-clang -B build
32+
- name: build debug
33+
run: cmake --build build --config=Debug -- -v
34+
- name: build release
35+
run: cmake --build build --config=Release -- -v
36+
- name: test debug
37+
run: cd build && ctest -V -C Debug
38+
- name: test release
39+
run: cd build && ctest -V -C Release
40+
arm64-linux-gcc:
41+
runs-on: ubuntu-24.04-arm
42+
steps:
43+
- uses: actions/checkout@v4
44+
- name: init
45+
run: uname -m
46+
- name: configure
47+
run: cmake -S . --preset=ninja-gcc -B build -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14
48+
- name: build debug
49+
run: cmake --build build --config=Debug -- -v
50+
- name: build release
51+
run: cmake --build build --config=Release -- -v
52+
- name: test debug
53+
run: cd build && ctest -V -C Debug
54+
- name: test release
55+
run: cd build && ctest -V -C Release
56+
arm64-linux-clang:
57+
runs-on: ubuntu-24.04-arm
58+
steps:
59+
- uses: actions/checkout@v4
60+
- name: init
61+
run: |
62+
uname -m
63+
sudo apt update -yqq && sudo apt install -yqq clang-19 ninja-build
64+
sudo update-alternatives --remove-all clang++
65+
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 10
66+
- name: configure
67+
run: cmake -S . --preset=ninja-clang -B build
68+
- name: build debug
69+
run: cmake --build build --config=Debug -- -v
70+
- name: build release
71+
run: cmake --build build --config=Release -- -v
72+
- name: test debug
73+
run: cd build && ctest -V -C Debug
74+
- name: test release
75+
run: cd build && ctest -V -C Release
76+
x64-windows-vs22:
77+
runs-on: windows-latest
78+
steps:
79+
- uses: actions/checkout@v4
80+
- name: configure
81+
run: cmake -S . --preset=vs22 -B build
82+
- name: build debug
83+
run: cmake --build build --config=Debug --parallel
84+
- name: build release
85+
run: cmake --build build --config=Release --parallel
86+
- name: test debug
87+
run: cd build && ctest -V -C Debug
88+
- name: test release
89+
run: cd build && ctest -V -C Release
90+
x64-windows-clang:
91+
runs-on: windows-latest
92+
steps:
93+
- uses: actions/checkout@v4
94+
- name: init
95+
run: choco install ninja
96+
- name: configure
97+
run: cmake -S . --preset=ninja-clang -B clang
98+
- name: build debug
99+
run: cmake --build clang --config=Debug -- -v
100+
- name: build release
101+
run: cmake --build clang --config=Release -- -v
102+
- name: test debug
103+
run: cd clang && ctest -V -C Debug
104+
- name: test release
105+
run: cd clang && ctest -V -C Release

0 commit comments

Comments
 (0)