Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Update README with latest esp-backtrace changes #142

Update README with latest esp-backtrace changes

Update README with latest esp-backtrace changes #142

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
push:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
# ---------------------------------------------------------------------------
# Check
check-riscv:
name: Check RISC-V
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
device:
[
{ chip: "esp32c2", target: "riscv32imc-unknown-none-elf" },
{ chip: "esp32c3", target: "riscv32imc-unknown-none-elf" },
{ chip: "esp32c6", target: "riscv32imac-unknown-none-elf" },
{ chip: "esp32h2", target: "riscv32imac-unknown-none-elf" },
{ chip: "esp32p4", target: "riscv32imafc-unknown-none-elf" },
]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
target: ${{ matrix.device.target }}
toolchain: nightly
components: rust-src
- uses: Swatinem/rust-cache@v2
# Check the printer features serially rather than in parallel, as the
# time to build each feature is *must* shorter than the time to spin
# up a new runner:
- name: Check printer feature (uart)
run: cargo build --no-default-features --target=${{ matrix.device.target }} --features=${{ matrix.device.chip }},uart
- name: Check printer feature (jtag-serial)
if: matrix.device.chip != 'esp32c2'
run: cargo build --no-default-features --target=${{ matrix.device.target }} --features=${{ matrix.device.chip }},jtag-serial
check-xtensa:
name: Check Xtensa
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
device:
[
{ chip: "esp32", target: "xtensa-esp32-none-elf" },
{ chip: "esp32s2", target: "xtensa-esp32s2-none-elf" },
{ chip: "esp32s3", target: "xtensa-esp32s3-none-elf" },
]
steps:
- uses: actions/checkout@v4
- uses: esp-rs/xtensa-toolchain@v1.5
with:
default: true
ldproxy: false
buildtargets: ${{ matrix.device.chip }}
- uses: Swatinem/rust-cache@v2
# Check the printer features serially rather than in parallel, as the
# time to build each feature is *must* shorter than the time to spin
# up a new runner:
- name: Check printer feature (uart)
run: cargo build --no-default-features --target=${{ matrix.device.target }} --features=${{ matrix.device.chip }},uart
- name: Check printer feature (jtag-serial)
if: matrix.device.chip == 'esp32s3'
run: cargo build --no-default-features --target=${{ matrix.device.target }} --features=${{ matrix.device.chip }},jtag-serial
check-log-riscv:
name: Log drivers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
target: riscv32imc-unknown-none-elf
toolchain: nightly
components: rust-src
- uses: Swatinem/rust-cache@v2
# For simplicity, we will only check with the "esp32c2" and "uart"
# chip/printer features enabled, since it's the remaining features
# which we're actually interested in testing.
# No logger (with & without `critical-section`):
- run: cargo build --target=riscv32imc-unknown-none-elf --no-default-features --features=esp32c2,uart
- run: cargo build --target=riscv32imc-unknown-none-elf --no-default-features --features=esp32c2,uart,critical-section
# `defmt-espflash` (with & without `critical-section`):
- run: cargo build --target=riscv32imc-unknown-none-elf --no-default-features --features=esp32c2,uart,defmt-espflash
- run: cargo build --target=riscv32imc-unknown-none-elf --no-default-features --features=esp32c2,uart,defmt-espflash,critical-section
# `log` (with & without `critical-section`, `colors`):
- run: cargo build --target=riscv32imc-unknown-none-elf --no-default-features --features=esp32c2,uart,log
- run: cargo build --target=riscv32imc-unknown-none-elf --no-default-features --features=esp32c2,uart,log,critical-section
- run: cargo build --target=riscv32imc-unknown-none-elf --no-default-features --features=esp32c2,uart,log,colors
# ---------------------------------------------------------------------------
# Lint
rustfmt:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
components: rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check