setup-rust-toolchain/.github/workflows/ci.yml

51 lines
1.4 KiB
YAML

name: CI
on:
push:
pull_request:
schedule: [cron: "40 1 * * *"]
jobs:
install:
name: Rust ${{matrix.rust}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [
# Test with toolchain file override
"1.50",
"nightly",
"beta",
"stable",
]
steps:
- uses: actions/checkout@v3
# Test toolchain file support
- name: Write rust-toolchain.toml
run: |
cat <<EOF >>rust-toolchain.toml
[toolchain]
channel = "nightly-2020-07-10"
components = [ "rustfmt", "rustc-dev" ]
targets = [ "wasm32-unknown-unknown", "thumbv2-none-eabi" ]
profile = "minimal"
EOF
shell: bash
if: matrix.rust == '1.50'
- uses: ./
name: Run actions-rust-lang/setup-rust-toolchain ${{matrix.rust}}
id: toolchain
with:
toolchain: ${{matrix.rust}}
- name: Check ${{'${{steps.toolchain.outputs.rustc-version}}'}}
run: echo '${{steps.toolchain.outputs.rustc-version}}'
- name: Check ${{'${{steps.toolchain.outputs.cargo-version}}'}}
run: echo '${{steps.toolchain.outputs.cargo-version}}'
- name: Check ${{'${{steps.toolchain.outputs.rustup-version}}'}}
run: echo '${{steps.toolchain.outputs.rustup-version}}'
- run: rustc --version && cargo --version
shell: bash