-
Notifications
You must be signed in to change notification settings - Fork 11.7k
feat(ci): add light_binaries release #25137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
robert-zaremba
wants to merge
3
commits into
MystenLabs:main
Choose a base branch
from
robert-zaremba:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+35
−0
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -108,6 +108,7 @@ jobs: | |
| shell: bash | ||
| run: | | ||
| mkdir -p ${{ env.TMP_BUILD_DIR }} | ||
| mkdir -p ${{ env.TMP_BUILD_DIR }}-light | ||
| aws s3 cp s3://sui-releases/${{ env.s3_existing_archive }} ./tmp/sui-${{ env.sui_tag }}-${os_type}.tgz | ||
| tar -xf ./tmp/sui-${{ env.sui_tag }}-${os_type}.tgz -C ${{ env.TMP_BUILD_DIR }} | ||
|
|
||
|
|
@@ -203,6 +204,19 @@ jobs: | |
| choco apikey --api-key ${{ secrets.CHOCO_API_KEY }} --source https://push.chocolatey.org/ | ||
| choco push sui.${{ env.sui_version }}.nupkg --source https://push.chocolatey.org/ | ||
|
|
||
| - name: Prepare light binaries for ${{ matrix.os }} | ||
| if: ${{ matrix.os == 'ubuntu-ghcloud' || matrix.os == 'ubuntu-arm64' }} | ||
| shell: bash | ||
| run: | | ||
| mkdir -p ${{ env.TMP_BUILD_DIR }}-light | ||
| for binary in $(cat ${{ env.BINARY_LIST_FILE }} | jq -r '.light_binaries[]'); do | ||
| export binary=$(echo ${binary} | tr -d $'\r') | ||
| cp ${{ env.TMP_BUILD_DIR }}/${binary}${{ env.extention }} ${{ env.TMP_BUILD_DIR }}-light/${binary}${{ env.extention }} | ||
| done | ||
|
|
||
| tar -cvzf ./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}-light.tgz -C ${{ env.TMP_BUILD_DIR }}-light . | ||
|
|
||
robert-zaremba marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - name: Upload release artifacts for ${{ matrix.os }} platform | ||
| uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # [email protected] | ||
| with: | ||
|
|
@@ -211,13 +225,30 @@ jobs: | |
| path: | | ||
| ./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz | ||
|
|
||
| - name: Upload light release artifacts for ${{ matrix.os }} platform | ||
| if: ${{ matrix.os == 'ubuntu-ghcloud' || matrix.os == 'ubuntu-arm64' }} | ||
| uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # [email protected] | ||
| with: | ||
| name: sui-binaries-${{ matrix.os }}-light | ||
| if-no-files-found: error | ||
| path: | | ||
| ./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}-light.tgz | ||
|
|
||
| - name: Attach artifacts to ${{ env.sui_tag }} release in GH | ||
| uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # pin@v1 | ||
| with: | ||
| tag_name: ${{ env.sui_tag }} | ||
| files: | | ||
| ./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz | ||
|
|
||
| - name: Attach light artifacts to ${{ env.sui_tag }} release in GH | ||
| if: ${{ matrix.os == 'ubuntu-ghcloud' || matrix.os == 'ubuntu-arm64' }} | ||
| uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # pin@v1 | ||
| with: | ||
| tag_name: ${{ env.sui_tag }} | ||
| files: | | ||
| ./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}-light.tgz | ||
|
|
||
| trigger-walrus-testnet-tag-update: | ||
| name: Trigger Walrus Testnet Tag Update | ||
| needs: release-build | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the repo is checked out at the target tag (
ref: ${{ env.sui_tag }}), older tags won’t contain the newlight_binarieskey inbinary-build-list.json. In that casejq -r '.light_binaries[]'will error and fail the job, which conflicts with the stated goal of generating light archives for already-existing releases. Consider making the jq query tolerant (e.g., defaulting to a minimal list) or sourcing the build list from the workflow revision instead of the tag checkout.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's ok, we don't re-release older releases.