Skip to content

Commit

Permalink
release wasm binary in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zheyang0825 committed Apr 26, 2024
1 parent 41aa026 commit 2c41efe
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
32 changes: 31 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,29 @@ jobs:
python3 -m twine upload -r pypi -u __token__ -p ${PYPI_TWINE_TOKEN} dist/*.whl
wasm_verifier_publish:
docker:
- image: secretflow/trustedflow-dev-ubuntu22.04:latest
resource_class: 2xlarge+
steps:
- checkout
- run:
name: "build wasm"
command: |
source ~/.bashrc
source /opt/emsdk/emsdk_env.sh
export PATH=/root/go/bin:/root/.local/bin:$PATH
protoc --version
VERSION=<< pipeline.parameters.GHA_Version >>
echo "version: $VERSION"
cmake -H. -Bbuild
cd build && make -j8
go install github.com/tcnksm/ghr@latest
cd ..
ghr -t "${GITHUB_TOKEN}" -u "${CIRCLE_PROJECT_USERNAME}" \
-r "${CIRCLE_PROJECT_REPONAME}" -c "${CIRCLE_SHA1}" -delete "${VERSION}" \
build/trustedflow/attestation/verification/trustedflow_verifier.js
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
Expand All @@ -160,7 +183,14 @@ workflows:
not: << pipeline.parameters.GHA_Action >>
jobs:
- linux_ut
docker-image-publish-workflow:
wasm-verifier-publish-workflow:
when:
and:
- equal: ["wasm_verifier_publish", << pipeline.parameters.GHA_Action >>]
- exits: << pipeline.parameters.GHA_Version >>
jobs:
- wasm_verifier_publish
wasm-publish-workflow:
when:
and:
- equal: ["docker_image_publish", << pipeline.parameters.GHA_Action >>]
Expand Down
2 changes: 1 addition & 1 deletion cmake/DcapVerifier.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if(WASM)
ExternalProject_Add(
dcap
URL https://github.com/intel/SGXDataCenterAttestationPrimitives/archive/refs/tags/DCAP_1.19.tar.gz
PATCH_COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/patch/dcap.patch
PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/patch/dcap.patch
PREFIX ${LIBDCAP_ROOT}
CONFIGURE_COMMAND ""
BUILD_COMMAND
Expand Down

0 comments on commit 2c41efe

Please sign in to comment.