83 lines
2.1 KiB
YAML
83 lines
2.1 KiB
YAML
on:
|
|
push:
|
|
branches: [ staging, trying, master ]
|
|
pull_request:
|
|
|
|
name: Build
|
|
|
|
env:
|
|
RUSTFLAGS: '--deny warnings'
|
|
MSRV: 1.76
|
|
|
|
jobs:
|
|
build-std:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
FEATURES: ['', 'from_str', 'std', 'serde', 'regex']
|
|
TARGET: ['x86_64-unknown-linux-gnu']
|
|
|
|
include:
|
|
# Test nightly but don't fail
|
|
- rust: nightly
|
|
experimental: true
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: ${{ env.MSRV }}
|
|
target: ${{ matrix.TARGET }}
|
|
- name: Build std
|
|
run: cargo build --target=${{ matrix.TARGET }} --features=${{ matrix.FEATURES }}
|
|
- name: Test std
|
|
run: cargo test --target=${{ matrix.TARGET }} --features=${{ matrix.FEATURES }}
|
|
|
|
build-no-std:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
TARGET: [thumbv6m-none-eabi, thumbv7m-none-eabi]
|
|
|
|
include:
|
|
# Test nightly but don't fail
|
|
- rust: nightly
|
|
experimental: true
|
|
TARGET: x86_64-unknown-linux-gnu
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: ${{ env.MSRV }}
|
|
target: ${{ matrix.TARGET }}
|
|
- name: Build std
|
|
run: cargo build --target=${{ matrix.TARGET }} --features=${{ matrix.FEATURES }}
|
|
|
|
fmt:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: ${{ env.MSRV }}
|
|
target: ${{ matrix.TARGET }}
|
|
components: rustfmt
|
|
- name: Format
|
|
run: cargo fmt --all -- --check
|
|
|
|
clippy:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
FEATURES: ['', 'from_str', 'std', 'serde', 'regex']
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: ${{ env.MSRV }}
|
|
target: ${{ matrix.TARGET }}
|
|
components: clippy
|
|
- name: Clippy
|
|
run: cargo clippy --features=${{ matrix.FEATURES }} -- -D warnings
|