This repository has been archived by the owner on Jan 27, 2025. It is now read-only.
Added feature gate to work with latest embassy. #25
Workflow file for this run
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
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
name: CI | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
target: thumbv6m-none-eabi | |
- name: Run cargo format in check mode | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Cache artifacts | |
uses: Swatinem/rust-cache@v2 | |
- name: Install flip-link | |
uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: flip-link | |
- name: Run cargo build | |
uses: actions-rs/cargo@v1 | |
env: | |
RUSTFLAGS: -D warnings | |
with: | |
command: build | |
args: --release | |
docs: | |
name: Docs | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
packages: read | |
needs: | |
- build | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
target: thumbv6m-none-eabi | |
- name: Cache artifacts | |
uses: Swatinem/rust-cache@v2 | |
- name: Run cargo doc | |
uses: actions-rs/cargo@v1 | |
with: | |
command: doc | |
# https://github.com/actions/upload-pages-artifact#file-permissions | |
- run: chmod -c -R +rX ./target/thumbv6m-none-eabi/doc | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ./target/thumbv6m-none-eabi/doc | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |