Skip to content

Commit c96e181

Browse files
authored
CI: release build workflow to package binaries into tar.gz for faster downloads (#1001)
1 parent 02b035f commit c96e181

File tree

3 files changed

+35
-61
lines changed

3 files changed

+35
-61
lines changed

.github/workflows/release_build.yml

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
ec2-instance-type: c5.large
2121
ec2-image-id: ami-042a37e33a285c22b
22-
submodules: 'recursive'
22+
submodules: 'false'
2323
run_mode: 'start' # start ec2 on demand instance
2424
upjob: update_version
2525
command: |
@@ -57,7 +57,8 @@ jobs:
5757
submodules: 'recursive'
5858
run_mode: 'start' # start ec2 on demand instance
5959
upload_files: |
60-
proton-*-Linux-x86_64*
60+
proton-*-Linux-x86_64.tar.gz
61+
proton-*-Linux-x86_64-debug-symbols.tar.gz
6162
python-Linux-x86_64.tar.gz
6263
prerelease: ${{ inputs.prerelease }}
6364
ref: ${{ needs.update_version.outputs.tag_name }}
@@ -122,6 +123,11 @@ jobs:
122123
echo "Final sizes:"
123124
ls -lh $PROTON_BINARY $PROTON_DEBUG
124125
126+
# Package the binary into a tar.gz for faster downloads
127+
echo "Packaging binary tarball..."
128+
tar -czf ${PROTON_BINARY}.tar.gz $PROTON_BINARY
129+
ls -lh ${PROTON_BINARY}.tar.gz
130+
125131
# Start static server for docker build
126132
docker run --name static-server -p 8080:80 -v $GITHUB_WORKSPACE:/usr/share/nginx/html:ro -d nginx
127133
cd $GITHUB_WORKSPACE/docker/server
@@ -176,7 +182,8 @@ jobs:
176182
ec2-image-id: ${{ vars.ARM_AMI }}
177183
submodules: 'recursive'
178184
run_mode: 'start' # start ec2 on demand instance
179-
upload_files: proton-*-Linux-aarch64
185+
upload_files: |
186+
proton-*-Linux-aarch64.tar.gz
180187
prerelease: ${{ inputs.prerelease }}
181188
ref: ${{ needs.update_version.outputs.tag_name }}
182189
upjob: Build_Linux_Arm64
@@ -238,6 +245,12 @@ jobs:
238245
aws s3 cp --no-progress ./cache-arm.tar.gz s3://tp-internal2/proton-oss/
239246
240247
mv $GITHUB_WORKSPACE/output/proton $GITHUB_WORKSPACE/$PROTON_BINARY
248+
249+
# Package the binary into a tar.gz for faster downloads
250+
echo "Packaging binary tarball..."
251+
cd $GITHUB_WORKSPACE
252+
tar -czf ${PROTON_BINARY}.tar.gz $PROTON_BINARY
253+
ls -lh ${PROTON_BINARY}.tar.gz
241254
secrets:
242255
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
243256
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -349,7 +362,8 @@ jobs:
349362
ec2-image-id: ami-042a37e33a285c22b
350363
submodules: 'recursive'
351364
run_mode: 'start' # start ec2 on demand instance
352-
upload_files: proton-*-Darwin-x86_64
365+
upload_files: |
366+
proton-*-Darwin-x86_64.tar.gz
353367
prerelease: ${{ inputs.prerelease }}
354368
ref: ${{ needs.update_version.outputs.tag_name }}
355369
upjob: Build_Darwin_X86_64
@@ -399,6 +413,12 @@ jobs:
399413
sha256sum $GITHUB_WORKSPACE/output/proton
400414
401415
mv $GITHUB_WORKSPACE/output/proton $GITHUB_WORKSPACE/$PROTON_BINARY
416+
417+
# Package the binary into a tar.gz for faster downloads
418+
echo "Packaging binary tarball..."
419+
cd $GITHUB_WORKSPACE
420+
tar -czf ${PROTON_BINARY}.tar.gz $PROTON_BINARY
421+
ls -lh ${PROTON_BINARY}.tar.gz
402422
secrets:
403423
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
404424
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -475,7 +495,7 @@ jobs:
475495
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
476496

477497
Build_Native_Darwin_arm64:
478-
needs: Build_Linux_X86_64
498+
needs: update_version
479499
runs-on: [self-hosted, macOS, ARM64]
480500
env:
481501
build_directory: ${{ github.workspace }}/build
@@ -590,6 +610,12 @@ jobs:
590610
run: |
591611
STRIPPED_BINARY=${{ env.build_directory }}/programs/proton-${{ env.LATEST_TAG }}-Darwin-arm64
592612
PYTHON_PACKAGE=${{ env.build_directory }}/programs/python-Darwin-arm64.tar.gz
613+
TARBALL=${STRIPPED_BINARY}.tar.gz
614+
615+
# Create tar.gz package for faster downloads
616+
echo "Packaging binary tarball..."
617+
tar -czf "$TARBALL" -C "$(dirname "$STRIPPED_BINARY")" "$(basename "$STRIPPED_BINARY")"
618+
ls -lh "$TARBALL"
593619
594620
# Function to upload asset with retry
595621
upload_asset_with_retry() {
@@ -622,9 +648,9 @@ jobs:
622648
done
623649
}
624650
625-
# Upload binary with retry
626-
if ! upload_asset_with_retry "$STRIPPED_BINARY" "${{ env.LATEST_TAG }}"; then
627-
echo "Binary upload failed after all attempts"
651+
# Upload tarball with retry
652+
if ! upload_asset_with_retry "$TARBALL" "${{ env.LATEST_TAG }}"; then
653+
echo "Tarball upload failed after all attempts"
628654
exit 1
629655
fi
630656

.github/workflows/run_command.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ jobs:
228228
files: ${{ inputs.upload_files }}
229229
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
230230
generate_release_notes: true
231+
append_body: true
231232
prerelease: ${{ inputs.prerelease }}
232233
tag_name: ${{ steps.execute.outputs.tag_name }}
233234
body: |
@@ -269,4 +270,3 @@ jobs:
269270
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
270271
label: ${{ needs.start-runner.outputs.label }}
271272
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}
272-

.github/workflows/udf_docker_image.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)