Skip to content
Draft
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
60 changes: 60 additions & 0 deletions .github/workflows/scaling-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Scaling Integration Test

on:
workflow_dispatch:
push:
branches: [dkg]

jobs:
scaling-test:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4

- name: Set up KVM
run: sudo chmod 666 /dev/kvm

- name: Load vsock kernel modules
run: |
# vhost_vsock backs the host CID (forward-cid=2, the path we validated) and
# the shared heartbeat responder; vsock_loopback backs forward-cid=1.
sudo modprobe vhost_vsock
sudo modprobe vsock_loopback
test -e /dev/vsock

- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-25.11
extra_nix_config: |
experimental-features = nix-command flakes

- uses: DeterminateSystems/magic-nix-cache-action@main

- uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Build test EIF
run: |
go build -o /tmp/enclave-cli ./cli/cmd/enclave
export RUNTIME_LOCAL_PATH=$GITHUB_WORKSPACE
export SUPERVISOR_LOCAL_PATH=$GITHUB_WORKSPACE
export APP_LOCAL_PATH=$GITHUB_WORKSPACE/test/app

(cd runtime && go mod vendor)
(cd test/app && go mod vendor && /tmp/enclave-cli build)

- name: Run threshold-scaling ceremony
run: |
cd test
docker compose --profile scaling run --build --rm \
-e FWD_CID=2 -e BOOT_TIMEOUT=240 scaling-runner

- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: scaling-test-logs
path: test/*.log
if-no-files-found: ignore
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ lint: ## Run golangci-lint on all modules (matches CI)
cd supervisor && golangci-lint run ./...
cd client && golangci-lint run ./...

.PHONY: test test-build test-run test-rebuild test-acme
.PHONY: test test-build test-run test-rebuild test-acme test-scaling

test: test-build test-run ## Build test EIFs and run integration tests

Expand Down Expand Up @@ -84,6 +84,11 @@ test-acme: test-build ## Build the test EIF and run the end-to-end ACME (Pebble)
cd test && docker compose --profile acme down -v
cd test && docker compose --profile acme run --build acme-runner

test-scaling: test-build ## Build the test EIF and run the 1-leader + 2-follower threshold-scaling ceremony in the QEMU runner container
cd test && docker compose --profile scaling down -v
cd test && docker compose --profile scaling build scaling-runner
cd test && docker compose --profile scaling run -T --rm scaling-runner

.PHONY: test-build-docker test-docker
test-build-docker: ## Run test-build inside a linux/amd64 container (for macOS/ARM hosts)
docker build --platform=linux/amd64 -t introspector-enclave-builder .
Expand Down
Loading
Loading