Skip to content

Commit

Permalink
add test workflow (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
matcool authored Nov 11, 2024
1 parent 697174f commit 418b218
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_size = 2
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and test

on:
push:
branches: "**"
pull_request:
branches: "**"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: seanmiddleditch/gha-setup-ninja@v4

- name: Install GCC 12
run: |
sudo apt install -y gcc-12 g++-12
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
- name: Configure CMake
run: cmake -B build -G Ninja

- name: Build
run: cmake --build build --parallel

- name: Test
working-directory: build/test
run: ctest

0 comments on commit 418b218

Please sign in to comment.