mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-05-15 12:07:32 +00:00
50 lines
1.5 KiB
YAML
50 lines
1.5 KiB
YAML
name: Testing current commit
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- CPU
|
|
- PPU
|
|
- APU
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
Testing:
|
|
runs-on: [ubuntu-18.04]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: '3.x'
|
|
- name: Install the SFML.
|
|
run: sudo apt-get update &&
|
|
sudo apt-get install --yes libsfml-dev qt5-default
|
|
- name: Install Criterion
|
|
run: git clone --recursive https://github.com/Snaipe/Criterion &&
|
|
cd Criterion &&
|
|
sudo apt install --yes ninja-build &&
|
|
pip3 install meson &&
|
|
meson build &&
|
|
ninja -C build &&
|
|
sudo ninja -C build install &&
|
|
sudo cp -r /usr/local/lib/x86_64-linux-gnu/libcriterion* /usr/lib
|
|
- name: Install Gcovr
|
|
run: python -m pip install --upgrade pip gcovr
|
|
- name: Update G++
|
|
run: sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100
|
|
- name: Build Makefile with CMake
|
|
run: mkdir -p build && cd build && cmake ..
|
|
- name: Build with Makefile
|
|
run: make -C build unit_tests
|
|
- name: Execute tests
|
|
run: cd build && ./unit_tests
|
|
- name: Output coverage
|
|
run: gcovr -e tests/ -o coverage.xml --xml
|
|
- name: Publish to CodeCov
|
|
run: bash <(curl -s https://codecov.io/bash) -f coverage.xml -t ${{ secrets.CODECOV_TOKEN }} || echo "Codecov did not collect coverage reports"
|