Skip to content

Commit

Permalink
Merge up
Browse files Browse the repository at this point in the history
  • Loading branch information
prozacchiwawa committed Sep 19, 2023
2 parents 5d23e94 + da046ca commit f9f59b0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,26 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- name: Install tarpaulin
run: cargo +nightly install cargo-tarpaulin
- name: Run tarpaulin
run: cargo tarpaulin --no-dead-code --engine llvm --workspace --all-features --ignore-panics --out Lcov
toolchain: stable
- name: Run for coverage
run: |
sudo apt-get update
sudo apt-get install lcov -y
rustup component add llvm-tools-preview
cargo install grcov
export RUSTFLAGS="-Cinstrument-coverage"
export LLVM_PROFILE_FILE=$(pwd)/target/clvm_tools_rs-%p-%m.profraw
export CARGO_TARGET_DIR=$(pwd)/target
cargo test --release --workspace
python -m venv venv
source venv/bin/activate
git clone https://github.com/Chia-Network/clvm_tools.git --branch=main --single-branch
pip install ./clvm_tools
pip install maturin pytest
maturin develop --release
(cd resources/tests/cmdline/tests && pytest)
grcov . --binary-path target -s . --branch --ignore-not-existing --ignore='*/.cargo/*' --ignore='*/tests/*' -o rust_cov.info
python -c 'with open("rust_cov.info") as f: lines = [l for l in f if not (l.startswith("DA:") and int(l.split(",")[1].strip()) >= 2**63)]; open("lcov.info", "w").writelines(lines)'
- name: Upload to Coveralls
uses: coverallsapp/github-action@v2
if: always()
Expand Down
4 changes: 3 additions & 1 deletion src/compiler/rename.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ fn rename_in_bodyform(
},
vs,
)?;
// First element of call is the function, which is not renamed.
// Ensure that we haven't renamed the 0th element of a call
// They exist in a separate (global) namespace of callables
// and aren't in the variable scope stack.
if !vs.is_empty() {
new_vs[0] = vs[0].clone();
}
Expand Down

0 comments on commit f9f59b0

Please sign in to comment.