forked from confidential-containers/guest-components
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (86 loc) · 3.02 KB
/
Copy pathaa_basic.yml
File metadata and controls
98 lines (86 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: attestation-agent basic build and unit tests
on:
push:
branches:
- "main"
paths:
- 'attestation-agent/**'
- '.github/workflows/aa_basic.yml'
- 'Cargo.toml'
- 'Cargo.lock'
pull_request:
paths:
- 'attestation-agent/**'
- '.github/workflows/aa_basic.yml'
- 'Cargo.toml'
- 'Cargo.lock'
create:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
basic_ci:
if: github.event_name != 'push'
name: Check
defaults:
run:
working-directory: ./attestation-agent
strategy:
fail-fast: false
matrix:
instance:
- ubuntu-24.04
- s390x
- ubuntu-24.04-arm
include:
- instance: ubuntu-24.04
make_args: ""
cargo_test_opts: "--features openssl,rust-crypto,all-attesters,kbs,coco_as,ttrpc,grpc"
- instance: s390x
make_args: "ATTESTER=se-attester TEE_PLATFORM=se"
cargo_test_opts: "--no-default-features --features openssl,passport,se-attester,kbs,coco_as"
- instance: ubuntu-24.04-arm
make_args: "ATTESTER=cca-attester TEE_PLATFORM=cca"
cargo_test_opts: "--no-default-features --features openssl,rust-crypto,passport,cca-attester,kbs,coco_as,ttrpc,grpc"
runs-on: ${{ matrix.instance }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
with:
egress-policy: audit
- name: Code checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1.15.2
with:
components: rustfmt, clippy
- 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: Gnu build and install with ttrpc
run: |
mkdir -p ${HOME}/.local/bin
eval make ttrpc=true ${MAKE_ARGS} && make install PREFIX=${HOME}/.local
env:
MAKE_ARGS: ${{ matrix.make_args }}
- name: Musl build with all platform
run: |
make LIBC=musl ttrpc=true ATTESTER=none
if: matrix.instance == 'ubuntu-24.04'
- name: Run cargo test
run: |
sudo -E PATH=$PATH -s cargo test ${{ matrix.cargo_test_opts }} -p attestation-agent -p attester -p coco_keyprovider -p kbc -p kbs_protocol -p crypto -p resource_uri
- name: Run cargo fmt check
run: cargo fmt --all -- --check
- name: Run rust lint check
run: |
sudo -E PATH=$PATH -s make lint