setup-rust-toolchain/.github/workflows/ci.yml
dependabot[bot] 1f541c5b05
Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-01 07:14:31 +00:00

67 lines
1.9 KiB
YAML

name: CI
on:
push:
pull_request:
schedule: [cron: "40 1 * * *"]
jobs:
install:
name: Rust ${{matrix.rust}} ${{matrix.os}}
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
rust: [
# Test with toolchain file override
"1.60",
# Test that the sparse registry check works.
# 1.66 and 1.67 don't support stable sparse registry.
"1.66",
"nightly",
"beta",
"stable",
]
os: [
"ubuntu-latest",
"windows-latest",
"macos-latest",
]
steps:
- uses: actions/checkout@v4
# Test toolchain file support
- name: Write rust-toolchain.toml
run: |
cat <<EOF >>rust-toolchain.toml
[toolchain]
channel = "nightly-2022-09-10"
components = [ "rustfmt", "rustc-dev" ]
targets = [ "wasm32-unknown-unknown", "thumbv7m-none-eabi" ]
profile = "minimal"
EOF
shell: bash
if: matrix.rust == '1.60'
- uses: ./
name: Run actions-rust-lang/setup-rust-toolchain ${{matrix.rust}}
id: toolchain
with:
toolchain: ${{matrix.rust}}
components: clippy
- 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
# Test with creating a small project
- run: cargo init . --bin --name ci
# Add tiny empty crate.
# This checks that registry access works.
- run: cargo add serde_as
- run: cargo clippy