Skip to content

Build artifacts

Build artifacts #22

Workflow file for this run

name: Build artifacts
on:
workflow_dispatch:
inputs:
arch:
description: "Target architecture"
required: true
type: choice
default: aarch64
options:
- aarch64
- x86_64
glibc:
description: "Target glibc version"
required: true
type: choice
default: glibc-2.27
options:
- glibc-2.27(ubuntu-18.04)
- glibc-2.19(ubuntu-14.04)
jobs:
build-artifacts:
name: Build ${{ inputs.arch }} on ${{ inputs.glibc }}
runs-on: ${{ inputs.arch == 'aarch64'
&& 'ubuntu-2204-32-cores-arm'
|| 'ubuntu-22.04-32-cores' }}
env:
BUILDER_IMAGE: ${{ inputs.glibc == 'glibc-2.27'
&& 'greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/dev-build-ubuntu18:rust-1.92-20251217'
|| 'greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/dev-build-ubuntu14:rust-1.92-20251222' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup buildx
uses: docker/setup-buildx-action@v3
- name: Build artifacts
uses: docker/build-push-action@v3
env:
BUILDKIT_PROGRESS: plain
with:
file: ./docker/package/Dockerfile
push: false
provenance: false
outputs: type=local,dest=./build/bins
build-args: |
BUILDER_IMAGE=${{ env.BUILDER_IMAGE }}
- name: Pack artifacts
shell: bash
run: |
mkdir -p bins
cp ./build/bins/libgreptimedb_client_cpp_ffi.so bins/
cp ./build/bins/ffi-example bins/
cp ./cpp/src/greptime.h bins/
cp ./cpp/src/main.c bins/ffi-example.c
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ format('libgreptimedb-client-cpp-ffi-{0}-{1}-linux', inputs.arch, inputs.glibc) }}
path: ./bins