diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 90a6fad1f..4def70d9c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,37 +56,3 @@ jobs: run: cmake --build build/${{ matrix.preset }} -j8 - name: Run tests run: ctest --test-dir build/${{ matrix.preset }} --output-on-failure --no-tests=error -j8 - - linux-coverage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Install dependencies - run: | - sudo add-apt-repository ppa:ubuntu-toolchain-r/test - sudo apt-get update - sudo apt-get install -y g++-14 - wget https://github.com/linux-test-project/lcov/releases/download/v2.3/lcov-2.3.tar.gz - tar -xvf lcov-2.3.tar.gz - cd lcov-2.3 - sudo make install - sudo cpan App::cpanminus - sudo cpanm --notest Capture::Tiny DateTime - - name: Configure - run: cmake --preset=ci-coverage - - name: Build - run: cmake --build build/ci-coverage -j8 - - name: Run tests - run: ctest --test-dir build/ci-coverage --output-on-failure --no-tests=error -j8 - - name: Process coverage info - run: cmake --build build/ci-coverage -t coverage - - name: Submit to codecov.io - uses: codecov/codecov-action@v5 - with: - files: build/ci-coverage/coverage.info - plugins: noop - disable_search: true - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 000000000..b155f779b --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,42 @@ +name: Coverage + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + linux-coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install dependencies + run: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + sudo apt-get update + sudo apt-get install -y g++-14 + wget https://github.com/linux-test-project/lcov/releases/download/v2.3/lcov-2.3.tar.gz + tar -xvf lcov-2.3.tar.gz + cd lcov-2.3 + sudo make install + sudo cpan App::cpanminus + sudo cpanm --notest Capture::Tiny DateTime + - name: Configure + run: cmake --preset=ci-coverage + - name: Build + run: cmake --build build/ci-coverage -j8 + - name: Run tests + run: ctest --test-dir build/ci-coverage --output-on-failure --no-tests=error -j8 + - name: Process coverage info + run: cmake --build build/ci-coverage -t coverage + - name: Submit to codecov.io + uses: codecov/codecov-action@v5 + with: + files: build/ci-coverage/coverage.info + plugins: noop + disable_search: true + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true