Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm64 rust 1.82.0 test #4

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions .github/workflows/aa_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,24 @@ jobs:
- stable
instance:
- ubuntu-24.04
- s390x
#- 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: 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"
# TODO: remove 1.82.0 when the following issue is resolved
# https://github.com/rust-lang/rust/issues/135867
rust: 1.82.0
exclude:
- instance: ubuntu-24.04-arm
rust: stable
runs-on: ${{ matrix.instance }}
steps:
- name: Code checkout
Expand Down
29 changes: 21 additions & 8 deletions .github/workflows/aa_cc_kbc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,28 @@ jobs:
defaults:
run:
working-directory: ./attestation-agent
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
rust:
- stable
attester:
- snp-attester
- tdx-attester
- az-snp-vtpm-attester
- az-tdx-vtpm-attester
# TODO: change 1.82.0 to stable when the following issue is resolved
# https://github.com/rust-lang/rust/issues/135867
- 1.82.0
instance:
- ubuntu-24.04
- ubuntu-24.04-arm
include:
- instance: ubuntu-24.04
attester: snp-attester
- instance: ubuntu-24.04
attester: tdx-attester
- instance: ubuntu-24.04
attester: az-snp-vtpm-attester
- instance: ubuntu-24.04
attester: az-tdx-vtpm-attester
- instance: ubuntu-24.04-arm
attester: cca-attester
runs-on: ${{ matrix.instance }}
steps:
- name: Code checkout
uses: actions/checkout@v4
Expand All @@ -52,16 +63,18 @@ jobs:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt
components: rustfmt, clippy

- 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 protoc
run: |
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/aa_crypto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,32 @@ jobs:
defaults:
run:
working-directory: ./attestation-agent
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
instance:
- ubuntu-24.04
- ubuntu-24.04-arm
suites:
- rust-crypto
- openssl
runs-on: ${{ matrix.instance }}

steps:
- name: Code checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Install Rust toolchain (stable)
# TODO: change 1.82.0 to stable when the following issue is resolved
# https://github.com/rust-lang/rust/issues/135867
- name: Install Rust toolchain (1.82.0)
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
toolchain: 1.82.0
override: true
components: rustfmt
components: rustfmt, clippy

- name: Run rust fmt check
uses: actions-rs/cargo@v1
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/aa_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Cut Release
on:
release:
types: [published]
workflow_dispatch:

jobs:
build-and-push-images:
Expand All @@ -13,6 +14,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -25,6 +32,6 @@ jobs:
with:
context: .
file: ./attestation-agent/docker/Dockerfile.keyprovider
platforms: linux/amd64
push: true
platforms: linux/amd64,linux/arm64
push: false
tags: ghcr.io/confidential-containers/staged-images/coco-keyprovider:${{ github.sha }}, ghcr.io/confidential-containers/staged-images/coco-keyprovider:latest
9 changes: 7 additions & 2 deletions .github/workflows/aa_sample_keyprovider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@ jobs:
coco_keyprovider_ci:
if: github.event_name != 'push'
name: Check
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
rust:
- stable
# TODO: change 1.82.0 to stable when the following issue is resolved
# https://github.com/rust-lang/rust/issues/135867
- 1.82.0
instance:
- ubuntu-24.04
- ubuntu-24.04-arm
runs-on: ${{ matrix.instance }}

steps:
- name: Code checkout
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/aa_sev_kbc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ jobs:
fail-fast: false
matrix:
rust:
- stable
# TODO: change 1.82.0 to stable when the following issue is resolved
# https://github.com/rust-lang/rust/issues/135867
- 1.82.0
kbc:
- offline_sev_kbc
- online_sev_kbc
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/api-server-rest-basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ jobs:
matrix:
instance:
- ubuntu-24.04
- s390x
#- s390x
- ubuntu-24.04-arm
rust:
- stable
# TODO: change 1.82.0 to stable when the following issue is resolved
# https://github.com/rust-lang/rust/issues/135867
- 1.82.0
runs-on: ${{ matrix.instance }}
steps:
- name: Code checkout
Expand All @@ -63,7 +66,7 @@ jobs:
- name: Musl build with default features
run: |
make LIBC=musl
if: matrix.instance == 'ubuntu-24.04'
if: ${{ startsWith(matrix.instance, 'ubuntu-24.04') }}

