Merge pull request #156 from taks/merge-ble2904-into-cpfd #642
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
paths-ignore: '**/*.md' | |
pull_request: | |
paths-ignore: '**/*.md' | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- target: riscv32imc-esp-espidf | |
idf-version: v5.1.3 | |
rustflags: "-C default-linker-libraries --cfg espidf_time64" | |
ble5-example: true | |
- target: riscv32imc-esp-espidf | |
idf-version: v5.2.1 | |
rustflags: "-C default-linker-libraries --cfg espidf_time64" | |
- target: riscv32imc-esp-espidf | |
idf-version: v5.2.3 | |
rustflags: "-C default-linker-libraries --cfg espidf_time64" | |
- target: riscv32imac-esp-espidf | |
idf-version: v5.1.3 | |
rustflags: "-C default-linker-libraries --cfg espidf_time64" | |
mcu: esp32c6 | |
- target: xtensa-esp32-espidf | |
idf-version: v5.1.3 | |
rustflags: "--cfg espidf_time64" | |
ble-example: true | |
- target: xtensa-esp32-espidf | |
idf-version: v5.2.1 | |
rustflags: "--cfg espidf_time64" | |
- target: xtensa-esp32-espidf | |
idf-version: v5.2.3 | |
rustflags: "--cfg espidf_time64" | |
steps: | |
- name: Setup | Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust for Xtensa | |
uses: esp-rs/[email protected] | |
with: | |
default: true | |
ldproxy: true | |
- name: Setup | MCU | |
if: ${{ matrix.mcu }} | |
run: echo "MCU=${{ matrix.mcu }}" >> "$GITHUB_ENV" | |
- name: Setup env | |
run: | | |
echo "ESP_IDF_VERSION=${{ matrix.idf-version }}" >> "$GITHUB_ENV" | |
echo "RUSTFLAGS=${{ matrix.rustflags }}" >> "$GITHUB_ENV" | |
- name: Fmt check | |
run: cargo fmt --check | |
- name: Clippy check | |
run: cargo clippy --target ${{ matrix.target }} -- -D clippy::all -D warnings | |
- name: Build | |
run: cargo build --target ${{ matrix.target }} | |
- name: Build | no_std | |
run: cargo build --target ${{ matrix.target }} --no-default-features --features no_std | |
- name: Build | Examples | |
if: matrix.ble-example | |
run: cargo build --target ${{ matrix.target }} --example ble_* | |
- name: Build | Examples(ble5) | |
if: matrix.ble5-example | |
run: cargo build --target ${{ matrix.target }} --example ble5_* |