Skip to content

Commit

Permalink
fix: download grcov from releases, WAY faster
Browse files Browse the repository at this point in the history
  • Loading branch information
kristof-mattei committed Oct 30, 2021
1 parent a5bc70b commit 9a8c19b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,24 @@ jobs:
${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ hashFiles('Cargo.lock') }}-
${{ runner.os }}-build-${{ env.CACHE_NAME }}-
- name: Set up NPM to install package to set up crane toolchain
shell: bash
run: |
npm install @actions/tool-cache
- name: Download crane tar, extract, and add folder to path.
uses: actions/github-script@v5
with:
script: |
const tc = require("@actions/tool-cache");
const urlToGrcovTar = "https://github.com/mozilla/grcov/releases/download/v0.8.2/grcov-linux-x86_64.tar.bz2";
const grcovTarPath = await tc.downloadTool(urlToGrcovTar);
const craneExtractedFolder = await tc.extractTar(grcovTarPath);
core.addPath(craneExtractedFolder);
- name: Generate test result and coverage report
run: |
cargo install cargo2junit grcov;
cargo install cargo2junit;
cargo test ${CARGO_OPTIONS} -- -Z unstable-options --format json | cargo2junit > results.xml;
zip -0 ccov.zip `find . \( -name "${PROJECT_NAME_UNDERSCORE}*.gc*" \) -print`;
grcov ccov.zip -s . -t lcov --llvm --ignore-not-existing --ignore "/*" --ignore "tests/*" -o lcov.info;
Expand Down

0 comments on commit 9a8c19b

Please sign in to comment.