Skip to content

Commit

Permalink
Use mold for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed May 22, 2024
1 parent cad93fa commit 22cea07
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
codecov: codecov/codecov@3.2.5
codecov: codecov/codecov@4.1.0
win: circleci/windows@5.0

commands:
Expand Down Expand Up @@ -1089,13 +1089,18 @@ jobs:

coverage:
docker:
- image: rust:1.74.0
- image: rust:1.78.0-alpine3.19
environment:
# Limit the number of parallel jobs to avoid OOM crashes during doc testing
RUST_TEST_THREADS: 8
resource_class: medium+
steps:
- checkout
- run:
name: Install necessary packages
command: |
apk update
apk add mold clang curl coreutils gnupg
- run:
name: Install grcov
command: |
Expand All @@ -1114,8 +1119,11 @@ jobs:
grcov . -s packages/std --binary-path ./target/debug -t lcov -o ./reports/std.info
grcov . -s packages/vm --binary-path ./target/debug -t lcov -o ./reports/vm.info
environment:
RUSTFLAGS: "-Cinstrument-coverage"
RUSTFLAGS: "-Clinker=clang -Clink-arg=-fuse-ld=/usr/bin/mold -Cinstrument-coverage"
LLVM_PROFILE_FILE: "cosmwasm-%p-%m.profraw"
- run:
name: Quick fix for GPG error in Codecov
command: mkdir -p ~/.gnupg
- codecov/upload:
file: reports/core.info
flags: cosmwasm-core
Expand Down

0 comments on commit 22cea07

Please sign in to comment.