Skip to content

Build artifacts

Build artifacts #25

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/distro combo"
required: true
type: choice
default: ubuntu18.04 (glibc2.27)
options:
- ubuntu18.04 (glibc2.27)
- ubuntu14.04 (glibc2.19)
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 == 'ubuntu18.04 (glibc2.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' }}
GLIBC_LABEL: ${{ inputs.glibc == 'ubuntu18.04 (glibc2.27)' && 'glibc2.27' || 'glibc2.19' }}
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/libgreptime.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('greptimedb-c-client-{0}-{1}.zip', inputs.arch, env.GLIBC_LABEL) }}
path: ./bins