Skip to content

Use published versions of packages #8

Use published versions of packages

Use published versions of packages #8

Workflow file for this run

name: CI
on:
pull_request:
paths-ignore: "**/README.md"
push:
paths-ignore: "**/README.md"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
# Cancel any currently running workflows from the same PR, branch, or
# tag when a new workflow is triggered.
#
# https://stackoverflow.com/a/66336834
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
# --------------------------------------------------------------------------
# Check
check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mcu: [esp32, esp32c2, esp32c3, esp32c6, esp32h2, esp32s2, esp32s3]
env:
PROJECT_NAME: test-project
steps:
- uses: actions/checkout@v4
# Install the Rust toolchain for RISC-V devices:
- if: ${{ !contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.mcu) }}
uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly-2024-06-01 # TODO: Remove date when able
# Install the Rust toolchain for Xtensa devices:
- if: ${{ contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.mcu) }}
uses: esp-rs/xtensa-toolchain@v1.5
with:
buildtargets: ${{ matrix.mcu }}
ldproxy: false
- uses: cargo-generate/cargo-generate-action@latest
with:
name: ${{ env.PROJECT_NAME }}
arguments: "--define mcu=${{ matrix.mcu }}"
# We need to move the generated project to a temporary folder, away
# from the template project, otherwise `cargo` runs would fail.
#
# See: https://github.com/rust-lang/cargo/issues/9922
- run: |
mv $PROJECT_NAME ${{ runner.temp }}/
cd ${{ runner.temp }}/$PROJECT_NAME
cargo check