Fix/initramfs/create valid image #94
Workflow file for this run
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: ci | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
component: ["api", "agent", "initramfs"] | |
include: | |
- component: agent | |
dependencies: "libudev-dev protobuf-compiler" | |
- component: api | |
dependencies: "protobuf-compiler" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: default | |
- name: Install clippy | |
run: rustup component add clippy | |
- name: Install rustfmt | |
run: rustup component add rustfmt | |
- if: ${{ matrix.dependencies }} | |
name: Install dependencies | |
run: sudo apt install -y ${{ matrix.dependencies }} | |
- name: Use cargo cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: ${{ matrix.component }} | |
- name: Build | |
run: cargo build -p ${{ matrix.component }} | |
- name: Lint | |
run: cargo clippy -p ${{ matrix.component }} --no-deps -- -D warnings | |
- name: Format | |
run: cargo fmt -p ${{ matrix.component }} -- --check --config format_code_in_doc_comments=true |