diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 254b1a9d..80ba83af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,10 @@ jobs: - name: build (LLVM ${{ matrix.llvm_version }}) # Run the build manually in `nix develop` to keep non-outputs around run: | - nix develop .#oid-llvm${{ matrix.llvm_version }} --command cmake -B build -G Ninja -DWITH_FLAKY_TESTS=Off -DFORCE_BOOST_STATIC=Off + nix develop .#oid-llvm${{ matrix.llvm_version }} --command cmake -B build -G Ninja \ + -DWITH_FLAKY_TESTS=Off \ + -DFORCE_BOOST_STATIC=Off \ + -DCODE_COVERAGE=On nix develop .#oid-llvm${{ matrix.llvm_version }} --command ninja -C build - name: test (LLVM ${{ matrix.llvm_version }}) env: @@ -46,9 +49,29 @@ jobs: --repeat until-pass:3 \ --exclude-from-file ../../.github/workflows/tests_failing_under_nix.txt \ --output-junit results.xml + + - name: upload coverage + continue-on-error: true + uses: coverallsapp/github-action@v2 + with: + flag-name: run-${{ join(matrix.*, '-') }} + parallel: true + - name: upload results uses: actions/upload-artifact@v4 if: success() || failure() with: name: test-results-${{ matrix.llvm_version }} path: build/test/results.xml + + finalise-coverage: + needs: build-test + if: ${{ always() }} + runs-on: ubuntu-latest + steps: + - name: finalise coverage + uses: coverallsapp/github-action@v2 + with: + parallel-finished: true + carryforward: "run-15,run-16" + diff --git a/flake.nix b/flake.nix index 577a490c..6e031bab 100644 --- a/flake.nix +++ b/flake.nix @@ -108,7 +108,7 @@ in pkgs.mkShell.override { stdenv = llvmPackages.stdenv; } { inputsFrom = [ self.packages.${system}."oid-llvm${toString llvmVersion}" ]; - buildInputs = [ ]; + buildInputs = with pkgs; [ lcov ]; }; in {