Skip to content

add test workflow (#6) #3

add test workflow (#6)

add test workflow (#6) #3

Workflow file for this run

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