Skip to content

Add benchmarks to GitHub Actions #79

Add benchmarks to GitHub Actions

Add benchmarks to GitHub Actions #79

Workflow file for this run

name: Tests
on: [push, pull_request, workflow_dispatch]
env:
CTEST_OUTPUT_ON_FAILURE: ON
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install packages
run: |
sudo apt install gcc-12 g++-12 lcov
# remove old symlinks
sudo rm /usr/bin/gcc
sudo rm /usr/bin/g++
sudo rm /usr/bin/gcov
# create new symlinks
sudo ln -s /usr/bin/gcc-12 /usr/bin/gcc
sudo ln -s /usr/bin/g++-12 /usr/bin/g++
sudo ln -s /usr/bin/gcov-12 /usr/bin/gcov
- name: Build project
run: |
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Coverage ..
make -j$(nproc) wisnia wisnia-tests wisnia-coverage
- name: Collect code coverage
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -f build/wisnia-coverage.info