Continuous Integration #630
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: Continuous Integration | |
on: | |
merge_group: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
schedule: | |
# UTC | |
- cron: '48 4 * * *' | |
env: | |
CARGO_TERM_COLOR: always | |
permissions: write-all | |
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 | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install Python Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e py | |
pip install pylint | |
- name: Run Pylint | |
run: | | |
pylint py/thermostat | |
compile: | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.continue-on-error }} | |
strategy: | |
matrix: | |
# keep MSRV in sync in ci.yaml and Cargo.toml | |
toolchain: [stable, '1.75.0'] | |
features: [''] | |
continue-on-error: [false] | |
include: | |
- toolchain: beta | |
features: '' | |
continue-on-error: true | |
- toolchain: nightly | |
features: nightly | |
continue-on-error: 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 }}" | |
doc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: thumbv7em-none-eabihf | |
override: true | |
- 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 idsp -p thermostat-eem | |
- 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-intra-doc-links |