2022-04-17 21:15:23 +02:00
|
|
|
|
|
|
|
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:
|
2022-07-21 23:26:47 +02:00
|
|
|
rust: [
|
|
|
|
# Test with toolchain file override
|
2023-02-13 21:00:11 +01:00
|
|
|
"1.60",
|
|
|
|
# Test that the sparse registry check works.
|
|
|
|
# 1.66 and 1.67 don't support stable sparse registry.
|
|
|
|
"1.66",
|
2022-07-21 23:26:47 +02:00
|
|
|
"nightly",
|
|
|
|
"beta",
|
|
|
|
"stable",
|
|
|
|
]
|
2022-04-17 21:15:23 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2022-07-21 23:26:47 +02:00
|
|
|
# Test toolchain file support
|
|
|
|
- name: Write rust-toolchain.toml
|
|
|
|
run: |
|
|
|
|
cat <<EOF >>rust-toolchain.toml
|
|
|
|
[toolchain]
|
2023-02-13 21:02:26 +01:00
|
|
|
channel = "nightly-2022-09-10"
|
2022-07-21 23:26:47 +02:00
|
|
|
components = [ "rustfmt", "rustc-dev" ]
|
|
|
|
targets = [ "wasm32-unknown-unknown", "thumbv2-none-eabi" ]
|
|
|
|
profile = "minimal"
|
|
|
|
EOF
|
|
|
|
shell: bash
|
2023-02-13 21:00:11 +01:00
|
|
|
if: matrix.rust == '1.60'
|
2022-07-21 23:26:47 +02:00
|
|
|
|
2022-04-17 21:15:23 +02:00
|
|
|
- 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
|
2023-02-13 21:00:11 +01:00
|
|
|
|
|
|
|
# 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 check
|