From f9069e471c5a7f21eca5c56889e0ac06d6cf3c2c Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Mon, 13 Nov 2023 11:13:02 -0800 Subject: [PATCH 1/3] CI: Fix unstable toolchain override setup. We need to use the same file editing trick as in the stable CI, or the wasm target doesn't get installed. --- .github/workflows/unstable-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unstable-ci.yml b/.github/workflows/unstable-ci.yml index 49cd1e0b4..c205e306b 100644 --- a/.github/workflows/unstable-ci.yml +++ b/.github/workflows/unstable-ci.yml @@ -64,10 +64,11 @@ jobs: ref: unstable-rust - name: Set Rust toolchain - # The rust-toolchain.toml file specifies the targets and components we need. - # Therefore, CI only needs to set the toolchain override. + # The rust-toolchain.toml file specifies the targets and components we need, + # but we may want to override the toolchain. + if: ${{ matrix.toolchain != 'stable' }} run: | - rustup override set "${{ matrix.toolchain }}" + sed -i "s/stable/${{ matrix.toolchain }}/" rust-toolchain.toml rustup show # triggers installation of selected toolchain - name: Install native libraries From 5f7b109cda0839dd95e537835d404407ec184f53 Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Mon, 13 Nov 2023 11:15:25 -0800 Subject: [PATCH 2/3] CI: Replace `continue-on-error: true` with `fail-fast: false` for unstable. The previous configuration meant that unstable-ci would always be displayed as green, since it had no "primary" job to fail. --- .github/workflows/ci.yml | 2 +- .github/workflows/unstable-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7902d9c1f..392876382 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,7 @@ env: jobs: build: strategy: + fail-fast: false matrix: # This matrix doesn't do any actual Cartesian products, but instead has a # basic configuration (Linux, stable Rust, using lockfile) and also tries @@ -74,7 +75,6 @@ jobs: depversions: minimal primary: false - runs-on: ${{ matrix.os }}-latest continue-on-error: ${{ !matrix.primary }} diff --git a/.github/workflows/unstable-ci.yml b/.github/workflows/unstable-ci.yml index c205e306b..04c26274a 100644 --- a/.github/workflows/unstable-ci.yml +++ b/.github/workflows/unstable-ci.yml @@ -38,6 +38,7 @@ env: jobs: build: strategy: + fail-fast: false matrix: include: # Linux @@ -56,7 +57,6 @@ jobs: depversions: locked runs-on: ${{ matrix.os }}-latest - continue-on-error: true steps: - uses: actions/checkout@v3.1.0 From ba469c301cba2ea2643f835bf808e93e5eb0c47b Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Mon, 13 Nov 2023 11:23:49 -0800 Subject: [PATCH 3/3] CI: give a suffix to `sed` Apparently macOS (BSD-derived) `sed` requires an extension for in-place edits, whereas GNU `sed` does not. --- .github/workflows/ci.yml | 2 +- .github/workflows/unstable-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 392876382..30804f5cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,7 +97,7 @@ jobs: # but we may want to override the toolchain. if: ${{ matrix.toolchain != 'stable' }} run: | - sed -i "s/stable/${{ matrix.toolchain }}/" rust-toolchain.toml + sed -i.origstable "s/stable/${{ matrix.toolchain }}/" rust-toolchain.toml rustup show # triggers installation of selected toolchain - name: Install nightly for -Z direct-minimal-versions diff --git a/.github/workflows/unstable-ci.yml b/.github/workflows/unstable-ci.yml index 04c26274a..569aedbb6 100644 --- a/.github/workflows/unstable-ci.yml +++ b/.github/workflows/unstable-ci.yml @@ -68,7 +68,7 @@ jobs: # but we may want to override the toolchain. if: ${{ matrix.toolchain != 'stable' }} run: | - sed -i "s/stable/${{ matrix.toolchain }}/" rust-toolchain.toml + sed -i.origstable "s/stable/${{ matrix.toolchain }}/" rust-toolchain.toml rustup show # triggers installation of selected toolchain - name: Install native libraries