From a5fc04616112ca6ec425873d6d64e828be19076e Mon Sep 17 00:00:00 2001 From: Afonso Bordado Date: Mon, 9 Jan 2023 14:46:19 +0000 Subject: [PATCH] wasmtime: Add Android AArch64 Check (#5507) We accidentally broke the build for Android when introducing the jit-icache-coherence crate. To avoid this happening again, add a check job just to ensure that it can build. See #5323 and #5331 for context. --- .github/workflows/main.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bd93d98ce1..be04a26f4c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -135,6 +135,8 @@ jobs: checks: name: Check runs-on: ubuntu-latest + env: + CARGO_NDK_VERSION: 2.12.2 steps: - uses: actions/checkout@v3 with: @@ -177,6 +179,18 @@ jobs: - run: rustup target add x86_64-unknown-freebsd - run: cargo check -p wasmtime --no-default-features --features cranelift,wat,async,cache --target x86_64-unknown-freebsd + # Check whether `wasmtime` cross-compiles to aarch64-linux-android + - run: rustup target add aarch64-linux-android + - name: Setup Android SDK + uses: android-actions/setup-android@v2 + - uses: actions/cache@v3 + with: + path: ${{ runner.tool_cache }}/cargo-ndk + key: cargo-ndk-bin-${{ env.CARGO_NDK_VERSION }} + - run: echo "${{ runner.tool_cache }}/cargo-ndk/bin" >> $GITHUB_PATH + - run: cargo install --root ${{ runner.tool_cache }}/cargo-ndk --version ${{ env.CARGO_NDK_VERSION }} cargo-ndk + - run: cargo ndk -t arm64-v8a check -p wasmtime + # Check whether `wasmtime` cross-compiles to aarch64-pc-windows-msvc # We don't build nor test it because it lacks trap handling. # Tracking issue: https://github.com/bytecodealliance/wasmtime/issues/4992