Skip to content

Commit

Permalink
Updated codecov coverage workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
spirosmaggioros committed Aug 1, 2024
1 parent 80af19f commit 95ec40b
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,23 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Download requirements
run: sudo pip3 install xcrun --break-system-packages && sudo pip3 install gcovr --break-system-packages && brew install lcov libxrandr libxcursor libuv openal-soft flac libvorbis mesa freeglut
- name: Install dependencies
if: runner.os == 'Linux'
run: sudo apt-get install -o Acquire::Retries=3 lcov

- name: Create build directory
run: cmake -E make_directory ${{runner.workspace}}/build

run: pip install -r requirements.txt
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD -DENABLE_COVERAGE=true

# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_COVERAGE=true
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE

- name: Run
working-directory: ${{runner.workspace}}/build
shell: bash
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --output-on-failure

- name: Coverage
Expand Down

0 comments on commit 95ec40b

Please sign in to comment.