Skip to content

Commit

Permalink
Conquer aa_basic.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
BbolroC committed Jun 10, 2024
1 parent 9262b81 commit d5cf573
Showing 1 changed file with 33 additions and 14 deletions.
47 changes: 33 additions & 14 deletions .github/workflows/aa_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ 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'
- "enable-ci-for-s390x"
# - "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:

Expand All @@ -30,6 +31,16 @@ jobs:
matrix:
rust:
- stable
target_arch:
- x86_64
- s390x
include:
- target_arch: x86_64
make_args: ""
cargo_opts: ""
- target_arch: s390x
make_args: "ATTESTER=none TEE_PLATFORM="
cargo_opts: "--no-default-features --features openssl,csv-attester,kbs,coco_as -p attestation-agent -p attester -p coco_keyprovider -p kbc -p kbs_protocol -p crypto -p resource_uri"
steps:
- name: Code checkout
uses: actions/checkout@v4
Expand All @@ -54,30 +65,38 @@ jobs:
sudo echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy main' | sudo tee /etc/apt/sources.list.d/intel-sgx.list
sudo apt-get update
sudo apt-get install -y --no-install-recommends libtdx-attest-dev
if: matrix.target_arch == 'x86_64'

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

- name: Install dm-verity dependencies
run: |
sudo apt-get update
sudo apt-get install -y libdevmapper-dev
if: matrix.target_arch == 'x86_64'

- name: Gnu build and install with ttrpc
run: |
make ttrpc=true && make install
eval make ttrpc=true ${MAKE_ARGS} && make install
env:
ARCH: ${{ matrix.target_arch }}
MAKE_ARGS: ${{ matrix.make_args }}

- name: Musl build with all platform
run: |
make LIBC=musl ttrpc=true ATTESTER=none
if: matrix.target_arch == 'x86_64'

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --features openssl,rust-crypto,all-attesters,kbs,coco_as -p attestation-agent -p attester -p coco_keyprovider -p kbc -p kbs_protocol -p crypto -p resource_uri
if: matrix.target_arch == 'x86_64' # will be enabled after https://github.com/confidential-containers/trustee/pull/383

- name: Run cargo fmt check
uses: actions-rs/cargo@v1
Expand All @@ -90,4 +109,4 @@ jobs:
with:
command: clippy
# We are getting error in generated code due to derive_partial_eq_without_eq check, so ignore it for now
args: --workspace -- -D warnings -A clippy::derive-partial-eq-without-eq
args: ${{ matrix.cargo_opts }} -- -D warnings -A clippy::derive-partial-eq-without-eq

0 comments on commit d5cf573

Please sign in to comment.