Skip to content

Commit

Permalink
clean up the mess
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex6323 committed Oct 31, 2024
1 parent c2ed873 commit c88c669
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 27 deletions.
40 changes: 21 additions & 19 deletions .github/workflows/cargo_llvm_cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,33 @@ jobs:
- name: Update Rust toolchain
run: rustup update stable

# - name: Generate code coverage
# run: |
# cargo llvm-cov clean
# IOTA_SKIP_SIMTESTS=1 cargo +nightly llvm-cov --ignore-run-fail --branch --html nextest -vv
- name: Generate code coverage
run: |
cargo llvm-cov clean
set +e
IOTA_SKIP_SIMTESTS=1 cargo +nightly llvm-cov --ignore-run-fail --branch --html nextest
if [ -d "target/llvm-cov/html" ]; then
exit 0
else
echo "Fatal Error: Failed to create coverage report."
exit 1
fi
# - name: Pack report
# if: always()
# run: |
# if [ ! -d "target/llvm-cov/html" ]; then
# echo "Error: No coverage report created in previous step."
# exit 1
# fi
# cd target/llvm-cov/html && tar -czvf ../nextest_coverage_report.tgz ./
- name: Pack report
run: cd target/llvm-cov/html && tar -czvf ../nextest_coverage_report.tgz ./

# - name: Upload report
# uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4
# with:
# name: nextest_coverage_report.tgz
# path: ./target/llvm-cov/nextest_coverage_report.tgz
# if-no-files-found: error
# retention-days: 1
- name: Upload report
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4
with:
name: nextest_coverage_report.tgz
path: ./target/llvm-cov/nextest_coverage_report.tgz
if-no-files-found: error
retention-days: 1

- name: Generate code coverage (simtest)
run: |
git clean -fd
cargo llvm-cov clean
set +e
./scripts/simtest/codecov.sh
if [ -d "target/llvm-cov/html" ]; then
Expand Down
9 changes: 1 addition & 8 deletions scripts/simtest/codecov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ git apply ./scripts/simtest/config-patch
root_dir=$(git rev-parse --show-toplevel)
export SIMTEST_STATIC_INIT_MOVE=$root_dir"/examples/move/basics"

cargo llvm-cov clean

MSIM_WATCHDOG_TIMEOUT_MS=60000 MSIM_TEST_SEED=1 cargo +nightly llvm-cov --ignore-run-fail --branch --html nextest \
--cargo-profile simulator \
--workspace \
--exclude iota-e2e-tests \
--exclude iota-json-rpc-tests \
--exclude iota-faucet
MSIM_WATCHDOG_TIMEOUT_MS=60000 MSIM_TEST_SEED=1 cargo +nightly llvm-cov --ignore-run-fail --branch --html nextest --cargo-profile simulator

# remove the patch
git checkout .cargo/config Cargo.toml Cargo.lock

0 comments on commit c88c669

Please sign in to comment.