diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b58e9c352c9..888e648c141 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,9 +62,9 @@ on: description: Do not run integration tests during the build type: boolean default: true - build_linux_artifacts: + build_linux_amd64_artifacts: type: boolean - description: Build linux artifacts (amd64, arm64, and riscv64) + description: Build Linux amd64 artifacts only required: false default: false build_macos_artifacts: @@ -102,6 +102,7 @@ on: env: # The arguments of building greptime. CARGO_PROFILE: nightly + NEXT_RELEASE_VERSION: v1.3.1-candidate # Controls whether to run tests, include unit-test, integration-test and sqlness. DISABLE_RUN_TESTS: ${{ inputs.skip_test || vars.DEFAULT_SKIP_TEST }} @@ -187,7 +188,7 @@ jobs: ./.github/scripts/check-version.sh "${{ steps.create-version.outputs.version }}" - name: Allocate linux-amd64 runner - if: ${{ (inputs.build_linux_artifacts || inputs.publish_github_release || inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule') && steps.check-nightly.outputs.nightly-required == 'true' }} + if: ${{ (inputs.build_linux_amd64_artifacts || inputs.publish_github_release || inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule') && steps.check-nightly.outputs.nightly-required == 'true' }} uses: ./.github/actions/start-runner id: start-linux-amd64-runner with: @@ -202,7 +203,7 @@ jobs: subnet-id: ${{ vars.EC2_RUNNER_SUBNET_ID }} - name: Allocate linux-arm64 runner - if: ${{ (inputs.build_linux_artifacts || inputs.publish_github_release || inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule') && steps.check-nightly.outputs.nightly-required == 'true' }} + if: ${{ false }} # This temporary branch builds amd64 only. uses: ./.github/actions/start-runner id: start-linux-arm64-runner with: @@ -218,7 +219,7 @@ jobs: build-linux-amd64-artifacts: name: Build linux-amd64 artifacts - if: ${{ (inputs.build_linux_artifacts || inputs.publish_github_release || inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule') && (github.event_name != 'schedule' || needs.allocate-runners.outputs.nightly-required == 'true') }} + if: ${{ (inputs.build_linux_amd64_artifacts || inputs.publish_github_release || inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule') && (github.event_name != 'schedule' || needs.allocate-runners.outputs.nightly-required == 'true') }} needs: [ allocate-runners, ] @@ -232,6 +233,7 @@ jobs: - uses: ./.github/actions/build-linux-artifacts with: arch: amd64 + dev-mode: true # Standard Linux binary only; skip CentOS and Android. cargo-profile: ${{ env.CARGO_PROFILE }} version: ${{ needs.allocate-runners.outputs.version }} disable-run-tests: ${{ env.DISABLE_RUN_TESTS }} @@ -244,7 +246,7 @@ jobs: build-linux-arm64-artifacts: name: Build linux-arm64 artifacts - if: ${{ (inputs.build_linux_artifacts || inputs.publish_github_release || inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule') && (github.event_name != 'schedule' || needs.allocate-runners.outputs.nightly-required == 'true') }} + if: ${{ false }} # This temporary branch builds amd64 only. needs: [ allocate-runners, ] @@ -271,7 +273,7 @@ jobs: build-linux-riscv64-artifacts: name: Build linux-riscv64 artifacts - if: ${{ (inputs.build_linux_artifacts || inputs.publish_github_release || inputs.release_images || github.event_name == 'push' || github.event_name == 'schedule') && (github.event_name != 'schedule' || needs.allocate-runners.outputs.nightly-required == 'true') }} + if: ${{ false }} # This temporary branch builds amd64 only. needs: [ allocate-runners, ] @@ -579,7 +581,6 @@ jobs: (github.event_name != 'schedule' || needs.allocate-runners.outputs.nightly-required == 'true') && needs.allocate-runners.result == 'success' && needs.build-linux-amd64-artifacts.result == 'success' && - needs.build-linux-arm64-artifacts.result == 'success' && needs.prepare-release-validation.result == 'success' && (needs.compat-release.result == 'success' || (needs.prepare-release-validation.outputs.run-compat == 'false' && needs.compat-release.result == 'skipped')) && @@ -589,7 +590,6 @@ jobs: needs: [ allocate-runners, build-linux-amd64-artifacts, - build-linux-arm64-artifacts, prepare-release-validation, compat-release, query-regression-release, @@ -604,15 +604,18 @@ jobs: persist-credentials: false - name: Build and push images to dockerhub - uses: ./.github/actions/build-images + uses: ./.github/actions/build-greptime-images with: image-registry: docker.io image-namespace: ${{ vars.IMAGE_NAMESPACE }} image-name: ${{ vars.GREPTIMEDB_IMAGE_NAME }} image-registry-username: ${{ secrets.DOCKERHUB_USERNAME }} image-registry-password: ${{ secrets.DOCKERHUB_TOKEN }} - version: ${{ needs.allocate-runners.outputs.version }} - push-latest-tag: ${{ needs.allocate-runners.outputs.is-current-version-latest == 'true' && needs.allocate-runners.outputs.is-current-version-stable == 'true' && github.ref_type == 'tag' && !contains(github.ref_name, 'nightly') && github.event_name != 'schedule' }} + image-tag: ${{ needs.allocate-runners.outputs.version }} + docker-file: docker/ci/ubuntu/Dockerfile + amd64-artifact-name: greptime-linux-amd64-${{ needs.allocate-runners.outputs.version }} + platforms: linux/amd64 + push-latest-tag: false - name: Set build image result id: set-build-image-result