9
9
- master
10
10
11
11
env :
12
- CARGO_TERM_COLOR : always
12
+ # For setup-rust, see https://github.com/moonrepo/setup-rust/issues/22
13
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
13
14
14
15
jobs :
15
16
test :
@@ -112,30 +113,26 @@ jobs:
112
113
echo "VK_ICD_FILENAMES=$SWIFTSHADER_DEST_DIR\vk_swiftshader_icd.json" >> $GITHUB_ENV
113
114
fi
114
115
115
- - name : Install Rust via rustup
116
- shell : bash
116
+ - name : Setup Rust
117
+ uses : moonrepo/setup-rust@v1
118
+ env :
119
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
120
+
121
+ - name : Install Rust toolchain
117
122
run : |
118
- # Install rustup if not already installed
119
- if ! command -v rustup &> /dev/null; then
120
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
121
- source "$HOME/.cargo/env"
122
- fi
123
-
124
- # Install stable toolchain with required components
125
- rustup toolchain install stable
126
- rustup component add rust-src rustc-dev llvm-tools --toolchain stable
127
123
rustup default stable
124
+ rustup update
125
+ # Install nightly toolchain with required components for cargo-gpu
126
+ rustup toolchain install nightly
127
+ rustup component add rust-src rustc-dev llvm-tools --toolchain nightly
128
128
129
129
- name : Install cargo-gpu
130
130
shell : bash
131
+ env :
132
+ RUST_LOG : debug
131
133
run : |
132
- # Ensure cargo is in PATH
133
- source "$HOME/.cargo/env" || true
134
-
135
- # Set non-interactive mode to avoid raw mode issues in CI
136
- export CARGO_TERM_COLOR=never
137
- export CI=true
138
- cargo install --git https://github.com/rust-gpu/cargo-gpu cargo-gpu
134
+ # Install cargo-gpu with locked dependencies
135
+ cargo install --git https://github.com/rust-gpu/cargo-gpu cargo-gpu --locked
139
136
140
137
- name : Cache cargo registry
141
138
uses : actions/cache@v3
@@ -148,13 +145,9 @@ jobs:
148
145
- name : Compile shaders to SPIR-V
149
146
working-directory : shaders/rust
150
147
shell : bash
148
+ env :
149
+ RUST_LOG : debug
151
150
run : |
152
- # Ensure cargo is in PATH
153
- source "$HOME/.cargo/env" || true
154
-
155
- # Set non-interactive mode for cargo-gpu
156
- export CARGO_TERM_COLOR=never
157
- export CI=true
158
151
python3 compileshaders.py
159
152
160
153
- name : Verify no uncommitted changes
0 commit comments