Skip to content

Merge pull request #482 from HaoboGu/fix/macro_caps #2

Merge pull request #482 from HaoboGu/fix/macro_caps

Merge pull request #482 from HaoboGu/fix/macro_caps #2

Workflow file for this run

name: Build
on:
push:
branches: ["main"]
paths: ["examples/**", "rmk/**", "rmk-macro/**", "rmk-config/**"]
pull_request:
branches: ["main"]
paths: ["examples/**", "rmk/**", "rmk-macro/**", "rmk-config/**"]
workflow_dispatch:
# 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 }}
env:
CARGO_TERM_COLOR: always
jobs:
build-examples:
runs-on: ubuntu-latest
strategy:
matrix:
example:
- nrf52832_ble
- nrf52840_ble
- nrf52840_ble_split
- rp2040
- rp2040_split
- rp2040_direct_pin
- pi_pico_w_ble
- pi_pico_w_ble_split
- stm32f1
- stm32f4
- stm32h7
- esp32c3_ble
- esp32c6_ble
example_type:
- use_rust
- use_config
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: cargo-bins/cargo-binstall@main
- uses: actions/checkout@v3
- name: Install cargo-make and flip-link
run: cargo binstall cargo-make flip-link
- name: Install target
run: rustup target add thumbv6m-none-eabi thumbv7em-none-eabihf thumbv7m-none-eabi riscv32imac-unknown-none-elf riscv32imc-unknown-none-elf
- name: Build example
working-directory: ./examples/${{ matrix.example_type }}/${{ matrix.example }}
run: cargo build --release
- name: Build example uf2
if: ${{ matrix.example != 'esp32c3_ble' && matrix.example != 'esp32c6_ble' }}
working-directory: ./examples/${{ matrix.example_type }}/${{ matrix.example }}
run: cargo make uf2 --release
build-esp32s3:
runs-on: ubuntu-latest
strategy:
matrix:
chip:
- esp32s3
example_type:
- use_rust
- use_config
steps:
- uses: cargo-bins/cargo-binstall@main
- uses: actions/checkout@v3
- name: Install espup
run: cargo binstall espup --locked -y
- name: Install esp toolchain
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} espup install
- name: Build
working-directory: ./examples/${{ matrix.example_type }}/${{ matrix.chip }}_ble
run: . /home/runner/export-esp.sh && cargo +esp build --release