From cccae12a2de9629931527dcecd38dd3b68a8f5d9 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Tue, 10 Jun 2025 15:23:45 +0200 Subject: [PATCH 1/3] Replace actions-rs actions --- .github/workflows/rust.yml | 62 +++++++++++--------------------------- 1 file changed, 18 insertions(+), 44 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e78f66c..e53516c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -142,36 +142,21 @@ jobs: [[ `php-config --version` == ${{ matrix.flag.php_version }}.* ]] || exit 1; - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ env.RUST_STABLE_TOOLCHAIN }} - override: true - components: clippy + run: | + rustup toolchain add --profile=minimal $RUST_STABLE_TOOLCHAIN + rustup override set $RUST_STABLE_TOOLCHAIN - - name: Setup cargo cache - uses: actions/cache@v3 + - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8 with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ matrix.os }}-test-${{ matrix.flag.php_version }}-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.os }}-test-${{ matrix.flag.php_version }} - name: Cargo clippy - uses: actions-rs/cargo@v1 - with: - toolchain: ${{ env.RUST_STABLE_TOOLCHAIN }} - command: clippy - args: --release --workspace ${{ matrix.flag.cargo_features }} + run: | + cargo clippy --release --workspace ${{ matrix.flag.cargo_features }} - name: Cargo build - uses: actions-rs/cargo@v1 - with: - toolchain: ${{ env.RUST_STABLE_TOOLCHAIN }} - command: build - args: --release --workspace ${{ matrix.flag.cargo_features }} + run: | + cargo build --release --workspace ${{ matrix.flag.cargo_features }} - name: Composer install run: composer install --working-dir=tests/php @@ -202,11 +187,8 @@ jobs: # Try cargo test. - name: Cargo test id: cargo-test-step - uses: actions-rs/cargo@v1 - with: - toolchain: ${{ env.RUST_STABLE_TOOLCHAIN }} - command: test - args: --release --workspace ${{ matrix.flag.cargo_features }} + run: | + cargo test --release --workspace ${{ matrix.flag.cargo_features }} env: ENABLE_ZEND_OBSERVER: ${{ matrix.flag.enable_zend_observer }} continue-on-error: true @@ -226,11 +208,8 @@ jobs: # Retry cargo test. - name: Cargo test if: steps.cargo-test-step.outcome != 'success' - uses: actions-rs/cargo@v1 - with: - toolchain: ${{ env.RUST_STABLE_TOOLCHAIN }} - command: test - args: --release --workspace + run: | + cargo test --release --workspace env: ENABLE_ZEND_OBSERVER: ${{ matrix.flag.enable_zend_observer }} @@ -256,15 +235,10 @@ jobs: submodules: "recursive" - name: Install Rust Nightly - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }} - override: true - components: rustfmt + run: | + rustup toolchain add --profile=minimal $RUST_NIGHTLY_TOOLCHAIN + rustup override set $RUST_NIGHTLY_TOOLCHAIN - name: Cargo fmt - uses: actions-rs/cargo@v1 - with: - toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }} - command: fmt - args: --all -- --check + run: | + cargo fmt --all -- --check From 1125b447196433d88bd83f0350452971d7c81136 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Tue, 10 Jun 2025 15:25:40 +0200 Subject: [PATCH 2/3] add missing component --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e53516c..fdb5e96 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -236,7 +236,7 @@ jobs: - name: Install Rust Nightly run: | - rustup toolchain add --profile=minimal $RUST_NIGHTLY_TOOLCHAIN + rustup toolchain add --profile=minimal --component rustfmt $RUST_NIGHTLY_TOOLCHAIN rustup override set $RUST_NIGHTLY_TOOLCHAIN - name: Cargo fmt From c17fd50f462adb3ba9fadea4fc2df1f25d4521c3 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Wed, 11 Jun 2025 14:27:50 +0200 Subject: [PATCH 3/3] add missing clippy --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index fdb5e96..fc1425f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -143,7 +143,7 @@ jobs: - name: Install Rust run: | - rustup toolchain add --profile=minimal $RUST_STABLE_TOOLCHAIN + rustup toolchain add --profile=minimal --component clippy $RUST_STABLE_TOOLCHAIN rustup override set $RUST_STABLE_TOOLCHAIN - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8