@@ -142,36 +142,21 @@ jobs:
142142 [[ `php-config --version` == ${{ matrix.flag.php_version }}.* ]] || exit 1;
143143
144144 - name : Install Rust
145- uses : actions-rs/toolchain@v1
146- with :
147- toolchain : ${{ env.RUST_STABLE_TOOLCHAIN }}
148- override : true
149- components : clippy
145+ run : |
146+ rustup toolchain add --profile=minimal --component clippy $RUST_STABLE_TOOLCHAIN
147+ rustup override set $RUST_STABLE_TOOLCHAIN
150148
151- - name : Setup cargo cache
152- uses : actions/cache@v3
149+ - uses : Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
153150 with :
154- path : |
155- ~/.cargo/bin/
156- ~/.cargo/registry/index/
157- ~/.cargo/registry/cache/
158- ~/.cargo/git/db/
159- target/
160- key : ${{ matrix.os }}-test-${{ matrix.flag.php_version }}-${{ hashFiles('**/Cargo.lock') }}
151+ key : ${{ matrix.os }}-test-${{ matrix.flag.php_version }}
161152
162153 - name : Cargo clippy
163- uses : actions-rs/cargo@v1
164- with :
165- toolchain : ${{ env.RUST_STABLE_TOOLCHAIN }}
166- command : clippy
167- args : --release --workspace ${{ matrix.flag.cargo_features }}
154+ run : |
155+ cargo clippy --release --workspace ${{ matrix.flag.cargo_features }}
168156
169157 - name : Cargo build
170- uses : actions-rs/cargo@v1
171- with :
172- toolchain : ${{ env.RUST_STABLE_TOOLCHAIN }}
173- command : build
174- args : --release --workspace ${{ matrix.flag.cargo_features }}
158+ run : |
159+ cargo build --release --workspace ${{ matrix.flag.cargo_features }}
175160
176161 - name : Composer install
177162 run : composer install --working-dir=tests/php
@@ -202,11 +187,8 @@ jobs:
202187 # Try cargo test.
203188 - name : Cargo test
204189 id : cargo-test-step
205- uses : actions-rs/cargo@v1
206- with :
207- toolchain : ${{ env.RUST_STABLE_TOOLCHAIN }}
208- command : test
209- args : --release --workspace ${{ matrix.flag.cargo_features }}
190+ run : |
191+ cargo test --release --workspace ${{ matrix.flag.cargo_features }}
210192 env :
211193 ENABLE_ZEND_OBSERVER : ${{ matrix.flag.enable_zend_observer }}
212194 continue-on-error : true
@@ -226,11 +208,8 @@ jobs:
226208 # Retry cargo test.
227209 - name : Cargo test
228210 if : steps.cargo-test-step.outcome != 'success'
229- uses : actions-rs/cargo@v1
230- with :
231- toolchain : ${{ env.RUST_STABLE_TOOLCHAIN }}
232- command : test
233- args : --release --workspace
211+ run : |
212+ cargo test --release --workspace
234213 env :
235214 ENABLE_ZEND_OBSERVER : ${{ matrix.flag.enable_zend_observer }}
236215
@@ -256,15 +235,10 @@ jobs:
256235 submodules : " recursive"
257236
258237 - name : Install Rust Nightly
259- uses : actions-rs/toolchain@v1
260- with :
261- toolchain : ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
262- override : true
263- components : rustfmt
238+ run : |
239+ rustup toolchain add --profile=minimal --component rustfmt $RUST_NIGHTLY_TOOLCHAIN
240+ rustup override set $RUST_NIGHTLY_TOOLCHAIN
264241
265242 - name : Cargo fmt
266- uses : actions-rs/cargo@v1
267- with :
268- toolchain : ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
269- command : fmt
270- args : --all -- --check
243+ run : |
244+ cargo fmt --all -- --check
0 commit comments