From a6294e1df410447a307da6770c4679bb4c90af30 Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Fri, 18 Dec 2020 10:44:50 +0100 Subject: [PATCH] Update spirv-tools (#351) * Split android into separate job * Bump spirv-tools to 0.3.1 --- .github/workflows/ci.yaml | 34 +++++++++++---------------- Cargo.lock | 8 +++---- crates/rustc_codegen_spirv/Cargo.toml | 2 +- 3 files changed, 19 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9ca028d48c..c7a40ec157 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,6 +18,8 @@ jobs: target: x86_64-pc-windows-msvc - os: macOS-latest target: x86_64-apple-darwin + - os: ubuntu-latest + target: aarch64-linux-android runs-on: ${{ matrix.os }} env: spirv_tools_version: "20200928" @@ -53,33 +55,25 @@ jobs: - name: cargo fetch --locked run: cargo fetch --locked --target ${{ matrix.target }} - name: Run tests + if: ${{ matrix.target != 'aarch64-linux-android' }} shell: bash run: .github/workflows/test.sh ${{ runner.os }} - - name: Install cargo-apk - run: cargo install cargo-apk - - - if: runner.os == 'Windows' - name: Create symlink to Android SDK/NDK without spaces + - name: Build WGPU Example for Android + if: ${{ matrix.target == 'aarch64-linux-android' }} + shell: bash run: | - $oldAndroidPath = $env:ANDROID_HOME - $sdk_root = "C:\Android" - New-Item -Path $sdk_root -ItemType SymbolicLink -Value $oldAndroidPath + echo "::group::Install cargo-apk" + cargo install cargo-apk + echo "::endgroup::" - echo "ANDROID_SDK_ROOT=$sdk_root" >> $env:GITHUB_ENV - echo "ANDROID_NDK_ROOT=$sdk_root\ndk-bundle" >> $env:GITHUB_ENV - - # Update legacy path for ndk-build: - echo "ANDROID_HOME=$sdk_root" >> $env:GITHUB_ENV - - # Unset legacy paths: - echo "ANDROID_NDK_HOME=" >> $env:GITHUB_ENV - echo "ANDROID_NDK_PATH=" >> $env:GITHUB_ENV - - - name: Compile WGPU example for Android - run: | + echo "::group::Add aarch64-linux-android target" rustup target add aarch64-linux-android + echo "::endgroup::" + + echo "::group::Build WGPU example for Android" cargo apk build --manifest-path examples/runners/wgpu/Cargo.toml --features use-installed-tools --no-default-features + echo "::endgroup::" lint: name: Lint diff --git a/Cargo.lock b/Cargo.lock index 6b34a9f1f6..9512832573 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2217,9 +2217,9 @@ version = "0.1.0" [[package]] name = "spirv-tools" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44be438c81cc340ce795532a7e40c0e09b7219a8b95c748a3e28ebdb1a0eb359" +checksum = "90ceb7a6ccbd753bbbde0ea344a6135058b47baf8facb324ac47202fb41c85ec" dependencies = [ "memchr", "spirv-tools-sys", @@ -2228,9 +2228,9 @@ dependencies = [ [[package]] name = "spirv-tools-sys" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe1f35217731380e8c0665c3013b63aa34fd528863f8563735e4a052a847fb52" +checksum = "dcb1ab3befe9cfd45c166b6d0487d8020eb8c3afaea3f86437bd85eef7b393d1" dependencies = [ "cc", ] diff --git a/crates/rustc_codegen_spirv/Cargo.toml b/crates/rustc_codegen_spirv/Cargo.toml index 82ae1278b8..ad039312d4 100644 --- a/crates/rustc_codegen_spirv/Cargo.toml +++ b/crates/rustc_codegen_spirv/Cargo.toml @@ -33,7 +33,7 @@ rspirv = { git = "https://github.com/gfx-rs/rspirv.git", rev = "01ca0d2e5b667a0e rustc-demangle = "0.1.18" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -spirv-tools = { version = "0.2.0", default-features = false } +spirv-tools = { version = "0.3.0", default-features = false } tar = "0.4.30" topological-sort = "0.1"