Skip to content

Commit

Permalink
[CI][test] pin ec2 instance type (#795)
Browse files Browse the repository at this point in the history
* pin ec2 instance type

* fix leftover in release build:
Issue 1: Using shasum -a 256 instead of sha256sum
Issue 2: Output tag_name not being displayed
  • Loading branch information
yokofly committed Jul 18, 2024
1 parent 9d4978b commit 243ba9d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/proton_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
uses: timeplus-io/proton/.github/workflows/run_command.yml@develop
if: github.event.pull_request.draft == false
with:
ec2-instance-type: ${{ vars.X64_INSTANCE_TYPE }}
ec2-instance-type: c5.xlarge
ec2-image-id: ${{ vars.X64_TEST_AMI }}
ec2-volume-size: '30'
submodules: false
Expand Down Expand Up @@ -139,13 +139,13 @@ jobs:
uses: timeplus-io/proton/.github/workflows/run_command.yml@develop
if: github.event.pull_request.draft == false
with:
ec2-instance-type: ${{ vars.X64_INSTANCE_TYPE }}
ec2-instance-type: c7i.8xlarge
ec2-image-id: ${{ vars.X64_TEST_AMI }}
ec2-volume-size: '80'
submodules: false
sanitizer: "address"
arch: ${{ vars.X64_ARCH }}
timeout: 30
timeout: 40
command: |
# run stream test
cd $GITHUB_WORKSPACE/tests/stream
Expand Down Expand Up @@ -192,7 +192,7 @@ jobs:
uses: timeplus-io/proton/.github/workflows/run_command.yml@develop
if: github.event.pull_request.draft == false
with:
ec2-instance-type: ${{ vars.X64_INSTANCE_TYPE }}
ec2-instance-type: c5.4xlarge
ec2-image-id: ${{ vars.X64_TEST_AMI }}
ec2-volume-size: '40'
submodules: false
Expand Down Expand Up @@ -229,13 +229,13 @@ jobs:
uses: timeplus-io/proton/.github/workflows/run_command.yml@develop
if: github.event.pull_request.draft == false
with:
ec2-instance-type: ${{ vars.X64_INSTANCE_TYPE }}
ec2-instance-type: c5.2xlarge
ec2-image-id: ${{vars.X64_TEST_AMI }}
ec2-volume-size: '40'
submodules: false
sanitizer: "address"
arch: ${{ vars.X64_ARCH }}
timeout: 30
timeout: 40
command: |
cd $GITHUB_WORKSPACE/tests/proton_ci
# make virtualenv
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
needs: [Build_Linux_X86_64, Build_Linux_Arm64]
uses: timeplus-io/proton/.github/workflows/run_command.yml@develop
with:
ec2-instance-type: c5.4xlarge
ec2-instance-type: c5.large
ec2-image-id: ami-042a37e33a285c22b
submodules: 'false'
command: |
Expand Down Expand Up @@ -239,6 +239,7 @@ jobs:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

Build_Darwin_Arm64:
if: false
uses: timeplus-io/proton/.github/workflows/run_command.yml@develop
with:
ec2-instance-type: c6g.4xlarge
Expand Down Expand Up @@ -312,7 +313,7 @@ jobs:
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "Checking out tag $LATEST_TAG"
git checkout $LATEST_TAG
echo "::set-output name=tag_name::$LATEST_TAG"
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
# Setup build environment and configure CMake
- name: Create and Configure Build
Expand All @@ -331,7 +332,7 @@ jobs:
- name: Strip and Rename binary
run: |
ORIGINAL_BINARY=${{ env.build_directory }}/programs/proton
STRIPPED_BINARY=${{ env.build_directory }}/programs/proton-${{ steps.determine_tag.outputs.tag_name }}-Darwin-arm64-native
STRIPPED_BINARY=${{ env.build_directory }}/programs/proton-${{ env.LATEST_TAG }}-Darwin-arm64
/opt/homebrew/opt/llvm@17/bin/llvm-strip $ORIGINAL_BINARY -o $STRIPPED_BINARY
# Set up AWS credentials for S3 upload
Expand All @@ -345,19 +346,20 @@ jobs:
# Upload the stripped binary to an AWS S3 bucket
- name: Upload Artifact To S3
run: |
STRIPPED_BINARY=${{ env.build_directory }}/programs/proton-${{ steps.determine_tag.outputs.tag_name }}-Darwin-arm64-native
STRIPPED_BINARY=${{ env.build_directory }}/programs/proton-${{ env.LATEST_TAG }}-Darwin-arm64
aws s3 cp --no-progress $STRIPPED_BINARY s3://tp-internal/proton/native_build_macOS/
# Sha256 for homebrew binary
# Print SHA256 Checksum
- name: Print SHA256 Checksum
run: |
STRIPPED_BINARY=${{ env.build_directory }}/programs/proton-${{ steps.determine_tag.outputs.tag_name }}-Darwin-arm64-native
sha256sum $STRIPPED_BINARY
STRIPPED_BINARY=${{ env.build_directory }}/programs/proton-${{ env.LATEST_TAG }}-Darwin-arm64
shasum -a 256 $STRIPPED_BINARY
# Release the binary on GitHub Releases with automatic release notes
- name: Release binary
uses: softprops/[email protected]
with:
files: ${{ env.build_directory }}/programs/proton-${{ steps.determine_tag.outputs.tag_name }}-Darwin-arm64-native
files: ${{ env.build_directory }}/programs/proton-${{ env.LATEST_TAG }}-Darwin-arm64
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
generate_release_notes: true
tag_name: ${{ steps.determine_tag.outputs.tag_name }}
tag_name: ${{ env.LATEST_TAG }}

0 comments on commit 243ba9d

Please sign in to comment.