Skip to content

Commit

Permalink
build binary
Browse files Browse the repository at this point in the history
  • Loading branch information
kziemianek committed May 21, 2024
1 parent 046ac09 commit 8d9d539
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 32 deletions.
39 changes: 10 additions & 29 deletions .github/workflows/build_bitacross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,16 @@ jobs:
ref: ${{ github.event.inputs.ref || github.sha }}
fetch-depth: 0

- name: Build local builder
uses: docker/build-push-action@v5
env:
SGX_COMMERCIAL_KEY: "/opt/enclave_release/sgx_sign_key.pem"
with:
context: .
file: bitacross-worker/build.Dockerfile
tags: local-builder:${{ github.event.inputs.ref || github.sha }}
target: builder
build-args: |
WORKER_MODE_ARG=offchain-worker
SGX_MODE=HW
ADDITIONAL_FEATURES_ARG=
IMAGE_FOR_RELEASE=true
SGX_PRODUCTION=1
- name: Build worker
uses: docker/build-push-action@v5
with:
context: .
file: bitacross-worker/build.Dockerfile
tags: litentry/bitacross-worker:${{ github.event.inputs.ref || github.sha }}
target: deployed-worker

- name: Dockerhub login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build release artefacts
run: |
source /opt/intel/sgxsdk/environment
./bitacross-worker/scripts/litentry/release/build.sh true true
# - name: Dockerhub login
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_PASSWORD }}

# - name: Push worker image
# run: |
Expand Down
5 changes: 2 additions & 3 deletions bitacross-worker/scripts/litentry/release/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ echo "build worker: $1"
echo "build enclave: $2"

ROOTDIR=$(git rev-parse --show-toplevel)
WORKERDIR="$ROOTDIR/tee-worker"
WORKERDIR="$ROOTDIR/bitacross-worker"

# hardcoded sgx signing key, adjust it accordingly if you call the script manually
SGX_COMMERCIAL_KEY="/opt/enclave_release/sgx_sign_key.pem"
Expand All @@ -38,12 +38,11 @@ export SGX_PRODUCTION=1
export SGX_COMMERCIAL_KEY="$SGX_COMMERCIAL_KEY"
if [ "$1" = "true" ]; then
make service
cp bin/litentry-worker "$DESTDIR"
cp bin/bitacross-worker "$DESTDIR"
fi
if [ "$2" = "true" ]; then
make bin/enclave.signed.so
cp bin/enclave.signed.so "$DESTDIR"
make mrenclave 2>&1 | grep MRENCLAVE | awk '{print $2}' > "$DESTDIR/mrenclave.txt"
fi

echo "Build tee done"
Expand Down

0 comments on commit 8d9d539

Please sign in to comment.