Skip to content

Fix/initramfs/create valid image #78

Fix/initramfs/create valid image

Fix/initramfs/create valid image #78

Workflow file for this run

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