Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Parameterize nightly toolchain in CI #5330

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/bors.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
status = [
"build (stable, windows-latest)",
"build (stable, ubuntu-latest)",
"build (stable, macos-latest)",
"build (nightly, ubuntu-latest)",
"build-wasm (stable, ubuntu-latest)",
"build-wasm (nightly, ubuntu-latest)",
"build (windows-latest)",
"build (ubuntu-latest)",
"build (macos-latest)",
"build-wasm",
"nightly-checks (wasm32-unknown-unknown)",
"nightly-checks (x86_64-unknown-linux-gnu)",
"build-android",
"markdownlint",
"run-examples",
Expand Down
58 changes: 37 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@ on:

env:
CARGO_TERM_COLOR: always
NIGHTLY_TOOLCHAIN: nightly-2022-07-13

jobs:
build:
strategy:
matrix:
toolchain: [stable, nightly]
os: [windows-latest, ubuntu-latest, macos-latest]
exclude:
- os: macos-latest
toolchain: nightly
- os: windows-latest
toolchain: nightly
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -32,11 +27,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-build-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
key: ${{ runner.os }}-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
if: runner.os == 'linux'
Expand All @@ -47,6 +38,35 @@ jobs:
CARGO_INCREMENTAL: 0
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:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -87,7 +107,7 @@ jobs:
key: ${{ runner.os }}-cargo-miri-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
components: miri
override: true
- name: Install alsa and udev
Expand Down Expand Up @@ -132,11 +152,7 @@ jobs:
run: cargo run -p ci -- compile

build-wasm:
strategy:
matrix:
toolchain: [stable, nightly]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
Expand All @@ -148,17 +164,17 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
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
with:
toolchain: ${{ matrix.toolchain }}
toolchain: stable
target: wasm32-unknown-unknown
override: true
- name: Check wasm
uses: actions-rs/cargo@v1
with:
command: check
args: --target wasm32-unknown-unknown --no-default-features --features bevy_winit,x11,hdr,bevy_gltf
args: --target wasm32-unknown-unknown

markdownlint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -291,7 +307,7 @@ jobs:
key: ${{ runner.os }}-cargo-check-unused-dependencies-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
override: true
- name: Installs cargo-udeps
run: cargo install --force cargo-udeps
Expand Down