Skip to content

Commit

Permalink
Added integration tests for SGX simulator to the testing workflow
Browse files Browse the repository at this point in the history
- Bumped integration tests version to 5.3.0.plus
  • Loading branch information
amendelzon committed Oct 1, 2024
1 parent 3004408 commit 89637e5
Showing 1 changed file with 53 additions and 3 deletions.
56 changes: 53 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
- name: Ledger Signer's unit tests
run: firmware/src/ledger/signer/test/run-all.sh

run-integration-tests:
name: Integration tests
run-integration-tests-tcpsigner:
name: Integration tests for TCPSigner
runs-on: ubuntu-20.04

steps:
Expand All @@ -63,7 +63,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: rootstock/hsm-integration-test
ref: 5.1.0.plus
ref: 5.3.0.plus
path: hsm-integration-test
ssh-key: ${{ secrets.HSM_INTEGRATION_TEST_SSH_KEY }}

Expand All @@ -78,3 +78,53 @@ jobs:
- name: Run HSM integration tests
working-directory: hsm-integration-test
run: sh smoke-test.sh

run-integration-tests-sgx:
name: Integration tests for SGX simulator
runs-on: ubuntu-20.04

steps:
- name: Checkout rsk-powhsm repo
uses: actions/checkout@v3
with:
path: rsk-powhsm

- name: Build required software
working-directory: rsk-powhsm
run: |
docker/mware/build
docker/packer/build
docker/sgx/build
middleware/build/manager_sgx
docker/sgx/do /hsm2/firmware/src/sgx "make generate-private-key"
firmware/build/build-sgx-sim \
0xe108960a242ad7bd45c21aff9c7ed9c516789e9cffacdd895502727d8f460d2c \
0x6E regtest
- name: Checkout hsm-integration-test repo
uses: actions/checkout@v3
with:
repository: rootstock/hsm-integration-test
ref: 5.3.0.plus
path: hsm-integration-test
ssh-key: ${{ secrets.HSM_INTEGRATION_TEST_SSH_KEY }}

- name: Copy required files
run: |
mkdir hsm-integration-test/docker/manager/manager_sgx
tar -xzf rsk-powhsm/middleware/bin/manager_sgx.tgz \
-C hsm-integration-test/docker/manager/manager_sgx
cp rsk-powhsm/firmware/src/sgx/bin/hsmsgx \
hsm-integration-test/docker/sgx
cp rsk-powhsm/firmware/src/sgx/bin/hsmsgx_enclave.signed \
hsm-integration-test/docker/sgx \
echo -n abcd1234 > hsm-integration-test/docker/sgx/kvstore-password.dat
echo -en "\x03" > hsm-integration-test/docker/sgx/kvstore-retries.dat
echo -en "\x03" > hsm-integration-test/docker/sgx/kvstore-retries.dat
dd if=/dev/urandom bs=1 count=32 \
of=hsm-integration-test/docker/sgx/kvstore-seed.dat
echo "SGX_SIM=yes" >> "$GITHUB_ENV"
- name: Run HSM integration tests
working-directory: hsm-integration-test
run: sh smoke-test.sh

0 comments on commit 89637e5

Please sign in to comment.