Skip to content

Commit

Permalink
Fix testing cross compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
lu-zero committed Apr 19, 2022
1 parent c2af6bf commit 1952b6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/rust.yml
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions coverage.sh
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 1952b6b

Please sign in to comment.