Add async support #14
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
name: Build and test | |
on: | |
push: | |
branches-ignore: | |
- '*.tmp' | |
tags: | |
- '*' | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
fmt: | |
name: fmt | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/[email protected] | |
with: | |
components: rustfmt | |
- run: cargo fmt --all -- --check | |
test: | |
name: test | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/[email protected] | |
- run: cargo test --lib --target x86_64-unknown-linux-gnu | |
- run: cargo test --doc --target x86_64-unknown-linux-gnu | |
test-msrv: | |
name: build with MSRV | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: 1.75 | |
- run: cargo build --lib --target x86_64-unknown-linux-gnu | |
- run: cargo build --lib --target x86_64-unknown-linux-gnu --features async | |
- run: cargo doc --target x86_64-unknown-linux-gnu | |
- run: cargo doc --target x86_64-unknown-linux-gnu --features async | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- arm-unknown-linux-gnueabi | |
# Raspberry Pi 2, 3, etc | |
- armv7-unknown-linux-gnueabihf | |
# Linux | |
- x86_64-unknown-linux-gnu | |
- x86_64-unknown-linux-musl | |
# Bare metal | |
- thumbv6m-none-eabi | |
include: | |
- target: thumbv7em-none-eabi | |
examples: true | |
- target: thumbv7em-none-eabihf | |
examples: true | |
- target: thumbv7m-none-eabi | |
examples: true | |
name: ${{matrix.target}} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/[email protected] | |
with: | |
components: rustfmt | |
- run: rustup target add ${{matrix.target}} | |
- run: cargo build --target ${{matrix.target}} --all-features --release | |
- if: ${{ matrix.examples }} | |
run: cargo build --target ${{matrix.target}} --examples --release | |
- if: ${{ matrix.examples }} | |
run: cargo build --target ${{matrix.target}} --all-features --examples --release | |
- run: cargo doc --all-features --target ${{matrix.target }} | |