diff --git a/.github/actions/build-greptime-binary/action.yml b/.github/actions/build-greptime-binary/action.yml index ecbc05ed38..62ee9eb599 100644 --- a/.github/actions/build-greptime-binary/action.yml +++ b/.github/actions/build-greptime-binary/action.yml @@ -32,9 +32,23 @@ inputs: description: Image Registry required: false default: 'docker.io' + large-page-size: + description: Build GreptimeDB with large page size (65536). + required: false + default: 'false' + runs: using: composite steps: + - name: Set extra build environment variables + shell: bash + run: | + if [[ '${{ inputs.large-page-size }}' == 'true' ]]; then + echo 'EXTRA_BUILD_ENVS="JEMALLOC_SYS_WITH_LG_PAGE=16"' >> $GITHUB_ENV + else + echo 'EXTRA_BUILD_ENVS=' >> $GITHUB_ENV + fi + - name: Build greptime binary shell: bash if: ${{ inputs.build-android-artifacts == 'false' }} @@ -45,7 +59,8 @@ runs: FEATURES=${{ inputs.features }} \ BASE_IMAGE=${{ inputs.base-image }} \ IMAGE_NAMESPACE=${{ inputs.image-namespace }} \ - IMAGE_REGISTRY=${{ inputs.image-registry }} + IMAGE_REGISTRY=${{ inputs.image-registry }} \ + EXTRA_BUILD_ENVS=$EXTRA_BUILD_ENVS - name: Upload artifacts uses: ./.github/actions/upload-artifacts diff --git a/.github/actions/build-linux-artifacts/action.yml b/.github/actions/build-linux-artifacts/action.yml index 9c88b25075..3cb9c43955 100644 --- a/.github/actions/build-linux-artifacts/action.yml +++ b/.github/actions/build-linux-artifacts/action.yml @@ -27,6 +27,10 @@ inputs: description: Working directory to build the artifacts required: false default: . + large-page-size: + description: Build GreptimeDB with large page size (65536). + required: false + default: 'false' runs: using: composite steps: @@ -59,6 +63,7 @@ runs: working-dir: ${{ inputs.working-dir }} image-registry: ${{ inputs.image-registry }} image-namespace: ${{ inputs.image-namespace }} + large-page-size: ${{ inputs.large-page-size }} - name: Clean up the target directory # Clean up the target directory for the centos7 base image, or it will still use the objects of last build. shell: bash @@ -77,6 +82,7 @@ runs: working-dir: ${{ inputs.working-dir }} image-registry: ${{ inputs.image-registry }} image-namespace: ${{ inputs.image-namespace }} + large-page-size: ${{ inputs.large-page-size }} - name: Build greptime on android base image uses: ./.github/actions/build-greptime-binary @@ -89,3 +95,4 @@ runs: build-android-artifacts: true image-registry: ${{ inputs.image-registry }} image-namespace: ${{ inputs.image-namespace }} + large-page-size: ${{ inputs.large-page-size }} diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index fad3e316e8..021867e4ed 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -4,10 +4,11 @@ name: GreptimeDB Development Build on: workflow_dispatch: # Allows you to run this workflow manually. inputs: - repository: - description: The public repository to build + large-page-size: + description: Build GreptimeDB with large page size (65536). + type: boolean required: false - default: GreptimeTeam/greptimedb + default: false commit: # Note: We only pull the source code and use the current workflow to build the artifacts. description: The commit to build required: true @@ -181,6 +182,7 @@ jobs: working-dir: ${{ env.CHECKOUT_GREPTIMEDB_PATH }} image-registry: ${{ vars.ECR_IMAGE_REGISTRY }} image-namespace: ${{ vars.ECR_IMAGE_NAMESPACE }} + large-page-size: ${{ inputs.large-page-size }} build-linux-arm64-artifacts: name: Build linux-arm64 artifacts @@ -214,6 +216,7 @@ jobs: working-dir: ${{ env.CHECKOUT_GREPTIMEDB_PATH }} image-registry: ${{ vars.ECR_IMAGE_REGISTRY }} image-namespace: ${{ vars.ECR_IMAGE_NAMESPACE }} + large-page-size: ${{ inputs.large-page-size }} release-images-to-dockerhub: name: Build and push images to DockerHub diff --git a/Makefile b/Makefile index a200244029..91fb600d14 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,8 @@ CARGO_REGISTRY_CACHE ?= ${HOME}/.cargo/registry ARCH := $(shell uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/') OUTPUT_DIR := $(shell if [ "$(RELEASE)" = "true" ]; then echo "release"; elif [ ! -z "$(CARGO_PROFILE)" ]; then echo "$(CARGO_PROFILE)" ; else echo "debug"; fi) SQLNESS_OPTS ?= +EXTRA_BUILD_ENVS ?= +ASSEMBLED_EXTRA_BUILD_ENV := $(foreach var,$(EXTRA_BUILD_ENVS),-e $(var)) # The arguments for running integration tests. ETCD_VERSION ?= v3.5.9 @@ -83,6 +85,7 @@ build: ## Build debug version greptime. .PHONY: build-by-dev-builder build-by-dev-builder: ## Build greptime by dev-builder. docker run --network=host \ + ${ASSEMBLED_EXTRA_BUILD_ENV} \ -v ${PWD}:/greptimedb -v ${CARGO_REGISTRY_CACHE}:/root/.cargo/registry \ -w /greptimedb ${IMAGE_REGISTRY}/${IMAGE_NAMESPACE}/dev-builder-${BASE_IMAGE}:${DEV_BUILDER_IMAGE_TAG} \ make build \