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

feat(raiko): ci use sgx hw #175

Merged
merged 3 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,38 @@ jobs:
- name: Test sgx prover
run: make test

build-test-sgx-hardware:
name: Build and test sgx in hardware
runs-on: [self-hosted, sgx, linux]
timeout-minutes: 120
env:
TARGET: sgx
CI: 1
EDMM: 0
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@v1.6.4
- name: Install sgx
run: TARGET="sgx" CI=1 make install
- name: Build sgx prover
run: TARGET="sgx" make build
smtmfft marked this conversation as resolved.
Show resolved Hide resolved
- name: prevalidate sgx hw execution env
smtmfft marked this conversation as resolved.
Show resolved Hide resolved
run: |
cd target/release
gramine-manifest -Dlog_level=error -Ddirect_mode=0 -Darch_libdir=/lib/x86_64-linux-gnu/ ../../provers/sgx/config/sgx-guest.local.manifest.template sgx-guest.manifest
gramine-sgx-sign --manifest sgx-guest.manifest --output sgx-guest.manifest.sgx
gramine-sgx-sigstruct-view sgx-guest.sig
cd -
- name: Test sgx prover
run: make test

build-test-sgx-with-docker:
name: Build and test sgx with Docker
runs-on: ubuntu-latest
Expand Down
12 changes: 9 additions & 3 deletions script/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@ fi

# SGX
if [ -z "$1" ] || [ "$1" == "sgx" ]; then
# For SGX, install gramine: https://github.com/gramineproject/gramine.
wget -O /tmp/gramine.deb https://packages.gramineproject.io/pool/main/g/gramine/gramine_1.6.2_amd64.deb
sudo apt install /tmp/gramine.deb
# also check if sgx is already installed
if command -v gramine-sgx >/dev/null 2>&1; then
echo "gramine already installed"
else
echo "gramine not installed, installing..."
# For SGX, install gramine: https://github.com/gramineproject/gramine.
wget -O /tmp/gramine.deb https://packages.gramineproject.io/pool/main/g/gramine/gramine_1.6.2_amd64.deb
sudo apt install -y /tmp/gramine.deb
fi
fi
# RISC0
if [ -z "$1" ] || [ "$1" == "risc0" ]; then
Expand Down
Loading