Skip to content

Commit

Permalink
feat(raiko): ci use sgx hw (#175)
Browse files Browse the repository at this point in the history
* feat(raiko): ci use sgx hw

Signed-off-by: smtmfft <smtm@taiko.xyz>

* disable ci edmm

Signed-off-by: smtmfft <smtm@taiko.xyz>

* fix review comments

Signed-off-by: smtmfft <smtm@taiko.xyz>

---------

Signed-off-by: smtmfft <smtm@taiko.xyz>
  • Loading branch information
smtmfft authored and CeciliaZ030 committed May 10, 2024
1 parent 6f86e28 commit a40be21
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,31 @@ 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: make install
- name: Build sgx prover
run: make build
- 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

0 comments on commit a40be21

Please sign in to comment.