2020-06-16 23:32:28 +08:00
|
|
|
name: Continuous Integration
|
|
|
|
|
2019-09-11 23:28:53 +08:00
|
|
|
on:
|
|
|
|
push:
|
2020-11-05 15:13:55 +08:00
|
|
|
branches: [master, staging, trying]
|
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
2021-02-24 00:31:44 +08:00
|
|
|
schedule:
|
|
|
|
# UTC
|
|
|
|
- cron: '48 4 * * *'
|
2020-06-16 22:54:40 +08:00
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
2019-09-11 23:28:53 +08:00
|
|
|
jobs:
|
2020-06-16 22:54:40 +08:00
|
|
|
style:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2021-01-09 02:09:42 +08:00
|
|
|
toolchain: stable
|
2020-12-11 22:19:13 +08:00
|
|
|
target: thumbv7em-none-eabihf
|
2020-06-16 22:54:40 +08:00
|
|
|
override: true
|
|
|
|
- name: cargo fmt --check
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --all -- --check
|
2020-11-26 21:48:02 +08:00
|
|
|
- uses: actions-rs/clippy-check@v1
|
2020-06-16 22:54:40 +08:00
|
|
|
with:
|
2020-11-26 21:48:02 +08:00
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2021-01-20 22:02:35 +08:00
|
|
|
- name: cargo check
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
|
|
|
args: --verbose
|
2020-06-16 22:54:40 +08:00
|
|
|
|
|
|
|
compile:
|
|
|
|
runs-on: ubuntu-latest
|
2021-02-05 00:01:18 +08:00
|
|
|
continue-on-error: ${{ matrix.toolchain == 'nightly' }}
|
2020-06-16 22:54:40 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-02-03 23:50:18 +08:00
|
|
|
toolchain: [stable]
|
|
|
|
features: ['']
|
2021-02-01 02:31:09 +08:00
|
|
|
include:
|
|
|
|
- toolchain: beta
|
2021-02-04 00:24:06 +08:00
|
|
|
features: ''
|
2021-02-01 02:31:09 +08:00
|
|
|
- toolchain: stable
|
|
|
|
features: pounder_v1_1
|
2021-02-03 23:50:18 +08:00
|
|
|
- toolchain: nightly
|
|
|
|
features: nightly
|
2020-06-16 22:54:40 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-02-03 23:50:18 +08:00
|
|
|
- uses: actions-rs/toolchain@v1
|
2020-06-16 22:54:40 +08:00
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.toolchain }}
|
2020-06-16 23:13:35 +08:00
|
|
|
target: thumbv7em-none-eabihf
|
2020-06-16 22:54:40 +08:00
|
|
|
override: true
|
2021-02-03 23:50:18 +08:00
|
|
|
- uses: actions-rs/cargo@v1
|
2020-06-16 22:54:40 +08:00
|
|
|
with:
|
|
|
|
command: build
|
2021-02-03 23:50:18 +08:00
|
|
|
args: --release --features "${{ matrix.features }}"
|
2021-01-06 21:59:01 +08:00
|
|
|
|
2020-11-19 06:55:55 +08:00
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
toolchain:
|
|
|
|
- stable
|
|
|
|
- beta
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-02-03 23:50:18 +08:00
|
|
|
- uses: actions-rs/toolchain@v1
|
2020-11-19 06:55:55 +08:00
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.toolchain }}
|
|
|
|
- name: cargo test
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
2020-12-05 00:13:02 +08:00
|
|
|
args: --package dsp --target=x86_64-unknown-linux-gnu
|
2020-12-11 22:19:13 +08:00
|
|
|
- name: cargo bench
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: bench
|
|
|
|
args: --package dsp --target=x86_64-unknown-linux-gnu
|
2021-07-15 19:28:19 +08:00
|
|
|
|
|
|
|
doc:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-07-16 17:23:01 +08:00
|
|
|
|
|
|
|
- uses: actions/setup-ruby@v1
|
|
|
|
with:
|
|
|
|
ruby-version: 2.7.x
|
|
|
|
|
2021-07-19 19:25:14 +08:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: docs/vendor/bundle
|
2021-07-19 19:33:27 +08:00
|
|
|
key: ${{runner.os}}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
2021-07-19 19:25:14 +08:00
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gems-
|
2021-07-16 17:23:01 +08:00
|
|
|
|
2021-07-19 19:48:10 +08:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: cargo-cache
|
2021-07-19 19:56:39 +08:00
|
|
|
key: ${{runner.os}}-cargo-${{ hashFiles('cargo-cache/bins/*') }}
|
2021-07-19 19:48:10 +08:00
|
|
|
restore-keys: |
|
2021-07-19 19:56:39 +08:00
|
|
|
${{runner.os}}-cargo-
|
2021-07-19 19:48:10 +08:00
|
|
|
|
2021-07-15 19:28:19 +08:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
target: thumbv7em-none-eabihf
|
|
|
|
override: true
|
2021-07-19 19:25:14 +08:00
|
|
|
|
2021-07-15 19:28:19 +08:00
|
|
|
- name: Install Deadlinks
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: install
|
2021-07-19 19:48:10 +08:00
|
|
|
args: |
|
|
|
|
--root cargo-cache
|
|
|
|
cargo-deadlinks
|
2021-07-15 19:28:19 +08:00
|
|
|
|
2021-07-19 19:55:21 +08:00
|
|
|
- name: Update Path
|
|
|
|
run: echo "./cargo-cache" >> $GITHUB_PATH
|
|
|
|
|
2021-07-15 19:28:19 +08:00
|
|
|
- name: cargo doc
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: doc
|
|
|
|
args: --no-deps -p miniconf -p dsp -p ad9959 -p stabilizer
|
2021-07-16 17:23:01 +08:00
|
|
|
|
2021-07-15 19:28:19 +08:00
|
|
|
- name: cargo deadlinks
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: deadlinks
|
2021-07-16 17:36:39 +08:00
|
|
|
# We intentionally ignore fragments, as RTIC may generate fragments for various
|
|
|
|
# auto-generated code.
|
2021-07-16 22:07:59 +08:00
|
|
|
args: --dir target/thumbv7em-none-eabihf/doc --ignore-fragments --check-http --check-intra-doc-links
|
2021-07-16 17:23:01 +08:00
|
|
|
|
2021-07-19 19:32:18 +08:00
|
|
|
- name: Test Site
|
2021-07-16 17:23:01 +08:00
|
|
|
working-directory: docs
|
2021-07-16 20:12:08 +08:00
|
|
|
run: |
|
2021-07-19 19:48:10 +08:00
|
|
|
# Install depedencies at our cache location
|
|
|
|
bundle config path vendor/bundle
|
|
|
|
bundle install
|
|
|
|
|
2021-07-19 19:32:18 +08:00
|
|
|
rake build
|
2021-07-16 21:00:40 +08:00
|
|
|
mv ../target/thumbv7em-none-eabihf/doc _site/stabilizer/firmware
|
2021-07-19 19:32:18 +08:00
|
|
|
rake test
|