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

Commit

Permalink
Add a CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jessebraham committed Nov 22, 2022
1 parent 7817ecb commit 38e3583
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI

on:
pull_request:
branches:
- main
push:
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
check-riscv:
name: Check RISC-V
runs-on: ubuntu-latest
strategy:
matrix:
chip: [esp32c2, esp32c3, esp32c6, esp32h2]
printer: ["rtt", "uart"]
include:
- chip: esp32c3
printer: "jtag_serial"
- chip: esp32c6
printer: "jtag_serial"
- chip: esp32h2
printer: "jtag_serial"
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
target: riscv32imc-unknown-none-elf
toolchain: nightly
components: rust-src
default: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: check
args: -Zbuild-std=core --no-default-features --target=riscv32imc-unknown-none-elf --features=${{ matrix.chip }},${{ matrix.printer }}

check-xtensa:
name: Check Xtensa
runs-on: ubuntu-latest
strategy:
matrix:
chip: [esp32, esp32s2, esp32s3]
printer: ["rtt", "uart"]
include:
- chip: esp32s3
printer: "jtag_serial"
steps:
- uses: actions/checkout@v2
- uses: esp-rs/[email protected]
with:
default: true
ldproxy: false
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: check
args: -Zbuild-std=core --no-default-features --target=xtensa-${{ matrix.chip }}-none-elf --features=${{ matrix.chip }},${{ matrix.printer }}

rustfmt:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

0 comments on commit 38e3583

Please sign in to comment.