142 lines
3.6 KiB
YAML
142 lines
3.6 KiB
YAML
name: Continuous Integration
|
|
|
|
on:
|
|
push:
|
|
branches: [master, staging, trying]
|
|
pull_request:
|
|
branches: [master]
|
|
schedule:
|
|
# UTC
|
|
- cron: '48 4 * * *'
|
|
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.toolchain == 'nightly' }}
|
|
strategy:
|
|
matrix:
|
|
toolchain: [stable]
|
|
features: ['']
|
|
include:
|
|
- toolchain: beta
|
|
features: ''
|
|
- toolchain: stable
|
|
features: pounder_v1_1
|
|
- toolchain: nightly
|
|
features: nightly
|
|
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 }}"
|
|
|
|
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
|
|
|
|
doc:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-ruby@v1
|
|
with:
|
|
ruby-version: 2.7.x
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
target: thumbv7em-none-eabihf
|
|
override: true
|
|
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: docs/vendor/bundle
|
|
key: ${{runner.os}}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gems-
|
|
|
|
- uses: Swatinem/rust-cache@v1
|
|
|
|
- name: Install Deadlinks
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: install
|
|
args: |
|
|
cargo-deadlinks
|
|
|
|
- name: cargo doc
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: doc
|
|
args: --no-deps -p miniconf -p dsp -p ad9959 -p stabilizer
|
|
|
|
- name: cargo deadlinks
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: deadlinks
|
|
# We intentionally ignore fragments, as RTIC may generate fragments for various
|
|
# auto-generated code.
|
|
args: --dir target/thumbv7em-none-eabihf/doc --ignore-fragments --check-http --check-intra-doc-links
|
|
|
|
- name: Test Site
|
|
working-directory: docs
|
|
run: |
|
|
# Install depedencies at our cache location
|
|
bundle config path vendor/bundle
|
|
bundle install
|
|
|
|
bundle exec rake build
|
|
mv ../target/thumbv7em-none-eabihf/doc _site/stabilizer/firmware
|
|
bundle exec rake test
|