Skip to content

Commit

Permalink
CI: replace actions-rs/install with cargo install
Browse files Browse the repository at this point in the history
  • Loading branch information
miles170 committed Nov 19, 2022
1 parent 6b5f5bd commit 7e5b387
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 28 deletions.
27 changes: 4 additions & 23 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@ jobs:
rustup default nightly
- uses: Swatinem/rust-cache@v2
- name: Install `cargo-udeps`
uses: actions-rs/[email protected]
with:
crate: cargo-udeps
version: latest
use-tool-cache: false
run: cargo install cargo-udeps
env:
RUSTUP_TOOLCHAIN: stable
- name: Detect unused dependencies
Expand Down Expand Up @@ -1016,22 +1012,7 @@ jobs:
# RUSTUP_TOOLCHAIN: ${{ steps.vars.outputs.TOOLCHAIN }}
- name: "`grcov` ~ install"
id: build_grcov
shell: bash
run: |
git clone https://github.com/mozilla/grcov.git ~/grcov/
cd ~/grcov
# Hardcode the version of crossbeam-epoch. See
# https://github.com/uutils/coreutils/issues/3680
sed -i -e "s|tempfile =|crossbeam-epoch = \"=0.9.8\"\ntempfile =|" Cargo.toml
cargo install --path .
cd -
# Uncomment when the upstream issue
# https://github.com/mozilla/grcov/issues/849 is fixed
# uses: actions-rs/[email protected]
# with:
# crate: grcov
# version: latest
# use-tool-cache: false
run: cargo install grcov
- name: Generate coverage data (via `grcov`)
id: coverage
shell: bash
Expand All @@ -1043,9 +1024,9 @@ jobs:
# GRCOV_EXCLUDE_OPTION='--excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()"' ## `grcov` ignores these params when passed as an environment variable (why?)
mkdir -p "${COVERAGE_REPORT_DIR}"
# display coverage files
~/.cargo/bin/grcov . --output-types files --ignore build.rs --ignore "vendor/*" --ignore "/*" --ignore "[a-zA-Z]:/*" --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()" | sort --unique
~/.cargo/bin/grcov . --output-type files --ignore build.rs --ignore "vendor/*" --ignore "/*" --ignore "[a-zA-Z]:/*" --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()" | sort --unique
# generate coverage report
~/.cargo/bin/grcov . --output-types lcov --output-path "${COVERAGE_REPORT_FILE}" --branch --ignore build.rs --ignore "vendor/*" --ignore "/*" --ignore "[a-zA-Z]:/*" --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()"
~/.cargo/bin/grcov . --output-type lcov --output-path "${COVERAGE_REPORT_FILE}" --branch --ignore build.rs --ignore "vendor/*" --ignore "/*" --ignore "[a-zA-Z]:/*" --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()"
echo "report=${COVERAGE_REPORT_FILE}" >> $GITHUB_OUTPUT
- name: Upload coverage results (to Codecov.io)
uses: codecov/codecov-action@v3
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/GnuTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,7 @@ jobs:
- name: Run GNU tests
run: bash uutils/util/run-gnu-test.sh
- name: "`grcov` ~ install"
uses: actions-rs/[email protected]
with:
crate: grcov
version: latest
use-tool-cache: false
run: cargo install grcov
- name: Generate coverage data (via `grcov`)
id: coverage
run: |
Expand Down

0 comments on commit 7e5b387

Please sign in to comment.