Parameterize nightly toolchain in CI (#5330)
# Objective Rust's nightly builds semi-regularly break us (or our dependencies). This creates churn and angst when we're just trying to get our jobs done. We do still want nightly builds for a variety of reasons: * cargo-udeps requires nightly and likely always will. * Helps us catch rust nightly bugs quickly. We're "good citizens" if we regularly report regressions. * Lets us prepare for "actual expected breakage" ahead of stable releases so we avoid breaking main users. ## Solution * This pr parameterizes the nightly toolchain, making it an easy one-liner to pin our builds to a specific nightly, when required. * Put nightly jobs to check wasm and nightly on their own matrix. I also removed tests on nightly linux, just build check * alternative to https://github.com/bevyengine/bevy/pull/5329 Co-authored-by: Carter Anderson <mcanders1@gmail.com>
This commit is contained in:
parent
56ee620495
commit
c8aa047cca
12
.github/bors.toml
vendored
12
.github/bors.toml
vendored
@ -1,10 +1,10 @@
|
|||||||
status = [
|
status = [
|
||||||
"build (stable, windows-latest)",
|
"build (windows-latest)",
|
||||||
"build (stable, ubuntu-latest)",
|
"build (ubuntu-latest)",
|
||||||
"build (stable, macos-latest)",
|
"build (macos-latest)",
|
||||||
"build (nightly, ubuntu-latest)",
|
"build-wasm",
|
||||||
"build-wasm (stable, ubuntu-latest)",
|
"nightly-checks (wasm32-unknown-unknown)",
|
||||||
"build-wasm (nightly, ubuntu-latest)",
|
"nightly-checks (x86_64-unknown-linux-gnu)",
|
||||||
"build-android",
|
"build-android",
|
||||||
"markdownlint",
|
"markdownlint",
|
||||||
"run-examples",
|
"run-examples",
|
||||||
|
58
.github/workflows/ci.yml
vendored
58
.github/workflows/ci.yml
vendored
@ -9,18 +9,13 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
NIGHTLY_TOOLCHAIN: nightly-2022-07-13
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
toolchain: [stable, nightly]
|
|
||||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||||
exclude:
|
|
||||||
- os: macos-latest
|
|
||||||
toolchain: nightly
|
|
||||||
- os: windows-latest
|
|
||||||
toolchain: nightly
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@ -32,11 +27,7 @@ jobs:
|
|||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-build-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.toml') }}
|
key: ${{ runner.os }}-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: ${{ matrix.toolchain }}
|
|
||||||
override: true
|
|
||||||
- name: Install alsa and udev
|
- name: Install alsa and udev
|
||||||
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
|
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
|
||||||
if: runner.os == 'linux'
|
if: runner.os == 'linux'
|
||||||
@ -47,6 +38,35 @@ jobs:
|
|||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
RUSTFLAGS: "-C debuginfo=0 -D warnings"
|
RUSTFLAGS: "-C debuginfo=0 -D warnings"
|
||||||
|
|
||||||
|
nightly-checks:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
target: [wasm32-unknown-unknown, x86_64-unknown-linux-gnu]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
|
||||||
|
target: ${{ matrix.target }}
|
||||||
|
override: true
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/bin/
|
||||||
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
|
target/
|
||||||
|
key: ubuntu-latest-cargo-build-stable-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }}
|
||||||
|
- name: Install alsa and udev
|
||||||
|
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
|
||||||
|
- name: Check wasm
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: check
|
||||||
|
args: --target ${{ matrix.target }}
|
||||||
|
|
||||||
ci:
|
ci:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@ -87,7 +107,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-cargo-miri-${{ hashFiles('**/Cargo.toml') }}
|
key: ${{ runner.os }}-cargo-miri-${{ hashFiles('**/Cargo.toml') }}
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: nightly
|
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
|
||||||
components: miri
|
components: miri
|
||||||
override: true
|
override: true
|
||||||
- name: Install alsa and udev
|
- name: Install alsa and udev
|
||||||
@ -132,11 +152,7 @@ jobs:
|
|||||||
run: cargo run -p ci -- compile
|
run: cargo run -p ci -- compile
|
||||||
|
|
||||||
build-wasm:
|
build-wasm:
|
||||||
strategy:
|
runs-on: ubuntu-latest
|
||||||
matrix:
|
|
||||||
toolchain: [stable, nightly]
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
needs: build
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@ -148,17 +164,17 @@ jobs:
|
|||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-build-wasm-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.toml') }}
|
key: ubuntu-assets-cargo-build-wasm-stable-${{ hashFiles('**/Cargo.toml') }}
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.toolchain }}
|
toolchain: stable
|
||||||
target: wasm32-unknown-unknown
|
target: wasm32-unknown-unknown
|
||||||
override: true
|
override: true
|
||||||
- name: Check wasm
|
- name: Check wasm
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: check
|
command: check
|
||||||
args: --target wasm32-unknown-unknown --no-default-features --features bevy_winit,x11,hdr,bevy_gltf
|
args: --target wasm32-unknown-unknown
|
||||||
|
|
||||||
markdownlint:
|
markdownlint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -291,7 +307,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-cargo-check-unused-dependencies-${{ hashFiles('**/Cargo.toml') }}
|
key: ${{ runner.os }}-cargo-check-unused-dependencies-${{ hashFiles('**/Cargo.toml') }}
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: nightly
|
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
|
||||||
override: true
|
override: true
|
||||||
- name: Installs cargo-udeps
|
- name: Installs cargo-udeps
|
||||||
run: cargo install --force cargo-udeps
|
run: cargo install --force cargo-udeps
|
||||||
|
Loading…
Reference in New Issue
Block a user