Skip to content

Switch to STM32F103, dual FUSB302B hardware #41

Switch to STM32F103, dual FUSB302B hardware

Switch to STM32F103, dual FUSB302B hardware #41

Workflow file for this run

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: thumbv7m-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: 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