From 9e6f557e06f21aa7a6ae33b1a00c7e214113c10f Mon Sep 17 00:00:00 2001 From: Jorge Prendes Date: Thu, 3 Jul 2025 17:16:15 +0100 Subject: [PATCH 1/3] fix release workflow Signed-off-by: Jorge Prendes --- .github/workflows/CreateReleaseBranch.yml | 5 ++++- Justfile | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CreateReleaseBranch.yml b/.github/workflows/CreateReleaseBranch.yml index ac342287..4161fdf2 100644 --- a/.github/workflows/CreateReleaseBranch.yml +++ b/.github/workflows/CreateReleaseBranch.yml @@ -28,6 +28,9 @@ jobs: sed -i '/vendor.tar/d' ./src/hyperlight_wasm/.gitignore git add ./src/hyperlight_wasm/vendor.tar git add ./src/hyperlight_wasm/.gitignore - git commit -m "Vendor dependencies for release ${GITHUB_REF_NAME}" -s -S + git config user.name hyperlight-wasm-ci + git config user.email github@users.noreply.github.com + git commit -s \ + -m "Vendor dependencies for release ${GITHUB_REF_NAME}" git push --set-upstream origin release/${GITHUB_REF_NAME} shell: bash diff --git a/Justfile b/Justfile index 52869034..209b2c02 100644 --- a/Justfile +++ b/Justfile @@ -9,6 +9,7 @@ set windows-shell := ["pwsh.exe", "-NoLogo", "-Command"] make-vendor-tar: tar cf ./src/hyperlight_wasm/vendor.tar \ + --owner=0 --group=0 \ --exclude-vcs-ignores \ -C ./src wasm_runtime hyperlight_wasm_macro From 44dcf405657d233faf610d5d845df5a0f8ff83c0 Mon Sep 17 00:00:00 2001 From: Jorge Prendes Date: Thu, 3 Jul 2025 20:09:53 +0100 Subject: [PATCH 2/3] use ubuntu for release workflow Signed-off-by: Jorge Prendes --- .github/workflows/CreateRelease.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 5ec1de88..fb83bfd4 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -18,7 +18,7 @@ jobs: # see https://github.com/orgs/community/discussions/26286#discussioncomment-3251208 for why we need to check the ref if: ${{ contains(github.ref, 'refs/heads/release/') }} || ${{ github.ref=='refs/heads/main' }} needs: [ benchmarks ] - runs-on: windows-latest + runs-on: ubuntu-latest env: PLATFORM: x64 steps: @@ -59,10 +59,10 @@ jobs: - name: Set HYPERLIGHTWASM_VERSION run: | git fetch --tags || true - $env:MINVER_TAG_PREFIX="v" - $env:MINVER_AUTO_INCREMENT_LEVEL="Minor" - $env:MINVER_PRERELEASE_IDENTIFIER="preview" - echo "HYPERLIGHTWASM_VERSION=$(minver)"| Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append + export MINVER_TAG_PREFIX="v" + export MINVER_AUTO_INCREMENT_LEVEL="Minor" + export MINVER_PRERELEASE_IDENTIFIER="preview" + echo "HYPERLIGHTWASM_VERSION=$(minver)" >> $GITHUB_ENV echo "HYPERLIGHTWASM_VERSION=$(minver)" shell: pwsh - name: Download Wasm Modules From be5f3fb26f3a61073176aebdc8a21c8e90b36da2 Mon Sep 17 00:00:00 2001 From: Jorge Prendes Date: Thu, 3 Jul 2025 20:16:33 +0100 Subject: [PATCH 3/3] untar vendored archive before doing diff Signed-off-by: Jorge Prendes --- .github/workflows/CreateRelease.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index fb83bfd4..f2bc1f36 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -41,12 +41,17 @@ jobs: - name: Verify vendor.tar if: ${{ contains(github.ref, 'refs/heads/release/') }} run: | - mv ./src/hyperlight_wasm/vendor.tar ./vendor.tar + set -euxo pipefail + VENDOR1=$(mktemp -d) + VENDOR2=$(mktemp -d) + tar xf ./src/hyperlight_wasm/vendor.tar -C $VENDOR1 just make-vendor-tar - if ! git diff --no-index ./vendor.tar ./src/hyperlight_wasm/vendor.tar; then + tar xf ./src/hyperlight_wasm/vendor.tar -C $VENDOR2 + if ! git diff --no-index $VENDOR1 $VENDOR2; then echo "vendor.tar is not up to date, please run 'just make-vendor-tar' and commit the changes" exit 1 fi + git restore ./src/hyperlight_wasm/vendor.tar shell: bash - name: Package hyperlight-wasm crate if: ${{ contains(github.ref, 'refs/heads/release/') }} @@ -55,7 +60,7 @@ jobs: - name: Install minver_rs run: | cargo install minver_rs - shell: pwsh + shell: bash - name: Set HYPERLIGHTWASM_VERSION run: | git fetch --tags || true @@ -64,7 +69,7 @@ jobs: export MINVER_PRERELEASE_IDENTIFIER="preview" echo "HYPERLIGHTWASM_VERSION=$(minver)" >> $GITHUB_ENV echo "HYPERLIGHTWASM_VERSION=$(minver)" - shell: pwsh + shell: bash - name: Download Wasm Modules uses: actions/download-artifact@v4 with: