kbs: tidy ci yaml files #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: KBS e2e | ||
on: | ||
workflow_call: | ||
inputs: | ||
tee: | ||
type: string | ||
required: true | ||
runs-on: | ||
type: string | ||
default: '["ubuntu-22.04"]' | ||
description: JSON representation of runner labels | ||
tarball: | ||
type: string | ||
description: Artifact containing checked out source from a prior job | ||
required: true | ||
# Self-hosted runners do not set -o pipefail otherwise | ||
defaults: | ||
run: | ||
shell: bash | ||
jobs: | ||
e2e-test: | ||
runs-on: ${{ fromJSON(inputs.runs-on) }} | ||
env: | ||
RUSTC_VERSION: 1.76.0 | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
- name: Extract tarball | ||
run: tar xzf ./artifact/${{ inputs.tarball }} | ||
- name: Install Rust toolchain (${{ env.RUSTC_VERSION }}) | ||
run: | | ||
rustup update --no-self-update ${{ env.RUSTC_VERSION }} | ||
rustup component add --toolchain ${{ env.RUSTC_VERSION }} rustc | ||
rustup default ${{ env.RUSTC_VERSION }} | ||
- name: Set up rust build cache | ||
uses: actions/cache@v4 | ||
continue-on-error: false | ||
with: | ||
path: | | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
target/ | ||
key: rust-${{ hashFiles('./Cargo.lock') }} | ||
- name: Set up SGX/TDX certificates cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: /root/.dcap-qcnl | ||
key: ${{ runner.os }}-dcap-qcnl | ||
- name: Install dependencies | ||
working-directory: kbs/test | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y make --no-install-recommends | ||
sudo make install-dependencies | ||
- name: Build bins | ||
working-directory: kbs/test | ||
run: make bins | ||
- name: Set cc_kbc sample attester env | ||
if: inputs.tee == 'sample' | ||
run: echo "AA_SAMPLE_ATTESTER_TEST=1" >> "$GITHUB_ENV" | ||
- name: Run e2e test | ||
working-directory: kbs/test | ||
env: | ||
TEE: ${{ inputs.tee }} | ||
RUST_LOG: warn | ||
run: sudo -E make e2e-test |