Skip to content

modifs workflow

modifs workflow #166

Workflow file for this run

name: Continuous Integration for ESP32
on:
push:
paths-ignore:
- "**/README.md"
- "**/logo"
- "**/schematic"
- "LICENCE"
- "logo.png"
- ".gitignore"
pull_request:
workflow_dispatch:
# Fail on any warning (clippy)
env:
RUSTFLAGS: "-Dwarnings"
jobs:
setup-toolchain:
name: Setup ESP32 Toolchain
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install ESP32 Toolchain with espup
run: |
curl -L https://github.com/esp-rs/embuild/releases/latest/download/ldproxy-x86_64-unknown-linux-gnu.zip -o $HOME/.cargo/bin/ldproxy.zip
unzip "$HOME/.cargo/bin/ldproxy.zip" -d "$HOME/.cargo/bin/"
chmod a+x $HOME/.cargo/bin/ldproxy
curl -L https://github.com/esp-rs/espup/releases/latest/download/espup-x86_64-unknown-linux-gnu -o espup
chmod a+x espup
./espup install
- name: Set ESP32 Environment Variables
run: |
export ESP_IDF_PATH=$HOME/.espressif/esp-idf
echo "ESP_IDF_PATH set to $ESP_IDF_PATH"
- name: Enable Caching
uses: Swatinem/rust-cache@v2
format:
name: Format Code
runs-on: ubuntu-latest
needs: setup-toolchain
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Format
run: cargo fmt
audit:
name: Audit Dependencies
runs-on: ubuntu-latest
needs: setup-toolchain
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Audit
run: |
cargo install cargo-audit
cargo audit
clippy:
name: Run Clippy
runs-on: ubuntu-latest
needs: setup-toolchain
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run Clippy
run: cargo clippy --all-targets --all-features
build:
name: Build (Release)
runs-on: ubuntu-latest
needs: setup-toolchain
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build
run: RUST_BACKTRACE=full cargo build --release --target xtensa-esp32-espidf