Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pipeline download failures #318

Merged
merged 1 commit into from
Jul 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
toolchain: nightly-2021-07-05
override: true
components: llvm-tools-preview
- uses: actions-rs/install@v0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
toolchain: nightly-2021-07-05
override: true
components: rustfmt
- name: core fmt check
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/scripts/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ set -e
rm -rf coverage
mkdir coverage

NIGHTLY="+nightly-2021-07-05"

# Run tests with profiling instrumentation
echo "Running instrumented unit tests..."
RUSTFLAGS="-Zinstrument-coverage" LLVM_PROFILE_FILE="identity-%m.profraw" cargo +nightly test --tests --all --all-features
RUSTFLAGS="-Zinstrument-coverage" LLVM_PROFILE_FILE="identity-%m.profraw" cargo $NIGHTLY test --tests --all --all-features

# Merge all .profraw files into "identity.profdata"
echo "Merging coverage data..."
Expand All @@ -18,7 +20,7 @@ do
PROFRAW="${PROFRAW} $file"
done

cargo +nightly profdata -- merge ${PROFRAW} -o identity.profdata
cargo $NIGHTLY profdata -- merge ${PROFRAW} -o identity.profdata

# List the test binaries
echo "Locating test binaries..."
Expand All @@ -27,7 +29,7 @@ BINARIES=""
for file in \
$( \
RUSTFLAGS="-Zinstrument-coverage" \
cargo +nightly test --tests --all --all-features --no-run --message-format=json \
cargo $NIGHTLY test --tests --all --all-features --no-run --message-format=json \
| jq -r "select(.profile.test == true) | .filenames[]" \
| grep -v dSYM - \
); \
Expand All @@ -38,7 +40,7 @@ done

# Generate and export the coverage report to lcov format
echo "Generating lcov file..."
cargo +nightly cov -- export ${BINARIES} \
cargo $NIGHTLY cov -- export ${BINARIES} \
--instr-profile=identity.profdata \
--ignore-filename-regex="/.cargo|rustc|target|tests|/.rustup" \
--format=lcov --Xdemangler=rustfilt \
Expand Down