esp-hal/.github/workflows/ci-async.yml
Scott Mabin 9064177e99
Initial embassy support (#225)
* wip: timg embassy driver

- read_raw on timg renamed to now()
- timg initialized and stored in static for use in the embassy driver
- timg sets alarm value
- untested whether alarms actually trigger

* TIMG timer driver for esp32, esp32s3

- Adds the timg timer block as a time driver for embassy
- Not enabled on the C3 as it only has one timer block, better to use
  systimer
- s2 example added but can't build due to atomic requirements in
  futures-core

* Add S2 atomic support with emulation, fixup embassy support for the S2

* Move executor & static-cell to dev deps. Make eha optional

* Add c2 support, run fmt

* Update to crates.io embassy releases

* Update eha

* update timg time driver to new trait

* Remove exception feature of esp-backtrace and use the user handler for backtracing

* Add async testing workflow

* Update systick example

* Fix S2 examples

* Update xtensa-toolchain

* set rustflags for s2 target

* Disable systick for esp32s2 until we can fix the noted issues

* review improvements

- Fix intr prio array being off by one
- emabssy time prio interrupt set to max prio
- use cfg instead of feature for systick detection

* Update example time delays
2022-11-09 08:04:38 -08:00

78 lines
2.5 KiB
YAML

on:
pull_request:
branches:
- main
push:
workflow_dispatch:
name: CI-Async
env:
CARGO_TERM_COLOR: always
jobs:
# --------------------------------------------------------------------------
# Check Examples
check-async-riscv:
name: Check Async RISC-V Examples
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
chip_features:
[
{ chip: esp32c2, features: "embassy,embassy-time-systick" },
{ chip: esp32c3, features: "embassy,embassy-time-systick" },
]
toolchain: [nightly]
example:
[
"embassy_hello_world"
]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
target: riscv32imc-unknown-none-elf
toolchain: ${{ matrix.toolchain }}
default: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: check
args: --example ${{ matrix.example }} --manifest-path=${{ matrix.chip_features.chip }}-hal/Cargo.toml --target=riscv32imc-unknown-none-elf --features=${{ matrix.chip_features.features }}
check-async-xtensa:
name: Check Async Xtensa Examples
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
chip_features:
[
{ chip: esp32, features: "embassy,embassy-time-timg" },
# { chip: esp32s2, features: "embassy,embassy-time-systick" }, # Removed for now, see esp32s2-hal/Cargo.toml
{ chip: esp32s2, features: "embassy,embassy-time-timg" },
{ chip: esp32s3, features: "embassy,embassy-time-systick" },
{ chip: esp32s3, features: "embassy,embassy-time-timg" },
]
example:
[
"embassy_hello_world"
]
env:
RUSTFLAGS: "--cfg target_has_atomic=\"8\" --cfg target_has_atomic=\"16\" --cfg target_has_atomic=\"32\" --cfg target_has_atomic=\"ptr\""
steps:
- uses: actions/checkout@v2
- uses: esp-rs/xtensa-toolchain@v1.4
with:
default: true
ldproxy: false
buildtargets: ${{ matrix.chip_features.chip }}
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: check
args: -Zbuild-std=core --example ${{ matrix.example }} --manifest-path=${{ matrix.chip_features.chip }}-hal/Cargo.toml --target=xtensa-${{ matrix.chip_features.chip }}-none-elf --features=${{ matrix.chip_features.features }}