Skip to content

Commit

Permalink
chore(ci): don't require nightly to pass (#89)
Browse files Browse the repository at this point in the history
This changes the nightly CI build to not be required. This is because
nightly Rust may contain regressions that incorrectly break our build.
If such a regression occurs, this is a Rustc bug rather than an issue
with a PR, and we should still be able to merge the PR. The purpose of
the nightly CI build is to warn us if something is broken on nightly so
that we can open issues against Rust upstream for nightly regressions,
rather than as a gatekeeper for merging PRs.
  • Loading branch information
hawkw committed Oct 4, 2023
1 parent ff2403b commit d0f1770
Showing 1 changed file with 30 additions and 11 deletions.
41 changes: 30 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,29 @@ env:

jobs:
build:
name: Build ((${{ matrix.rust }}, ${{ matrix.target }})
name: Build (stable, ${{ matrix.target }})
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- nightly
target:
- x86_64-unknown-linux-gnu
include:
- rust: stable
target: i686-unknown-linux-musl
- i686-unknown-linux-musl
steps:
- uses: actions/checkout@master
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: cargo +${{ matrix.rust }} build --target ${{ matrix.target }}
- name: cargo build --target ${{ matrix.target }}
uses: actions-rs/cargo@v1
with:
command: build
args: --all-targets --target ${{ matrix.target }}

msrv:
build-msrv:
name: Build (MSRV)
runs-on: ubuntu-latest
steps:
Expand All @@ -57,8 +52,27 @@ jobs:
env:
RUSTFLAGS: "" # remove -Dwarnings

build-nightly:
name: Build (nightly)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: cargo +nightly build
uses: actions-rs/cargo@v1
with:
command: build
env:
RUSTFLAGS: "" # remove -Dwarnings

test:
name: Tests (stable)
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand All @@ -73,6 +87,7 @@ jobs:

test-loom:
name: Loom tests (stable)
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down Expand Up @@ -125,7 +140,11 @@ jobs:
name: "all systems go!"
needs:
- build
- msrv
- build-msrv
# Note: we explicitly *don't* require the `build-nightly` job to pass,
# since the nightly Rust compiler is unstable. We don't want nightly
# regressions to break our build --- this CI job is intended for
# informational reasons rather than as a gatekeeper for merging PRs.
- test
- test-loom
- clippy
Expand Down

0 comments on commit d0f1770

Please sign in to comment.