Skip to content

Commit 2041b60

Browse files
committed
Fix flags
1 parent e195817 commit 2041b60

File tree

1 file changed

+39
-12
lines changed

1 file changed

+39
-12
lines changed

.circleci/config.yml

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ jobs:
11891189
command: |
11901190
apk update
11911191
# needed for grcov and compiling tests
1192-
apk add --no-cache mold clang curl llvm19-dev zlib-static clang19-static
1192+
apk add --no-cache mold clang curl llvm19-dev zlib-static clang19-static lcov
11931193
- run:
11941194
name: Install cargo-llvm-cov and cargo-nextest
11951195
command: |
@@ -1212,19 +1212,46 @@ jobs:
12121212
- run:
12131213
name: Run tests with coverage
12141214
command: |
1215-
cargo llvm-cov --no-report nextest
1216-
cargo llvm-cov report --lcov --output-path lcov.info
1215+
# Generate full coverage report
1216+
cargo llvm-cov nextest --lcov --output-path lcov.info
1217+
1218+
# List of package directories and their flags
1219+
set -- \
1220+
"check:cosmwasm-check" \
1221+
"core:cosmwasm-core" \
1222+
"crypto:cosmwasm-crypto" \
1223+
"derive:cosmwasm-derive" \
1224+
"schema:cosmwasm-schema" \
1225+
"schema-derive:cosmwasm-schema-derive" \
1226+
"std:cosmwasm-std" \
1227+
"vm:cosmwasm-vm" \
1228+
"vm-derive:cosmwasm-vm-derive"
1229+
1230+
# Process each package-flag pair
1231+
for entry in "$@"; do
1232+
dir="${entry%%:*}"
1233+
flag="${entry#*:}"
1234+
1235+
echo "Processing directory: $dir with flag: $flag"
1236+
1237+
# Extract coverage for specific directory using lcov
1238+
lcov \
1239+
--ignore-errors empty,unused \
1240+
--extract lcov.info "packages/$dir/**/*" \
1241+
--output-file "lcov-$dir.info"
1242+
1243+
# Upload filtered report
1244+
./codecov upload-coverage -t "$CODECOV_TOKEN" \
1245+
--disable-search \
1246+
--git-service github \
1247+
--pr "${CIRCLE_PULL_REQUEST##*/}" \
1248+
--branch "$CIRCLE_BRANCH" \
1249+
--sha "$CIRCLE_SHA1" \
1250+
-f "lcov-$dir.info" \
1251+
-F "$flag"
1252+
done
12171253
environment:
12181254
RUSTFLAGS: "-Clinker=clang -Clink-arg=-fuse-ld=/usr/bin/mold"
1219-
- run:
1220-
name: Upload coverage to Codecov
1221-
command: |
1222-
./codecov upload-coverage -t "$CODECOV_TOKEN" \
1223-
--git-service github \
1224-
--pr ${CIRCLE_PULL_REQUEST##*/} \
1225-
--branch "$CIRCLE_BRANCH" \
1226-
--sha $CIRCLE_SHA1 \
1227-
-f lcov.info
12281255

12291256
# This job roughly follows the instructions from https://circleci.com/blog/publishing-to-github-releases-via-circleci/
12301257
build_and_upload_devcontracts:

0 commit comments

Comments
 (0)