Prepare 0.3.0 release #550
Workflow file for this run
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: CI | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths-ignore: | |
- "**/README.md" | |
merge_group: | |
schedule: | |
- cron: "34 2 * * *" | |
workflow_dispatch: | |
inputs: | |
build: | |
description: "Fully build the tested configurations" | |
required: true | |
type: boolean | |
all_combinations: | |
description: "Checks all combinations of options" | |
required: true | |
type: boolean | |
env: | |
CARGO_TARGET_DIR: ${{ github.workspace }}/target | |
CARGO_TERM_COLOR: always | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SSID: "" | |
PASSWORD: "" | |
# 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: | |
# -------------------------------------------------------------------------- | |
# Verify | |
verify: | |
name: "Check ${{ matrix.chip }}" | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
chip: [esp32, esp32c2, esp32c3, esp32c6, esp32h2, esp32s2, esp32s3] | |
steps: | |
- uses: actions/checkout@v4 | |
# Rust toolchain for Xtensa: | |
- if: ${{ contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.chip) }} | |
uses: esp-rs/xtensa-toolchain@v1.5 | |
with: | |
default: true | |
buildtargets: ${{ matrix.chip }} | |
ldproxy: false | |
# Rust toolchain for RISC-V: | |
- if: ${{ !contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.chip) }} | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
target: riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf | |
components: clippy,rustfmt,rust-src | |
# //Define a new environment variable called toolchain | |
- if: ${{ contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.chip) }} | |
run: echo "TOOLCHAIN=+esp" >> $GITHUB_ENV | |
- uses: Swatinem/rust-cache@v2 | |
- name: Generate and check project | |
run: cargo ${{ env.TOOLCHAIN }} xtask check ${{ matrix.chip }} ${{ fromJSON('["", "--all-combinations"]')[inputs.all_combinations || github.event_name == 'schedule'] }} ${{ fromJSON('["", "--build"]')[inputs.build || github.event_name == 'schedule'] }} | |
# -------------------------------------------------------------------------- | |
# Test | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Run tests | |
run: cargo test | |
# -------------------------------------------------------------------------- | |
# Lint | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Run clippy | |
run: cargo clippy -- -D warnings |