From 442e175b57d8f532416d2be934d008ba7c05faaa Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Mon, 16 Oct 2023 19:26:47 +0200 Subject: [PATCH] .github/workflows/ci.yml: exercise cargo test on Windows on ARM. --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c81780a..c6e7b832 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,6 +91,16 @@ jobs: echo '--- dry-run publish' echo ./publish.sh --dry-run + elif [ $OSTYPE = "msys" ]; then + echo '-- build aarch64-pc-windows-msvc' + echo + rustup target add aarch64-pc-windows-msvc + mkdir .cargo + echo '[patch.crates-io]' > .cargo/config.toml + echo 'cc = { git = "https://github.com/rust-lang/cc-rs" }' >> .cargo/config.toml + cargo test --release --target=aarch64-pc-windows-msvc --no-run + find target/aarch64-pc-windows-msvc -name blst-\*.exe -exec cp {} blst-arm-test.exe \; -quit + cargo clean -p blst --release --target=aarch64-pc-windows-msvc fi cargo clean -p blst cargo clean -p blst --release @@ -111,6 +121,30 @@ jobs: cd bindings/go go test -test.v + - uses: actions/upload-artifact@v3 + if: ${{ runner.os == 'Windows' }} + with: + name: blst-arm-test.exe + path: bindings/rust/blst-arm-test.exe + if-no-files-found: ignore + + cargo-test-windows-on-arm: + runs-on: ubuntu-latest + needs: rust-n-go + + steps: + - uses: actions/download-artifact@v3 + with: + name: blst-arm-test.exe + + - name: wine-arm64 + uses: addnab/docker-run-action@v3 + with: + registry: https://index.docker.io/v1/ + image: linaro/wine-arm64 + options: --volume ${{ github.workspace }}:/blst --network=none + run: wine-arm64 cmd /c "cd \ && \blst\blst-arm-test.exe" + misc-ubuntu-latest: runs-on: ubuntu-latest