mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-26 20:00:32 +00:00

* Use cargo-batch * Run CI on mac runner * Rely on MSRV and nightly jobs to lint * Build docs separately * Don't copy examples - fix builds on stable * Run everything by default, set CI env var in ci command * Run batched commands with RUSTC_BOOTSTRAP enabled * Force cargo-batch to correctly ignore unstable option * Test with nightly * Use a persistent target folder, remove cache * Don't delete the lp examples * Restore target dir * Build with stable again * Fix rebase fail * Remove handling tests * Remove redundant code * Restore repeated test run option * Add simpler cargo check * Introduce check-packages * Remove stabilized -Zdoctest-xcompile * Clean up commented code * Remove more stuff * Fix uart_uhci test * No badger for us
74 lines
2.2 KiB
YAML
74 lines
2.2 KiB
YAML
name: CI - nightly
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 0 * * *"
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
RUSTDOCFLAGS: -Dwarnings
|
|
DEFMT_LOG: trace
|
|
|
|
jobs:
|
|
esp-hal-nightly:
|
|
name: esp-hal | nightly (${{ matrix.device }})
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CI: 1
|
|
SSID: SSID
|
|
PASSWORD: PASSWORD
|
|
STATIC_IP: 1.1.1.1
|
|
GATEWAY_IP: 1.1.1.1
|
|
HOST_IP: 1.1.1.1
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
device: ["esp32c2", "esp32c3", "esp32c6", "esp32h2"]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
# Install the Rust nightly toolchain for RISC-V devices:
|
|
- uses: dtolnay/rust-toolchain@v1
|
|
with:
|
|
target: riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf
|
|
toolchain: nightly
|
|
components: rust-src, clippy, rustfmt
|
|
|
|
- name: Setup cargo-batch
|
|
run: |
|
|
# Note this is linux-only, but the macOS runner has cargo batch installed
|
|
if ! command -v cargo-batch &> /dev/null; then
|
|
mkdir -p $HOME/.cargo/bin
|
|
curl -L https://github.com/embassy-rs/cargo-batch/releases/download/batch-0.6.0/cargo-batch > $HOME/.cargo/bin/cargo-batch
|
|
chmod +x $HOME/.cargo/bin/cargo-batch
|
|
fi
|
|
|
|
- name: Build and Check
|
|
shell: bash
|
|
run: cargo xtask ci ${{ matrix.device }} --toolchain nightly
|
|
|
|
- if: failure()
|
|
name: Create or Update GitHub Issue
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
sudo apt-get install gh -y
|
|
ISSUE_NAME=$(gh issue list --state open --search "Nightly CI Failure in:title" --json number --jq '.[0].number')
|
|
|
|
if [[ -z "$ISSUE_NAME" ]];
|
|
then
|
|
gh issue create \
|
|
--title "Nightly CI Failure" \
|
|
--body "Nightly CI Workflow Failed! [View the failed job](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})." \
|
|
--label "ci-nightly"
|
|
fi
|
|
|
|
# Check for unused dependencies through esp-hal packages
|
|
- name: Install and run cargo machete
|
|
run: |
|
|
cargo install cargo-machete
|
|
cargo machete
|