Merge branch 'main' into add-workspaces
This commit is contained in:
commit
6f719a240e
|
@ -7,13 +7,20 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
install:
|
install:
|
||||||
name: Rust ${{matrix.rust || '(toolchain file)'}} ${{matrix.os}}
|
name: Rust ${{matrix.rust || '(default)'}} (toolchain-file=${{matrix.write-toolchain-file}}) (${{matrix.os}})
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-latest
|
||||||
|
- windows-latest
|
||||||
|
- macos-latest
|
||||||
|
write-toolchain-file:
|
||||||
|
- false
|
||||||
|
- true
|
||||||
rust:
|
rust:
|
||||||
# Test with toolchain file override
|
# use stable toolchain as default
|
||||||
- null
|
- null
|
||||||
|
|
||||||
# Test that the sparse registry check works.
|
# Test that the sparse registry check works.
|
||||||
|
@ -23,21 +30,17 @@ jobs:
|
||||||
- "nightly"
|
- "nightly"
|
||||||
- "beta"
|
- "beta"
|
||||||
- "stable"
|
- "stable"
|
||||||
os:
|
|
||||||
- ubuntu-latest
|
|
||||||
- windows-latest
|
|
||||||
- macos-latest
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# Test toolchain file support
|
# Test toolchain file support
|
||||||
- name: Write rust-toolchain.toml
|
- name: Write rust-toolchain.toml
|
||||||
if: matrix.rust == null
|
if: matrix.write-toolchain-file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cat <<EOF >>rust-toolchain.toml
|
cat <<EOF >>rust-toolchain.toml
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-11"
|
channel = "nightly-2024-01-10"
|
||||||
components = [ "rustfmt", "rustc-dev" ]
|
components = [ "rustfmt", "rustc-dev" ]
|
||||||
targets = [ "wasm32-unknown-unknown", "thumbv7m-none-eabi" ]
|
targets = [ "wasm32-unknown-unknown", "thumbv7m-none-eabi" ]
|
||||||
profile = "minimal"
|
profile = "minimal"
|
||||||
|
@ -59,6 +62,20 @@ jobs:
|
||||||
- name: Check ${{'${{steps.toolchain.outputs.rustup-version}}'}}
|
- name: Check ${{'${{steps.toolchain.outputs.rustup-version}}'}}
|
||||||
run: echo '${{steps.toolchain.outputs.rustup-version}}'
|
run: echo '${{steps.toolchain.outputs.rustup-version}}'
|
||||||
|
|
||||||
|
- name: Check lack of toolchain input or file results in stable
|
||||||
|
if: matrix.write-toolchain-file == false && matrix.rust == null
|
||||||
|
shell: bash
|
||||||
|
run: |-
|
||||||
|
rustcv="$(rustc --version)"
|
||||||
|
[[ "$rustcv" != *"nightly"* && "$rustcv" != *"beta"* ]]
|
||||||
|
|
||||||
|
- name: Check toolchain file is being overridden
|
||||||
|
if: matrix.write-toolchain-file
|
||||||
|
shell: bash
|
||||||
|
run: |-
|
||||||
|
rustcv="$(rustc --version)"
|
||||||
|
[[ ! ( "$rustcv" == *"nightly"* && "$rustcv" == *"2024-01-10"* ) ]]
|
||||||
|
|
||||||
- shell: bash
|
- shell: bash
|
||||||
run: rustc --version && cargo --version
|
run: rustc --version && cargo --version
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ runs:
|
||||||
toolchain=stable
|
toolchain=stable
|
||||||
fi
|
fi
|
||||||
rustup toolchain install $toolchain${{steps.flags.outputs.targets}}${{steps.flags.outputs.components}} --profile minimal${{steps.flags.outputs.downgrade}} --no-self-update
|
rustup toolchain install $toolchain${{steps.flags.outputs.targets}}${{steps.flags.outputs.components}} --profile minimal${{steps.flags.outputs.downgrade}} --no-self-update
|
||||||
rustup default $toolchain
|
rustup override set $toolchain
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- id: versions
|
- id: versions
|
||||||
|
|
Loading…
Reference in New Issue