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

Run tests in 1ES Hosted Confidential ACI Pool #6653

Merged
merged 42 commits into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
1fa15e0
Test new C-ACI pool
achamayou Nov 15, 2024
26c140f
.
achamayou Nov 15, 2024
53d2f9a
Update .github/workflows/ci.yml
achamayou Nov 16, 2024
24cc963
Merge branch 'main' into ci_tests
achamayou Feb 5, 2025
477fc7a
Merge branch 'main' into ci_tests
achamayou Feb 17, 2025
d741c71
Merge branch 'main' into ci_tests
achamayou Feb 18, 2025
7d6d441
Merge branch 'main' into ci_tests
achamayou Feb 27, 2025
7580a88
Merge branch 'main' into ci_tests
achamayou Mar 3, 2025
df262f2
Update .github/workflows/ci.yml
achamayou Mar 3, 2025
c0e4229
Merge branch 'main' into ci_tests
achamayou Mar 3, 2025
57151de
img
achamayou Mar 3, 2025
ab44485
Merge branch 'ci_tests' of https://github.com/achamayou/CCF into ci_t…
achamayou Mar 3, 2025
de0132b
Update .github/workflows/ci.yml
achamayou Mar 4, 2025
744225d
azure linux
achamayou Mar 5, 2025
4bf8c0c
Merge branch 'main' into ci_tests
achamayou Mar 5, 2025
a49f8bb
uname
achamayou Mar 5, 2025
4580a3e
Merge branch 'ci_tests' of https://github.com/achamayou/CCF into ci_t…
achamayou Mar 5, 2025
2a8c0b0
os-release
achamayou Mar 5, 2025
6ab214c
build
achamayou Mar 5, 2025
70e1a84
disk
achamayou Mar 5, 2025
f57aa6c
strip out everything except bare minimum for building
achamayou Mar 5, 2025
916f827
another irrelevant message from shellcheck
achamayou Mar 5, 2025
60763d8
.
achamayou Mar 5, 2025
2aff2f1
Merge branch 'main' into ci_tests
achamayou Mar 5, 2025
937e28d
deps in image
achamayou Mar 6, 2025
0824f18
.
achamayou Mar 6, 2025
a24af6e
Merge branch 'main' into ci_tests
achamayou Mar 10, 2025
05a4a35
Run tests
achamayou Mar 10, 2025
246523a
Merge branch 'ci_tests' of https://github.com/achamayou/CCF into ci_t…
achamayou Mar 10, 2025
eed9218
fewer senders and receivers
achamayou Mar 10, 2025
8ce8f39
Merge branch 'main' into ci_tests
achamayou Mar 17, 2025
11ad376
Merge branch 'main' into ci_tests
achamayou Mar 18, 2025
4199cab
Merge branch 'main' into ci_tests
achamayou Mar 21, 2025
761784c
.
achamayou Mar 21, 2025
9bfeca8
.
achamayou Mar 21, 2025
ac3ce4d
.
achamayou Mar 24, 2025
6e0a09a
.
achamayou Mar 24, 2025
7146c68
logs
achamayou Mar 24, 2025
816c695
Merge branch 'main' into ci_tests
achamayou Mar 24, 2025
85cb1c7
needs_checks
achamayou Mar 24, 2025
6204433
Merge branch 'ci_tests' of https://github.com/achamayou/CCF into ci_t…
achamayou Mar 24, 2025
1f8abae
Update tests/infra/runner.py
achamayou Mar 24, 2025
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
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,49 @@ jobs:
# All other acceptably fast tests, which are now supported on Azure Linux.
./tests.sh --timeout 360 --output-on-failure -LE "benchmark|suite|unit"
shell: bash

build_caci:
name: "Confidential Container (ACI) CI"
runs-on: [self-hosted, 1ES.Pool=gha-caci-ne]
needs: checks

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "Build Debug"
run: |
set -ex
git config --global --add safe.directory /__w/CCF/CCF
mkdir build
cd build
cmake -GNinja -DCOMPILE_TARGET=snp -DCMAKE_BUILD_TYPE=Debug ..
ninja
shell: bash

- name: "Tests"
run: |
set -ex
cd build
rm -rf /github/home/.cache
mkdir -p /github/home/.cache
export ASAN_SYMBOLIZER_PATH=$(realpath /usr/bin/llvm-symbolizer-15)
# Unit tests, minus indexing that is sometimes timing out with this few cores
./tests.sh --output-on-failure -L unit -j$(nproc --all) -E indexing
# Minimal end to end test that exercises SNP attestation verification
# but works within the current 4 core budget
./tests.sh --timeout 360 --output-on-failure -R code_update
shell: bash

- name: "Upload logs"
uses: actions/upload-artifact@v4
with:
name: logs-caci-snp
path: |
build/workspace/*/*.config.json
build/workspace/*/out
build/workspace/*/err
build/workspace/*.ledger/*
if-no-files-found: ignore
if: success() || failure()
2 changes: 1 addition & 1 deletion .snpcc_canary
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
(. =) Y (0 0) (x X) Y (___)
O \ o | / |
/-xXx--//-----x=x--/-xXx--/---x-/--->>>--/
....
......
11 changes: 11 additions & 0 deletions docker/ccf_caci_ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM mcr.microsoft.com/azurelinux/base/core:3.0
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
RUN gpg --import /etc/pki/rpm-gpg/MICROSOFT-RPM-GPG-KEY
RUN tdnf -y update
RUN tdnf -y install ca-certificates git
RUN tdnf -y install wget tar dotnet-sdk-8.0
ENV RUNNER_ALLOW_RUNASROOT=true

COPY scripts/setup-ci.sh /tmp/setup-ci.sh
RUN chmod +x /tmp/setup-ci.sh
RUN /tmp/setup-ci.sh
2 changes: 1 addition & 1 deletion src/ds/test/work_beacon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ size_t run_jobs(size_t n_senders, size_t n_receivers)

TEST_CASE("WorkBeacon" * doctest::test_suite("workbeacon"))
{
std::vector<size_t> test_vals{1, 5, 8};
std::vector<size_t> test_vals{1, 5};
for (auto n_senders : test_vals)
{
for (auto n_receivers : test_vals)
Expand Down
15 changes: 11 additions & 4 deletions tests/infra/snp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import os
import base64
import glob
from hashlib import sha256

# Path to the SEV guest device on patched 5.x kernels
Expand Down Expand Up @@ -45,10 +46,16 @@ def is_snp():

def get_aci_env():
env = {}
with open(WELL_KNOWN_ACI_ENVIRONMENT_FILE_PATH, "r", encoding="utf-8") as f:
for line in f.read().splitlines():
env_key, env_value = line.partition("=")[::2]
env[env_key] = env_value
# If the well-known file exists, read the environment variables from it
# Otherwise, try to discover the security context directory
if os.path.exists(WELL_KNOWN_ACI_ENVIRONMENT_FILE_PATH):
with open(WELL_KNOWN_ACI_ENVIRONMENT_FILE_PATH, "r", encoding="utf-8") as f:
for line in f.read().splitlines():
env_key, env_value = line.partition("=")[::2]
env[env_key] = env_value
else:
(security_context_dir,) = glob.glob("/security-context-*")
env[ACI_SEV_SNP_ENVVAR_UVM_SECURITY_CONTEXT_DIR] = security_context_dir
return env


Expand Down