Document and enforce generic constants in ControlBuilder #194
This file contains hidden or 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: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| push: | |
| branches: | |
| - main | |
| merge_group: | |
| workflow_dispatch: | |
| env: | |
| RUSTFLAGS: -Dwarnings | |
| CARGO_TERM_COLOR: always | |
| MSRV: "1.88.0" | |
| DEFMT_LOG: trace | |
| # 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: | |
| blinksy: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| toolchain: | |
| - stable | |
| - 1.88.0 # msrv | |
| env: | |
| CARGO_TARGET_DIR: ${{ github.workspace }}/target | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: "ci" | |
| cache-all-crates: true | |
| - name: Check | |
| shell: bash | |
| run: cargo check | |
| - name: Check async | |
| shell: bash | |
| run: cargo check --features async | |
| - name: Test | |
| shell: bash | |
| run: cargo test | |
| blinksy-esp: | |
| name: blinksy-esp (${{ matrix.device.soc }}) | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_TARGET_DIR: ${{ github.workspace }}/target | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| device: [ | |
| { soc: "esp32", toolchain: "esp" }, | |
| ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: esp-rs/[email protected] | |
| if: matrix.device.toolchain == 'esp' | |
| with: | |
| version: 1.88.0.0 | |
| ldproxy: false | |
| buildtargets: ${{ matrix.device.soc }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: "ci-${{ matrix.device.soc }}" | |
| cache-all-crates: true | |
| - name: Check blinksy-esp | |
| shell: bash | |
| working-directory: ./esp | |
| run: cargo +${{ matrix.device.toolchain }} check -p blinksy-esp -F ${{ matrix.device.soc }} | |
| - name: Check blinksy-esp (async feature) | |
| shell: bash | |
| working-directory: ./esp | |
| run: cargo +${{ matrix.device.toolchain }} check -p blinksy-esp -F ${{ matrix.device.soc }},async | |
| gledopto: | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_TARGET_DIR: ${{ github.workspace }}/target | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| device: [ | |
| { board: "gl_c_016wl_d", toolchain: "esp", soc: "esp32" }, | |
| ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: esp-rs/[email protected] | |
| if: matrix.device.toolchain == 'esp' | |
| with: | |
| version: 1.88.0.0 | |
| ldproxy: false | |
| buildtargets: ${{ matrix.device.soc }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: "ci-${{ matrix.device.board }}" | |
| cache-all-crates: true | |
| - name: Check gledopto | |
| shell: bash | |
| working-directory: ./esp | |
| run: cargo +${{ matrix.device.toolchain }} check -p gledopto -F ${{ matrix.device.board }} | |
| - name: Check gledopto (embassy feature) | |
| shell: bash | |
| working-directory: ./esp | |
| run: cargo +${{ matrix.device.toolchain }} check -p gledopto -F ${{ matrix.device.board }},embassy | |
| lint: | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_TARGET_DIR: ${{ github.workspace }}/target | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: "ci" | |
| cache-all-crates: true | |
| - name: Fmt | |
| shell: bash | |
| run: cargo fmt --all -- --check | |
| - name: Clippy | |
| shell: bash | |
| run: cargo clippy -- -D warnings | |
| lint-esp: | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_TARGET_DIR: ${{ github.workspace }}/target | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: esp-rs/[email protected] | |
| with: | |
| ldproxy: false | |
| version: 1.88.0.0 | |
| buildtargets: esp32 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: "ci-lint" | |
| cache-all-crates: true | |
| - name: Fmt | |
| shell: bash | |
| working-directory: ./esp | |
| run: cargo +esp fmt --all -- --check | |
| - name: Clippy | |
| shell: bash | |
| working-directory: ./esp | |
| run: cargo +esp clippy -F gl_c_016wl_d -- -D warnings |