Rust nightly toolchain check #359
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust nightly toolchain check | |
on: | |
schedule: | |
- cron: "50 7 * * *" | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
current-nightly: | |
name: Current nightly | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "windows-latest"] | |
steps: | |
- name: Setup | Rust | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: nightly | |
components: rust-src,rustfmt | |
- name: Setup | cargo-generate (Ubuntu binary) | |
if: matrix.os == 'ubuntu-latest' | |
id: binaries | |
continue-on-error: true | |
run: | | |
sudo curl -L "https://github.com/cargo-generate/cargo-generate/releases/latest/download/cargo-generate-$(git ls-remote --refs --sort="version:refname" --tags "https://github.com/cargo-generate/cargo-generate" | cut -d/ -f3- | tail -n1)-x86_64-unknown-linux-gnu.tar.gz" -o "/home/runner/.cargo/bin/cargo-generate.tar.gz" | |
tar xf "/home/runner/.cargo/bin/cargo-generate.tar.gz" -C /home/runner/.cargo/bin | |
chmod u+x /home/runner/.cargo/bin/cargo-generate | |
- name: Setup | cargo-generate | |
if: steps.binaries.outcome != 'success' || matrix.os == 'windows-latest' | |
run: cargo install cargo-generate | |
- uses: Swatinem/rust-cache@v2 | |
- name: Generate | |
run: cargo generate -a esp-rs/esp-template --name test --vcs none --silent -d mcu=esp32c3 -d advanced=false | |
- name: Build Project | |
run: cd test; cargo build |