Skip to content

Commit 08a2ce5

Browse files
Firestar99LegNeato
authored andcommitted
ci: separate out android build
1 parent d9594d1 commit 08a2ce5

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

.github/workflows/ci.yaml

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ jobs:
2424
target: x86_64-pc-windows-msvc
2525
- os: macOS-latest
2626
target: x86_64-apple-darwin
27-
- os: ubuntu-24.04
28-
target: aarch64-linux-android
29-
host: x86_64-unknown-linux-gnu
3027
runs-on: ${{ matrix.os }}
3128
env:
3229
RUSTUP_UNPACK_RAM: "26214400"
@@ -42,13 +39,6 @@ jobs:
4239
- if: ${{ runner.os == 'Linux' }}
4340
name: Linux - Install native dependencies
4441
run: sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev
45-
- if: ${{ runner.os == 'Linux' }}
46-
name: Install xvfb, llvmpipe and lavapipe
47-
run: |
48-
sudo apt-get update -y -qq
49-
sudo add-apt-repository ppa:kisak/turtle -y
50-
sudo apt-get update
51-
sudo apt install -y xvfb libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
5242
# cargo version is a random command that forces the installation of rust-toolchain
5343
- name: install rust-toolchain
5444
run: cargo version
@@ -60,31 +50,25 @@ jobs:
6050
# Core crates
6151
# Compiled in --release because cargo compiletest would otherwise compile in release again.
6252
- name: rustc_codegen_spirv build
63-
if: ${{ matrix.target != 'aarch64-linux-android' }}
6453
run: cargo test -p rustc_codegen_spirv --release --no-default-features --features "use-installed-tools" --no-run
6554

6655
- name: rustc_codegen_spirv test
67-
if: ${{ matrix.target != 'aarch64-linux-android' }}
6856
run: cargo test -p rustc_codegen_spirv --release --no-default-features --features "use-installed-tools"
6957

7058
- name: workspace test
71-
if: ${{ matrix.target != 'aarch64-linux-android' }}
7259
run: cargo test --release
7360

7461
# Examples
7562
- name: cargo check examples
76-
if: ${{ matrix.target != 'aarch64-linux-android' }}
7763
run: cargo check -p example-runner-ash -p example-runner-wgpu -p example-runner-cpu -p compute-shader -p mouse-shader -p simplest-shader -p sky-shader --no-default-features --features "use-installed-tools"
7864

7965
- name: build example shaders
80-
if: ${{ matrix.target != 'aarch64-linux-android' }}
8166
env:
8267
PROFILE: release
8368
OUT_DIR: "target/release/ci/out"
8469
run: cargo run -p example-runner-wgpu-builder --release --no-default-features --features "use-installed-tools"
8570

8671
- name: build example shaders (dev aka "debug mode")
87-
if: ${{ matrix.target != 'aarch64-linux-android' }}
8872
env:
8973
# HACK(eddyb) see `[profile.dev]` in `Cargo.toml` for more on why
9074
# `-Zshare-generics=off` is useful (and why it had to be moved here).
@@ -93,8 +77,35 @@ jobs:
9377
OUT_DIR: "target/debug/ci/out"
9478
run: cargo run -p example-runner-wgpu-builder --no-default-features --features "use-installed-tools"
9579

80+
android:
81+
name: Android
82+
strategy:
83+
matrix:
84+
include:
85+
- os: ubuntu-24.04
86+
target: aarch64-linux-android
87+
host: x86_64-unknown-linux-gnu
88+
runs-on: ${{ matrix.os }}
89+
env:
90+
RUSTUP_UNPACK_RAM: "26214400"
91+
RUSTUP_IO_THREADS: "1"
92+
steps:
93+
- uses: actions/checkout@v4
94+
# Install the spirv-tools binaries from tarballs hosted on each release
95+
# of spirv-tools. This downloads the tarball, decompresses it, unpacks
96+
# the binaries to the specified path, and adds them to PATH
97+
- name: Install spirv-tools binaries
98+
shell: bash
99+
run: cargo run --manifest-path .github/install-spirv-tools/Cargo.toml -- ${{matrix.host || matrix.target}} 0.10.0 "${{github.workspace}}/bin"
100+
# cargo version is a random command that forces the installation of rust-toolchain
101+
- name: install rust-toolchain
102+
run: cargo version
103+
# Fetch dependencies in a separate step to clearly show how long each part
104+
# of the testing takes
105+
- name: cargo fetch --locked
106+
run: cargo fetch --locked --target ${{ matrix.target }}
107+
96108
- name: Build WGPU Example for Android
97-
if: ${{ matrix.target == 'aarch64-linux-android' }}
98109
shell: bash
99110
run: |
100111
echo "::group::Uninstall android-31"
@@ -181,7 +192,7 @@ jobs:
181192
# to update the branch protection rules when the test matrix changes
182193
test_success:
183194
runs-on: ubuntu-24.04
184-
needs: [test, compiletest, difftest]
195+
needs: [test, compiletest, difftest, android]
185196
steps:
186197
- run: echo "All test jobs passed"
187198

0 commit comments

Comments
 (0)