Skip to content

ci: Use esp-hal example instead of themplate #24

ci: Use esp-hal example instead of themplate

ci: Use esp-hal example instead of themplate #24

Workflow file for this run

name: Build and Run Integration tests
on:
pull_request:
branches:
- main
push:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
# 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:
build:
name: Generate and Build App
strategy:
fail-fast: false
runs-on: ubuntu-20.04
steps:
- uses: dtolnay/rust-toolchain@nightly
with:
target: riscv32imac-unknown-none-elf
components: clippy,rustfmt,rust-src
- uses: Swatinem/rust-cache@v2
- uses: actions/checkout@v4
with:
repository: esp-rs/esp-hal
path: esp-hal
- run: cargo build --release --example hello_world
working-directory: esp-hal/esp32c3-hal
- uses: actions/upload-artifact@v3
with:
name: esp32c3_app
path: esp-hal/esp32c3-hal/target/riscv32imc-unknown-none-elf/release/examples/hello_world
if-no-files-found: error
run-target:
name: Run Tests on Target
if: ${{ github.repository_owner == 'esp-rs' }}
needs: build
runs-on: [self-hosted, linux, x64, esp32c3]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: esp32c3_app
path: espflash/esp32c3_app
- uses: ./.github/actions/setup-target
with:
arch: x86_64
target: x86_64-unknown-linux-gnu
- name: Run Tests
run: ESPFLASH_PORT=/dev/ttyACM0 ESPFLASH_APP=esp32c3_app/hello_world cargo test