Remove 18.04 since it is no longer supported by GitHub actions. Add 22.04. Signed-off-by: Jacob Perron <jacobmperron@gmail.com>
38 lines
905 B
YAML
38 lines
905 B
YAML
name: Build and test
|
|
|
|
on:
|
|
push:
|
|
branches: ['master']
|
|
pull_request:
|
|
|
|
env:
|
|
BUILD_TYPE: Release
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-20.04, ubuntu-22.04]
|
|
|
|
steps:
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt install build-essential cmake git libboost-system-dev libboost-thread-dev
|
|
git clone https://github.com/google/googletest.git
|
|
cd googletest
|
|
cmake CMakeLists.txt
|
|
make
|
|
sudo make install
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Configure CMake
|
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_FLAGS="-Werror"
|
|
|
|
- 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}}
|