diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4265eef1..70901abe 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -59,6 +59,12 @@ jobs: override: true components: llvm-tools-preview + - name: Set up MinGW + uses: egor-tensin/setup-mingw@v2 + with: + platform: x64 + cc: false + - name: Run cargo clean run: | cargo clean diff --git a/coverage.sh b/coverage.sh index 7b900f4c..cfc180d3 100644 --- a/coverage.sh +++ b/coverage.sh @@ -2,9 +2,10 @@ export LLVM_PROFILE_FILE="cargo-c-%p-%m.profraw" export RUSTFLAGS=-Cinstrument-coverage export CARGO_INCREMENTAL=0 -rustup target add x86_64-pc-windows-gnu +rustup default stable cargo build cargo test +rustup target add x86_64-pc-windows-gnu unset RUSTFLAGS for project in example-project example-workspace; do @@ -23,7 +24,7 @@ for project in example-project example-workspace; do target/debug/cargo-cinstall cinstall --manifest-path=${project}/Cargo.toml --destdir=/tmp/staging target/debug/cargo-cinstall cinstall clean --manifest-path=${project}/Cargo.toml - target/debug/cargo-cinstall cinstall --manifest-path=${project}/Cargo.toml --destdir=/tmp/staging-win --target=x86_64-pc-windows-gnu + target/debug/cargo-cinstall cinstall --manifest-path=${project}/Cargo.toml --destdir=/tmp/staging-win --target=x86_64-pc-windows-gnu --dlltool=x86_64-w64-mingw32-dlltool done grcov . --binary-path target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../**' --ignore '/*' -o coverage.lcov