- name: Run cargo test
uses: actions-rs/cargo@v1
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/cdh_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ jobs:
matrix:
instance:
- ubuntu-24.04
- s390x
#- s390x
- ubuntu-24.04-arm
rust:
- stable
# TODO: change 1.82.0 to stable when the following issue is resolved
# https://github.com/rust-lang/rust/issues/135867
- 1.82.0
runs-on: ${{ matrix.instance }}
steps:
- name: Code checkout
Expand All @@ -63,7 +66,7 @@ jobs:
- name: Musl build
run: |
make LIBC=musl
if: matrix.instance == 'ubuntu-24.04'
if: ${{ startsWith(matrix.instance, 'ubuntu-24.04') }}

- name: Run cargo test
run: |
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/image_rs_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ jobs:
fail-fast: false
matrix:
rust:
- 1.83.0
- stable
# TODO: change 1.82.0 to 1.83.0 and stable when the following issue is resolved
# https://github.com/rust-lang/rust/issues/135867
- 1.82.0
instance:
- ubuntu-24.04
- s390x
#- s390x
- ubuntu-24.04-arm
runs-on: ${{ matrix.instance }}
steps:
- name: Code checkout
Expand Down Expand Up @@ -142,4 +144,4 @@ jobs:
- name: Run cargo test - kata-cc (native-tls version) with keywrap-ttrpc (default) + keywrap-jwe + nydus
run: |
sudo -E PATH=$PATH -s cargo test -p image-rs --no-default-features --features=kata-cc-native-tls,keywrap-jwe,nydus
if: matrix.instance == 'ubuntu-24.04'
if: ${{ startsWith(matrix.instance, 'ubuntu-24.04') }}
10 changes: 7 additions & 3 deletions .github/workflows/ocicrypt_rs_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ jobs:
ci:
if: github.event_name != 'push'
name: Check
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
instance:
- ubuntu-24.04
- ubuntu-24.04-arm
rust:
- 1.83.0
- stable
# TODO: change 1.82.0 to 1.83.0 and stable when the following issue is resolved
# https://github.com/rust-lang/rust/issues/135867
- 1.82.0
runs-on: ${{ matrix.instance }}

steps:
- name: Code checkout
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/publish-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:
- main

env:
RUST_TOOLCHAIN: 1.83.0
# TODO: change 1.82.0 to 1.83.0 when the following issue is resolved
# https://github.com/rust-lang/rust/issues/135867
RUST_TOOLCHAIN: 1.82.0

jobs:
publish-aa:
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/trustee-attester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,20 @@ jobs:
fail-fast: false
matrix:
rust:
- stable
# TODO: change 1.82.0 to stable when the following issue is resolved
# https://github.com/rust-lang/rust/issues/135867
- 1.82.0
instance:
- ubuntu-24.04
- s390x
#- s390x
- ubuntu-24.04-arm
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"
#- instance: s390x
# cargo_test_opts: "-p kbs_protocol --bin trustee-attester --no-default-features --features background_check,passport,openssl,se-attester,bin"
- instance: ubuntu-24.04-arm
cargo_test_opts: "-p kbs_protocol --bin trustee-attester --no-default-features --features background_check,passport,openssl,cca-attester,bin"
runs-on: ${{ matrix.instance }}
steps:
- name: Code checkout
Expand Down
7 changes: 5 additions & 2 deletions attestation-agent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ else
features := $(features),rust-crypto
endif

ifeq ($(ARCH), s390x)
LINT_OPTION = lint-s390x
ifeq ($(ARCH), $(filter $(ARCH), s390x aarch64))
LINT_OPTION = lint-$(ARCH)
else
LINT_OPTION = lint-default
endif
Expand All @@ -128,6 +128,9 @@ lint-default:
lint-s390x:
cd attestation-agent && cargo clippy --no-default-features --features openssl,kbs,coco_as,bin,grpc,ttrpc

lint-aarch64:
cd attestation-agent && cargo clippy --no-default-features --features openssl,rust-crypto,cca-attester,kbs,coco_as,bin,grpc,ttrpc

install:
install -D -m0755 $(TARGET) $(DESTDIR)/$(BIN_NAME)

Expand Down
2 changes: 1 addition & 1 deletion attestation-agent/docker/Dockerfile.keyprovider
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2023 by Alibaba.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
FROM rust:1.75-slim-bookworm as builder
FROM rust:1.82.0-slim-bookworm as builder

LABEL org.opencontainers.image.source="https://github.com/confidential-containers/guest-components/blob/main/attestation-agent/docker/Dockerfile.keyprovider"

Expand Down