diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 539665dd..368f48f0 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -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