Skip to content

Build artifacts

Build artifacts #17

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
jobs:
build-artifacts:
runs-on: ${{ github.event.inputs.arch == 'aarch64'
&& 'ubuntu-2204-32-cores-arm'
|| 'ubuntu-22.04-32-cores' }}
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
- 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: libgreptimedb-client-cpp-ffi-${{ github.event.inputs.arch }}-linux
path: ./bins