Skip to content

Commit

Permalink
trustee-attester: add CI
Browse files Browse the repository at this point in the history
cargo build/fmt/clippy --bin trustee-attester

Signed-off-by: Uri Lublin <[email protected]>
  • Loading branch information
uril committed Nov 18, 2024
1 parent 4693921 commit c11cb42
Showing 1 changed file with 93 additions and 0 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/trustee-attester.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: trustee-attester basic build

on:
pull_request:
paths:
- 'attestation-agent/**'
- '.github/workflows/trustee-attester.yml'
- 'Cargo.toml'
- 'Cargo.lock'
create:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
trustee_attester_ci:
name: Check
defaults:
run:
working-directory: ./attestation-agent/kbs_protocol/
strategy:
fail-fast: false
matrix:
rust:
- stable
instance:
- ubuntu-24.04
- s390x
include:
- instance: ubuntu-24.04
cargo_test_opts: "-p kbs_protocol --bin trustee-attester --no-default-features --features background_check,passport,openssl,all-attesters,bin"
- instance: s390x
cargo_test_opts: "-p kbs_protocol --bin trustee-attester --no-default-features --features background_check,passport,openssl,se-attester,bin"
runs-on: ${{ matrix.instance }}
steps:
- name: Code checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Install Rust toolchain (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy

- name: Install protoc
run: |
sudo apt-get update && sudo apt-get install -y protobuf-compiler
- uses: ./.github/actions/install-intel-dcap
with:
ubuntu-version: noble
if: matrix.instance == 'ubuntu-24.04'

- name: Install TPM dependencies
run: |
sudo apt-get update
sudo apt-get install -y libtss2-dev
if: matrix.instance == 'ubuntu-24.04'

- name: Install dm-verity dependencies
run: |
sudo apt-get update
sudo apt-get install -y libdevmapper-dev
- name: Run cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: ${{ matrix.cargo_test_opts }}

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: ${{ matrix.cargo_test_opts }}

- name: Run cargo fmt check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- name: Run rust clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: ${{ matrix.cargo_test_opts }}

0 comments on commit c11cb42

Please sign in to comment.