diff --git a/.github/actions/build-greptime-binary/action.yml b/.github/actions/build-greptime-binary/action.yml index a5eb4c9de949..d593de882f09 100644 --- a/.github/actions/build-greptime-binary/action.yml +++ b/.github/actions/build-greptime-binary/action.yml @@ -32,12 +32,17 @@ inputs: description: Upload to S3 required: false default: 'true' + context: + description: Context to build the docker image + required: false + default: . runs: using: composite steps: - name: Build greptime binary shell: bash run: | + cd ${{ inputs.context }} && \ make build-greptime-by-buildx \ CARGO_PROFILE=${{ inputs.cargo-profile }} \ FEATURES=${{ inputs.features }} \ diff --git a/.github/actions/build-linux-artifacts/action.yml b/.github/actions/build-linux-artifacts/action.yml index 0944b8889e14..6672211bba62 100644 --- a/.github/actions/build-linux-artifacts/action.yml +++ b/.github/actions/build-linux-artifacts/action.yml @@ -33,6 +33,10 @@ inputs: description: Upload to S3 required: false default: 'true' + context: + description: Context to build the docker image + required: false + default: . runs: using: composite steps: @@ -41,6 +45,7 @@ runs: shell: bash # NOTE: If the BUILD_JOBS > 4, it's always OOM in EC2 instance. run: | + cd ${{ inputs.context }} && \ make run-it-in-container BUILD_JOBS=4 - name: Upload sqlness logs @@ -64,6 +69,7 @@ runs: aws-secret-access-key: ${{ inputs.aws-secret-access-key }} aws-region: ${{ inputs.aws-region }} upload-to-s3: ${{ inputs.upload-to-s3 }} + context: ${{ inputs.context }} - name: Build greptime without pyo3 if: ${{ inputs.dev-mode == 'false' }} @@ -79,6 +85,7 @@ runs: aws-secret-access-key: ${{ inputs.aws-secret-access-key }} aws-region: ${{ inputs.aws-region }} upload-to-s3: ${{ inputs.upload-to-s3 }} + context: ${{ inputs.context }} - name: Build greptime on centos base image uses: ./.github/actions/build-greptime-binary @@ -94,3 +101,4 @@ runs: aws-secret-access-key: ${{ inputs.aws-secret-access-key }} aws-region: ${{ inputs.aws-region }} upload-to-s3: ${{ inputs.upload-to-s3 }} + context: ${{ inputs.context }} diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index 68988f009308..093d4e9d6cf2 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -159,7 +159,6 @@ jobs: path: ${{ env.CHECKOUT_GREPTIMEDB_PATH }} - uses: ./.github/actions/build-linux-artifacts - working-directory: ${{ env.CHECKOUT_GREPTIMEDB_PATH }} with: arch: amd64 cargo-profile: ${{ env.CARGO_PROFILE }} @@ -171,6 +170,7 @@ jobs: aws-region: ${{ vars.AWS_RELEASE_BUCKET_REGION }} dev-mode: true # Only build the standard greptime binary. upload-to-s3: false # No need to upload to S3. + context: ${{ env.CHECKOUT_GREPTIMEDB_PATH }} build-linux-arm64-artifacts: name: Build linux-arm64 artifacts @@ -193,7 +193,6 @@ jobs: path: ${{ env.CHECKOUT_GREPTIMEDB_PATH }} - uses: ./.github/actions/build-linux-artifacts - working-directory: ${{ env.CHECKOUT_GREPTIMEDB_PATH }} with: arch: arm64 cargo-profile: ${{ env.CARGO_PROFILE }} @@ -205,6 +204,7 @@ jobs: aws-region: ${{ vars.AWS_RELEASE_BUCKET_REGION }} dev-mode: true # Only build the standard greptime binary. upload-to-s3: false # No need to upload to S3. + context: ${{ env.CHECKOUT_GREPTIMEDB_PATH }} release-images-to-dockerhub: name: Build and push images to DockerHub