Skip to content

UX Improvement

UX Improvement #166

Workflow file for this run

name: CI
on:
push:
paths-ignore:
- "**/README.md"
pull_request:
paths-ignore:
- "**/README.md"
merge_group:
schedule:
- cron: "50 7 * * *"
workflow_dispatch:
inputs:
all_combinations:
description: "Checks all combinations of options"
required: true
type: boolean
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SSID: ""
PASSWORD: ""
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/[email protected]
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
if: github.event_name != 'schedule' && !inputs.all_combinations
run: cd xtask && cargo ${{ env.TOOLCHAIN }} run -- check ${{ matrix.chip }}
- name: Generate and check project (all combinations)
if: github.event_name == 'schedule' || inputs.all_combinations
run: cd xtask && cargo ${{ env.TOOLCHAIN }} run -- check ${{ matrix.chip }} --all-combinations
# --------------------------------------------------------------------------
# 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