24
24
target : x86_64-pc-windows-msvc
25
25
- os : macOS-latest
26
26
target : x86_64-apple-darwin
27
- - os : ubuntu-24.04
28
- target : aarch64-linux-android
29
- host : x86_64-unknown-linux-gnu
30
27
runs-on : ${{ matrix.os }}
31
28
env :
32
29
RUSTUP_UNPACK_RAM : " 26214400"
42
39
- if : ${{ runner.os == 'Linux' }}
43
40
name : Linux - Install native dependencies
44
41
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
52
42
# cargo version is a random command that forces the installation of rust-toolchain
53
43
- name : install rust-toolchain
54
44
run : cargo version
@@ -60,31 +50,25 @@ jobs:
60
50
# Core crates
61
51
# Compiled in --release because cargo compiletest would otherwise compile in release again.
62
52
- name : rustc_codegen_spirv build
63
- if : ${{ matrix.target != 'aarch64-linux-android' }}
64
53
run : cargo test -p rustc_codegen_spirv --release --no-default-features --features "use-installed-tools" --no-run
65
54
66
55
- name : rustc_codegen_spirv test
67
- if : ${{ matrix.target != 'aarch64-linux-android' }}
68
56
run : cargo test -p rustc_codegen_spirv --release --no-default-features --features "use-installed-tools"
69
57
70
58
- name : workspace test
71
- if : ${{ matrix.target != 'aarch64-linux-android' }}
72
59
run : cargo test --release
73
60
74
61
# Examples
75
62
- name : cargo check examples
76
- if : ${{ matrix.target != 'aarch64-linux-android' }}
77
63
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"
78
64
79
65
- name : build example shaders
80
- if : ${{ matrix.target != 'aarch64-linux-android' }}
81
66
env :
82
67
PROFILE : release
83
68
OUT_DIR : " target/release/ci/out"
84
69
run : cargo run -p example-runner-wgpu-builder --release --no-default-features --features "use-installed-tools"
85
70
86
71
- name : build example shaders (dev aka "debug mode")
87
- if : ${{ matrix.target != 'aarch64-linux-android' }}
88
72
env :
89
73
# HACK(eddyb) see `[profile.dev]` in `Cargo.toml` for more on why
90
74
# `-Zshare-generics=off` is useful (and why it had to be moved here).
93
77
OUT_DIR : " target/debug/ci/out"
94
78
run : cargo run -p example-runner-wgpu-builder --no-default-features --features "use-installed-tools"
95
79
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
+
96
108
- name : Build WGPU Example for Android
97
- if : ${{ matrix.target == 'aarch64-linux-android' }}
98
109
shell : bash
99
110
run : |
100
111
echo "::group::Uninstall android-31"
@@ -181,7 +192,7 @@ jobs:
181
192
# to update the branch protection rules when the test matrix changes
182
193
test_success :
183
194
runs-on : ubuntu-24.04
184
- needs : [test, compiletest, difftest]
195
+ needs : [test, compiletest, difftest, android ]
185
196
steps :
186
197
- run : echo "All test jobs passed"
187
198
0 commit comments