Skip to content

Update ci.yml + add changelog.yml #6

Update ci.yml + add changelog.yml

Update ci.yml + add changelog.yml #6

Workflow file for this run

# This action builds* all the pushes to master, staging and trying which are required for bors.
# Additionally it builds* for each PR.
#
# * builds includes building, checking, testing, checking format and clippy, as well as the changelog.
on:
push:
branches: [master, staging, trying]
pull_request:
merge_group:
# Cancel any currently running workflows from the same PR, branch, or
# tag when a new workflow is triggered.
#
# https://stackoverflow.com/a/66336834
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
name: Run CI
jobs:
check:
name: Check
strategy:
matrix:
toolchain:
- stable
- nightly
os:
- ubuntu-latest
#- windows-latest
#- macos-14
features:
- log
- defmt
runs-on: ${{ matrix.os }}
env:
VCPKGRS_DYNAMIC: 1 # Use dynamic linking on Windows build (vcpkg)
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install riscv32imac-unknown-none-elf target
uses: dtolnay/rust-toolchain@v1
with:
target: riscv32imac-unknown-none-elf
toolchain: ${{ matrix.toolchain }}
components: rust-src
- name: Print rustc version
run: rustc --version
- name: Cache Dependencies
uses: Swatinem/[email protected]
- name: Run cargo check
run: cargo check --features ${{matrix.features}} --locked
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Run cargo fmt
run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install riscv32imac-unknown-none-elf target
run: rustup target add riscv32imac-unknown-none-elf
- name: Cache Dependencies
uses: Swatinem/[email protected]
- name: Run cargo clippy
run: cargo clippy --locked -- -D warnings