diff --git a/.github/workflows/aa_basic.yml b/.github/workflows/aa_basic.yml index 29015fc35..bfcbd5d54 100644 --- a/.github/workflows/aa_basic.yml +++ b/.github/workflows/aa_basic.yml @@ -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: @@ -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 @@ -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 @@ -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