From 0070c26aecdf0f6692ad6a03315ccf64f593c38e Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Mon, 11 Aug 2025 15:40:28 -0400 Subject: [PATCH] ZJIT: CI: Use Rust version built into GitHub Actions image Saves the work of installing Rust for most jobs. Keep a job on each platform that tests 1.85.0, the minimum supported version, though. --- .github/workflows/zjit-macos.yml | 10 +++++++--- .github/workflows/zjit-ubuntu.yml | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/zjit-macos.yml b/.github/workflows/zjit-macos.yml index ab922849f4..7b5d9f6b61 100644 --- a/.github/workflows/zjit-macos.yml +++ b/.github/workflows/zjit-macos.yml @@ -34,6 +34,7 @@ jobs: include: - test_task: 'zjit-check' configure: '--enable-yjit=dev --enable-zjit' + rust_version: "1.85.0" - test_task: 'ruby' # build test for combo build configure: '--enable-yjit --enable-zjit' @@ -81,14 +82,17 @@ jobs: # Set fetch-depth: 10 so that Launchable can receive commits information. fetch-depth: 10 + - name: Install Rust + if: ${{ matrix.rust_version }} + run: | + rustup install ${{ matrix.rust_version }} --profile minimal + rustup default ${{ matrix.rust_version }} + - uses: taiki-e/install-action@v2 with: tool: nextest@0.9 if: ${{ matrix.test_task == 'zjit-check' }} - - name: Install Rust # TODO(alan): remove when GitHub images catch up past 1.85.0 - run: rustup default 1.85.0 - - name: Run configure run: ../src/configure -C --disable-install-doc ${{ matrix.configure }} diff --git a/.github/workflows/zjit-ubuntu.yml b/.github/workflows/zjit-ubuntu.yml index 09fa137f45..da53a52b7d 100644 --- a/.github/workflows/zjit-ubuntu.yml +++ b/.github/workflows/zjit-ubuntu.yml @@ -39,6 +39,7 @@ jobs: - test_task: 'zjit-check' configure: '--enable-yjit --enable-zjit=dev' + rust_version: '1.85.0' - test_task: 'zjit-test-all' configure: '--enable-zjit=dev' @@ -98,7 +99,10 @@ jobs: fetch-depth: 10 - name: Install Rust - run: rustup default 1.85.0 + if: ${{ matrix.rust_version }} + run: | + rustup install ${{ matrix.rust_version }} --profile minimal + rustup default ${{ matrix.rust_version }} - name: Install rustfmt if: ${{ matrix.test_task == 'zjit-bindgen' }}