Skip to content

CI

CI #1069

Workflow file for this run

on:
push:
branches:
- main
tags:
- '**'
pull_request:
workflow_dispatch:
schedule:
- cron: "13 3 * * *"
name: CI
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv7em-none-eabi
- run: sudo apt update
- run: sudo apt install qemu-system-arm
- run: cargo build -p p256-cm4 --target thumbv7em-none-eabi
- run: cargo test -p testsuite --target thumbv7em-none-eabi
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
target: thumbv7em-none-eabi
- run: cargo clippy --all-features --target thumbv7em-none-eabi -- --deny warnings
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo +nightly fmt -- --check
rustdoc:
name: rustdoc
runs-on: ubuntu-latest
env: {"RUSTDOCFLAGS": "-D warnings --cfg docsrs"}
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
with:
target: thumbv7em-none-eabihf
- name: rustdoc
run: |
cd p256-cm4
cargo +nightly rustdoc --target thumbv7em-none-eabihf --all-features
release:
name: crates.io release
if: startsWith(github.ref, 'refs/tags/v')
needs:
- build
- clippy
- format
- rustdoc
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v6
- uses: rust-lang/crates-io-auth-action@v1
id: auth
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv7em-none-eabi
- run: cargo publish -p p256-cm4 --no-verify
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}