Small CI improvements (#13060)
# Objective - Some CI jobs specifically use `macos-14`, as compared to the default `macos-latest`. - `macos-latest` is equivalent to `macos-12`, but may be updated in the future. - The CI job that tests on the minimum supported Rust version (MSRV) uses environmental variables to save the toolchain version. - This specific usage is what step outputs were designed for. - Both do the same thing, but step outputs can be checked by the [Github Actions VSCode Extension](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-github-actions). - Some workflows have a `NIGHTLY_TOOLCHAIN` variable that let us pin the nightly version, in case a new release breaks CI. ## Solution - Document why certain actions required `macos-14`. - Switch MSRV step to use step outputs. - Add a small comment documenting the purpose of the `NIGHTLY_TOOLCHAIN` environmental variable.
This commit is contained in:
parent
279e89b858
commit
fcd87b2528
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -9,6 +9,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
# If nightly is breaking CI, modify this variable to target a specific nightly version.
|
||||||
NIGHTLY_TOOLCHAIN: nightly
|
NIGHTLY_TOOLCHAIN: nightly
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
@ -70,6 +71,7 @@ jobs:
|
|||||||
run: cargo run -p ci -- lints
|
run: cargo run -p ci -- lints
|
||||||
|
|
||||||
miri:
|
miri:
|
||||||
|
# Explicity use MacOS 14 to take advantage of M1 chip.
|
||||||
runs-on: macos-14
|
runs-on: macos-14
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
@ -228,6 +230,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
run-examples-macos-metal:
|
run-examples-macos-metal:
|
||||||
|
# Explicity use MacOS 14 to take advantage of M1 chip.
|
||||||
runs-on: macos-14
|
runs-on: macos-14
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
@ -388,12 +391,13 @@ jobs:
|
|||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-msrv-${{ hashFiles('**/Cargo.toml') }}
|
key: ${{ runner.os }}-cargo-msrv-${{ hashFiles('**/Cargo.toml') }}
|
||||||
- name: get MSRV
|
- name: get MSRV
|
||||||
|
id: msrv
|
||||||
run: |
|
run: |
|
||||||
msrv=`cargo metadata --no-deps --format-version 1 | jq --raw-output '.packages[] | select(.name=="bevy") | .rust_version'`
|
msrv=`cargo metadata --no-deps --format-version 1 | jq --raw-output '.packages[] | select(.name=="bevy") | .rust_version'`
|
||||||
echo "MSRV=$msrv" >> $GITHUB_ENV
|
echo "msrv=$msrv" >> $GITHUB_OUTPUT
|
||||||
- uses: dtolnay/rust-toolchain@master
|
- uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ env.MSRV }}
|
toolchain: ${{ steps.msrv.outputs.msrv }}
|
||||||
- name: Install Linux dependencies
|
- name: Install Linux dependencies
|
||||||
uses: ./.github/actions/install-linux-deps
|
uses: ./.github/actions/install-linux-deps
|
||||||
- name: Run cargo check
|
- name: Run cargo check
|
||||||
|
1
.github/workflows/docs.yml
vendored
1
.github/workflows/docs.yml
vendored
@ -10,6 +10,7 @@ on:
|
|||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
RUSTDOCFLAGS: --html-in-header header.html
|
RUSTDOCFLAGS: --html-in-header header.html
|
||||||
|
# If nightly is breaking CI, modify this variable to target a specific nightly version.
|
||||||
NIGHTLY_TOOLCHAIN: nightly
|
NIGHTLY_TOOLCHAIN: nightly
|
||||||
|
|
||||||
# Sets the permissions to allow deploying to Github pages.
|
# Sets the permissions to allow deploying to Github pages.
|
||||||
|
1
.github/workflows/validation-jobs.yml
vendored
1
.github/workflows/validation-jobs.yml
vendored
@ -13,6 +13,7 @@ concurrency:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
# If nightly is breaking CI, modify this variable to target a specific nightly version.
|
||||||
NIGHTLY_TOOLCHAIN: nightly
|
NIGHTLY_TOOLCHAIN: nightly
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
Loading…
Reference in New Issue
Block a user