6
6
7
7
name : CI
8
8
9
+ # Cancel PR actions on new commits
10
+ concurrency :
11
+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
12
+ cancel-in-progress : true
13
+
9
14
jobs :
10
15
test :
11
16
name : Test
@@ -20,52 +25,22 @@ jobs:
20
25
target : x86_64-apple-darwin
21
26
- os : ubuntu-20.04-16core
22
27
target : aarch64-linux-android
28
+ host : x86_64-unknown-linux-gnu
23
29
runs-on : ${{ matrix.os }}
24
30
env :
25
- # Get platform-specific download links from https://github.com/KhronosGroup/SPIRV-Tools/blob/master/docs/downloads.md
26
- # which will point to the `spirv-tools` Google Cloud Storage Bucket - if
27
- # you need to manually look around, you can search for `spirv_tools_version`
28
- # (which should be in the `YYYYMMDD` format and appear in paths) in these
29
- # listings (NB: they're limited to 1000 results and may need adjustment):
30
- # https://storage.googleapis.com/spirv-tools/?list-type=2&start-after=artifacts/prod/graphics_shader_compiler/spirv-tools/linux-clang-release/continuous/1800
31
- # https://storage.googleapis.com/spirv-tools/?list-type=2&start-after=artifacts/prod/graphics_shader_compiler/spirv-tools/macos-clang-release/continuous/1800
32
- # https://storage.googleapis.com/spirv-tools/?list-type=2&start-after=artifacts/prod/graphics_shader_compiler/spirv-tools/windows-msvc-2017-release/continuous/1800
33
- spirv_tools_version : " 20221024"
34
- # NOTE(eddyb) do not forget to update both the above date and below links!
35
- # FIXME(eddyb) automate this somewhat by taking advantage of the bucket APIs,
36
- # and look for the first build with the date in `spirv_tools_version`.
37
- spirv_tools_linux_url : " https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/linux-clang-release/continuous/1863/20221024-094528/install.tgz"
38
- spirv_tools_macos_url : " https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/macos-clang-release/continuous/1875/20221024-094531/install.tgz"
39
- spirv_tools_windows_url : " https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/windows-msvc-2017-release/continuous/1851/20221024-094908/install.zip"
40
31
RUSTUP_UNPACK_RAM : " 26214400"
41
32
RUSTUP_IO_THREADS : " 1"
42
33
steps :
43
- - uses : actions/checkout@v2
44
- - if : ${{ runner.os == 'Linux' }}
45
- name : Linux - Install native dependencies and spirv-tools
46
- run : |
47
- sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev
48
- mkdir "${HOME}/spirv-tools"
49
- curl -fL "$spirv_tools_linux_url" | tar -xz -C "${HOME}/spirv-tools"
50
- echo "${HOME}/spirv-tools/install/bin" >> $GITHUB_PATH
51
- - if : ${{ runner.os == 'macOS' }}
52
- name : Mac - Install spirv-tools
53
- # FIXME(eddyb) deduplicate with Linux (and maybe even Windows?).
54
- run : |
55
- mkdir "${HOME}/spirv-tools"
56
- curl -fL "$spirv_tools_macos_url" | tar -xz -C "${HOME}/spirv-tools"
57
- echo "${HOME}/spirv-tools/install/bin" >> $GITHUB_PATH
58
- - if : ${{ runner.os == 'Windows' }}
59
- name : Windows - Install spirv-tools
34
+ - uses : actions/checkout@v4
35
+ # Install the spirv-tools binaries from tarballs hosted on each release
36
+ # of spirv-tools. This downloads the tarball, decompresses it, unpacks
37
+ # the binaries to the specified path, and adds them to PATH
38
+ - name : Install spirv-tools binaries
60
39
shell : bash
61
- run : |
62
- tmparch=$(mktemp)
63
- mkdir "${HOME}/spirv-tools"
64
- curl -fL -o "$tmparch" "$spirv_tools_windows_url"
65
- unzip "$tmparch" -d "${HOME}/spirv-tools"
66
- - if : ${{ runner.os == 'Windows' }}
67
- # Runs separately to add spir-v tools to Powershell's Path.
68
- run : echo "$HOME/spirv-tools/install/bin" >> $env:GITHUB_PATH
40
+ run : cargo run --manifest-path .github/install-spirv-tools/Cargo.toml -- ${{matrix.host || matrix.target}} 0.10.0 "${{github.workspace}}/bin"
41
+ - if : ${{ runner.os == 'Linux' }}
42
+ name : Linux - Install native dependencies
43
+ run : sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev
69
44
# cargo version is a random command that forces the installation of rust-toolchain
70
45
- name : install rust-toolchain
71
46
run : cargo version
@@ -142,16 +117,13 @@ jobs:
142
117
# Note that we are explicitly NOT checking out submodules, to validate
143
118
# that we haven't accidentally enabled spirv-tools native compilation
144
119
# and regressed CI times
145
- - uses : actions/checkout@v2
120
+ - uses : actions/checkout@v4
146
121
with :
147
122
submodules : " false"
148
123
- name : Install native dependencies
149
124
run : sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev
150
125
- name : Install spirv-tools
151
- run : |
152
- mkdir "${HOME}/spirv-tools"
153
- curl -fL https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/linux-clang-release/continuous/1409/20210313-175801/install.tgz | tar -xz -C "${HOME}/spirv-tools"
154
- echo "${HOME}/spirv-tools/install/bin" >> $GITHUB_PATH
126
+ run : cargo run --manifest-path .github/install-spirv-tools/Cargo.toml -- x86_64-unknown-linux-gnu 0.10.0 "${{github.workspace}}/bin"
155
127
- name : Install rustup components
156
128
run : rustup component add rustfmt clippy
157
129
# cargo version is a random command that forces the installation of rust-toolchain
@@ -173,7 +145,7 @@ jobs:
173
145
run : .github/workflows/lint.sh
174
146
175
147
cargo-deny :
176
- runs-on : ubuntu-20 .04
148
+ runs-on : ubuntu-22 .04
177
149
steps :
178
- - uses : actions/checkout@v2
150
+ - uses : actions/checkout@v4
179
151
- uses : EmbarkStudios/cargo-deny-action@v1
0 commit comments