30 lines
705 B
YAML
30 lines
705 B
YAML
name: Build and test
|
|
|
|
on:
|
|
push:
|
|
branches: ["master"]
|
|
pull_request:
|
|
|
|
env:
|
|
BUILD_TYPE: Release
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-24.04
|
|
|
|
steps:
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt install build-essential cmake git libboost-system-dev libboost-thread-dev file libgtest-dev googletest
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Configure CMake
|
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
|
|
|
- name: Build
|
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
|
|
|
- name: Test
|
|
working-directory: ${{github.workspace}}/build
|
|
run: ctest -C ${{env.BUILD_TYPE}}
|