Skip to content

added separate tests #1

added separate tests

added separate tests #1

name: CMake Build for GNU/Linux
on:
push:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Cache CMake builds
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/build
key: ${{ runner.os }}-build-${{ hashFiles('**/CMakeLists.txt', '**/*.cpp', '**/*.h') }}
restore-keys: |
${{ runner.os }}-build-
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y wayland-protocols
- name: Configure CMake
run: cmake -B build -DCMAKE_CXX_COMPILER=gcc -DCMAKE_C_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release -DRN_ENABLE_SANITIZER=OFF -DRN_BUILD_TESTS=ON -S .
working-directory: ${{ github.workspace }}
- name: Build
run: cmake --build build --config Release
working-directory: ${{ github.workspace }}
- name: Run Tests
run: ctest -C Release --output-on-failure
working-directory: ${{ github.workspace }}/build
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: Test Results
path: ${{ github.workspace }}/build/Testing/**/*.xml