More midi2 work #786
Workflow file for this run
This file contains hidden or 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: Coverage | |
| on: | |
| push: | |
| paths: | |
| - "CMakeLists.txt" | |
| - "codecov.yml" | |
| - "**/workflows/coverage.yml" | |
| - "**/cmake/**" | |
| - "**/modules/**" | |
| - "**/tests/**" | |
| - "!**/native/generated/**" | |
| - "!**/native/java*/**" | |
| - "!**/native/*_android.*" | |
| - "!**/native/*_apple.*" | |
| - "!**/native/*_emscripten.*" | |
| - "!**/native/*_ios.*" | |
| - "!**/native/*_mac.*" | |
| - "!**/native/*_wasm.*" | |
| - "!**/native/*_windows.*" | |
| branches: | |
| - "**" | |
| pull_request: | |
| paths: | |
| - "CMakeLists.txt" | |
| - "codecov.yml" | |
| - "**/workflows/coverage.yml" | |
| - "**/cmake/**" | |
| - "**/modules/**" | |
| - "**/tests/**" | |
| - "!**/native/generated/**" | |
| - "!**/native/java*/**" | |
| - "!**/native/*_android.*" | |
| - "!**/native/*_apple.*" | |
| - "!**/native/*_emscripten.*" | |
| - "!**/native/*_ios.*" | |
| - "!**/native/*_mac.*" | |
| - "!**/native/*_wasm.*" | |
| - "!**/native/*_windows.*" | |
| branches: | |
| - main | |
| - "dev/**" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| INSTALL_DEPS: >- | |
| libasound2-dev libjack-jackd2-dev ladspa-sdk libcurl4-openssl-dev libfreetype6-dev | |
| libx11-dev libxcomposite-dev libxcursor-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev | |
| libxrandr-dev libxrender-dev libglu1-mesa-dev libegl1-mesa-dev mesa-common-dev lcov | |
| IGNORE_ERRORS: "mismatch,gcov,source,negative,unused,empty,format,corrupt" | |
| jobs: | |
| cpp-coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Dependencies | |
| run: sudo apt-get update && sudo apt-get install -y ${INSTALL_DEPS} | |
| - name: Configure CMake with Coverage | |
| run: | | |
| cmake ${{ github.workspace }} -B ${{ runner.workspace }}/build \ | |
| -G "Ninja Multi-Config" \ | |
| -DYUP_BUILD_TESTS=ON \ | |
| -DYUP_BUILD_EXAMPLES=OFF \ | |
| -DYUP_ENABLE_COVERAGE=ON \ | |
| -DCMAKE_BUILD_TYPE=Debug | |
| - name: Build Tests | |
| working-directory: ${{ runner.workspace }}/build | |
| run: cmake --build . --config Debug --target yup_tests | |
| - name: Clean Coverage Data | |
| working-directory: ${{ runner.workspace }}/build | |
| run: cmake --build . --target coverage_clean | |
| - name: Run C++ Tests | |
| working-directory: ${{ runner.workspace }}/build/tests/Debug | |
| run: ./yup_tests --gtest_output=xml:test_results.xml | |
| - name: Generate C++ Coverage Report | |
| working-directory: ${{ runner.workspace }}/build | |
| run: | | |
| mkdir -p coverage | |
| lcov --directory . --capture --output-file coverage/coverage.info --ignore-errors ${IGNORE_ERRORS} | |
| lcov --remove coverage/coverage.info \ | |
| "*/pybind11/*" \ | |
| "*/thirdparty/*" \ | |
| "*/build/*" \ | |
| "*/tests/*" \ | |
| "*/usr/*" \ | |
| "*/opt/*" \ | |
| "*/CMakeFiles/*" \ | |
| --output-file coverage/coverage_final.info --ignore-errors ${IGNORE_ERRORS} | |
| lcov --list coverage/coverage_final.info | |
| - name: Upload Coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ${{ runner.workspace }}/build/coverage/coverage_final.info | |
| name: overall-coverage | |
| fail_ci_if_error: false | |
| verbose: true | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results | |
| path: ${{ runner.workspace }}/build/tests/Debug/test_results.xml | |
| - name: Upload Coverage Reports | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: coverage-reports | |
| path: ${{ runner.workspace }}/build/coverage/ |