Skip to content

Commit 418b218

Browse files
authored
add test workflow (#6)
1 parent 697174f commit 418b218

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ end_of_line = lf
1010
charset = utf-8
1111
trim_trailing_whitespace = true
1212
insert_final_newline = true
13+
14+
[*.yml]
15+
indent_size = 2

.github/workflows/test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build and test
2+
3+
on:
4+
push:
5+
branches: "**"
6+
pull_request:
7+
branches: "**"
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- uses: seanmiddleditch/gha-setup-ninja@v4
17+
18+
- name: Install GCC 12
19+
run: |
20+
sudo apt install -y gcc-12 g++-12
21+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
22+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
23+
24+
- name: Configure CMake
25+
run: cmake -B build -G Ninja
26+
27+
- name: Build
28+
run: cmake --build build --parallel
29+
30+
- name: Test
31+
working-directory: build/test
32+
run: ctest

0 commit comments

Comments
 (0)