This repository has been archived by the owner on Jun 29, 2024. It is now read-only.
fix: Remove install directive in CMakeLists #350
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build: | |
name: Build & Run | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Install LLVM | |
uses: KyleMayes/install-llvm-action@v2 | |
with: | |
version: "15" | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release | |
- name: Build | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: cmake --build ${{github.workspace}}/build | |
- name: Install | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: sudo cmake --install ${{github.workspace}}/build | |
- name: Show version and help | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
filc | |
filc version | |
unit-tests: | |
name: Unit tests | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup LCOV | |
uses: hrishikesh-kadam/setup-lcov@v1 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Install LLVM | |
uses: KyleMayes/install-llvm-action@v2 | |
with: | |
version: "15" | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DCODE_COVERAGE=ON | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --target unit-tests | |
- name: Run tests | |
run: cd ${{github.workspace}}/build && ctest -L unit --output-on-failure | |
- name: Generate coverage report | |
run: ${{github.workspace}}/bin/generate_coverage.sh | |
- name: Upload coverage report to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ${{github.workspace}}/coverage.info | |
- name: Upload coverage report to Codacy | |
uses: codacy/codacy-coverage-reporter-action@v1 | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: ${{github.workspace}}/coverage.info | |
cppcheck: | |
if: github.event_name != 'pull_request' | |
name: Static Analysis | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: cppcheck | |
uses: deep5050/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN}} | |
std: c++17 | |
force_language: c++ | |
e2e-tests: | |
name: e2e tests | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Install LLVM | |
uses: KyleMayes/install-llvm-action@v2 | |
with: | |
version: "15" | |
- name: Install valgrind | |
run: sudo apt update && sudo apt install -y valgrind | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --target e2e-tests | |
- name: Run tests | |
run: cd ${{github.workspace}}/build && ctest -L e2e --output-on-failure |