mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-25 23:49:58 +00:00
ci: dev-build with large page size (#7228)
* ci: able to build greptimedb with large page size in dev-build Signed-off-by: luofucong <luofc@foxmail.com> * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Signed-off-by: luofucong <luofc@foxmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
17
.github/actions/build-greptime-binary/action.yml
vendored
17
.github/actions/build-greptime-binary/action.yml
vendored
@@ -32,9 +32,23 @@ inputs:
|
|||||||
description: Image Registry
|
description: Image Registry
|
||||||
required: false
|
required: false
|
||||||
default: 'docker.io'
|
default: 'docker.io'
|
||||||
|
large-page-size:
|
||||||
|
description: Build GreptimeDB with large page size (65536).
|
||||||
|
required: false
|
||||||
|
default: 'false'
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
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
|
- name: Build greptime binary
|
||||||
shell: bash
|
shell: bash
|
||||||
if: ${{ inputs.build-android-artifacts == 'false' }}
|
if: ${{ inputs.build-android-artifacts == 'false' }}
|
||||||
@@ -45,7 +59,8 @@ runs:
|
|||||||
FEATURES=${{ inputs.features }} \
|
FEATURES=${{ inputs.features }} \
|
||||||
BASE_IMAGE=${{ inputs.base-image }} \
|
BASE_IMAGE=${{ inputs.base-image }} \
|
||||||
IMAGE_NAMESPACE=${{ inputs.image-namespace }} \
|
IMAGE_NAMESPACE=${{ inputs.image-namespace }} \
|
||||||
IMAGE_REGISTRY=${{ inputs.image-registry }}
|
IMAGE_REGISTRY=${{ inputs.image-registry }} \
|
||||||
|
EXTRA_BUILD_ENVS=$EXTRA_BUILD_ENVS
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: ./.github/actions/upload-artifacts
|
uses: ./.github/actions/upload-artifacts
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ inputs:
|
|||||||
description: Working directory to build the artifacts
|
description: Working directory to build the artifacts
|
||||||
required: false
|
required: false
|
||||||
default: .
|
default: .
|
||||||
|
large-page-size:
|
||||||
|
description: Build GreptimeDB with large page size (65536).
|
||||||
|
required: false
|
||||||
|
default: 'false'
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
@@ -59,6 +63,7 @@ runs:
|
|||||||
working-dir: ${{ inputs.working-dir }}
|
working-dir: ${{ inputs.working-dir }}
|
||||||
image-registry: ${{ inputs.image-registry }}
|
image-registry: ${{ inputs.image-registry }}
|
||||||
image-namespace: ${{ inputs.image-namespace }}
|
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.
|
- 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
|
shell: bash
|
||||||
@@ -77,6 +82,7 @@ runs:
|
|||||||
working-dir: ${{ inputs.working-dir }}
|
working-dir: ${{ inputs.working-dir }}
|
||||||
image-registry: ${{ inputs.image-registry }}
|
image-registry: ${{ inputs.image-registry }}
|
||||||
image-namespace: ${{ inputs.image-namespace }}
|
image-namespace: ${{ inputs.image-namespace }}
|
||||||
|
large-page-size: ${{ inputs.large-page-size }}
|
||||||
|
|
||||||
- name: Build greptime on android base image
|
- name: Build greptime on android base image
|
||||||
uses: ./.github/actions/build-greptime-binary
|
uses: ./.github/actions/build-greptime-binary
|
||||||
@@ -89,3 +95,4 @@ runs:
|
|||||||
build-android-artifacts: true
|
build-android-artifacts: true
|
||||||
image-registry: ${{ inputs.image-registry }}
|
image-registry: ${{ inputs.image-registry }}
|
||||||
image-namespace: ${{ inputs.image-namespace }}
|
image-namespace: ${{ inputs.image-namespace }}
|
||||||
|
large-page-size: ${{ inputs.large-page-size }}
|
||||||
|
|||||||
9
.github/workflows/dev-build.yml
vendored
9
.github/workflows/dev-build.yml
vendored
@@ -4,10 +4,11 @@ name: GreptimeDB Development Build
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch: # Allows you to run this workflow manually.
|
workflow_dispatch: # Allows you to run this workflow manually.
|
||||||
inputs:
|
inputs:
|
||||||
repository:
|
large-page-size:
|
||||||
description: The public repository to build
|
description: Build GreptimeDB with large page size (65536).
|
||||||
|
type: boolean
|
||||||
required: false
|
required: false
|
||||||
default: GreptimeTeam/greptimedb
|
default: false
|
||||||
commit: # Note: We only pull the source code and use the current workflow to build the artifacts.
|
commit: # Note: We only pull the source code and use the current workflow to build the artifacts.
|
||||||
description: The commit to build
|
description: The commit to build
|
||||||
required: true
|
required: true
|
||||||
@@ -181,6 +182,7 @@ jobs:
|
|||||||
working-dir: ${{ env.CHECKOUT_GREPTIMEDB_PATH }}
|
working-dir: ${{ env.CHECKOUT_GREPTIMEDB_PATH }}
|
||||||
image-registry: ${{ vars.ECR_IMAGE_REGISTRY }}
|
image-registry: ${{ vars.ECR_IMAGE_REGISTRY }}
|
||||||
image-namespace: ${{ vars.ECR_IMAGE_NAMESPACE }}
|
image-namespace: ${{ vars.ECR_IMAGE_NAMESPACE }}
|
||||||
|
large-page-size: ${{ inputs.large-page-size }}
|
||||||
|
|
||||||
build-linux-arm64-artifacts:
|
build-linux-arm64-artifacts:
|
||||||
name: Build linux-arm64 artifacts
|
name: Build linux-arm64 artifacts
|
||||||
@@ -214,6 +216,7 @@ jobs:
|
|||||||
working-dir: ${{ env.CHECKOUT_GREPTIMEDB_PATH }}
|
working-dir: ${{ env.CHECKOUT_GREPTIMEDB_PATH }}
|
||||||
image-registry: ${{ vars.ECR_IMAGE_REGISTRY }}
|
image-registry: ${{ vars.ECR_IMAGE_REGISTRY }}
|
||||||
image-namespace: ${{ vars.ECR_IMAGE_NAMESPACE }}
|
image-namespace: ${{ vars.ECR_IMAGE_NAMESPACE }}
|
||||||
|
large-page-size: ${{ inputs.large-page-size }}
|
||||||
|
|
||||||
release-images-to-dockerhub:
|
release-images-to-dockerhub:
|
||||||
name: Build and push images to DockerHub
|
name: Build and push images to DockerHub
|
||||||
|
|||||||
3
Makefile
3
Makefile
@@ -17,6 +17,8 @@ CARGO_REGISTRY_CACHE ?= ${HOME}/.cargo/registry
|
|||||||
ARCH := $(shell uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
|
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)
|
OUTPUT_DIR := $(shell if [ "$(RELEASE)" = "true" ]; then echo "release"; elif [ ! -z "$(CARGO_PROFILE)" ]; then echo "$(CARGO_PROFILE)" ; else echo "debug"; fi)
|
||||||
SQLNESS_OPTS ?=
|
SQLNESS_OPTS ?=
|
||||||
|
EXTRA_BUILD_ENVS ?=
|
||||||
|
ASSEMBLED_EXTRA_BUILD_ENV := $(foreach var,$(EXTRA_BUILD_ENVS),-e $(var))
|
||||||
|
|
||||||
# The arguments for running integration tests.
|
# The arguments for running integration tests.
|
||||||
ETCD_VERSION ?= v3.5.9
|
ETCD_VERSION ?= v3.5.9
|
||||||
@@ -83,6 +85,7 @@ build: ## Build debug version greptime.
|
|||||||
.PHONY: build-by-dev-builder
|
.PHONY: build-by-dev-builder
|
||||||
build-by-dev-builder: ## Build greptime by dev-builder.
|
build-by-dev-builder: ## Build greptime by dev-builder.
|
||||||
docker run --network=host \
|
docker run --network=host \
|
||||||
|
${ASSEMBLED_EXTRA_BUILD_ENV} \
|
||||||
-v ${PWD}:/greptimedb -v ${CARGO_REGISTRY_CACHE}:/root/.cargo/registry \
|
-v ${PWD}:/greptimedb -v ${CARGO_REGISTRY_CACHE}:/root/.cargo/registry \
|
||||||
-w /greptimedb ${IMAGE_REGISTRY}/${IMAGE_NAMESPACE}/dev-builder-${BASE_IMAGE}:${DEV_BUILDER_IMAGE_TAG} \
|
-w /greptimedb ${IMAGE_REGISTRY}/${IMAGE_NAMESPACE}/dev-builder-${BASE_IMAGE}:${DEV_BUILDER_IMAGE_TAG} \
|
||||||
make build \
|
make build \
|
||||||
|
|||||||
Reference in New Issue
Block a user