pounder_test/.github/workflows/ci.yml

94 lines
2.3 KiB
YAML

name: Continuous Integration
on:
push:
branches: [master, staging, trying]
pull_request:
branches: [master]
env:
CARGO_TERM_COLOR: always
jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: thumbv7em-none-eabihf
override: true
- name: cargo fmt --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --verbose
compile:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.optional }}
strategy:
matrix:
toolchain: [stable]
features: ['']
optional: [false]
include:
- toolchain: beta
features: ''
optional: false
- toolchain: stable
features: pounder_v1_1
optional: false
- toolchain: nightly
features: nightly
optional: true
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: thumbv7em-none-eabihf
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --features "${{ matrix.features }}"
- uses: actions/upload-artifact@v2
if: ${{ matrix.toolchain == 'stable' && matrix.features == '' }}
with:
name: stabilizer
path: |
target/*/release/dual-iir
test:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --package dsp --target=x86_64-unknown-linux-gnu
- name: cargo bench
uses: actions-rs/cargo@v1
with:
command: bench
args: --package dsp --target=x86_64-unknown-linux-gnu