Skip to content

use system duckdb #18

use system duckdb

use system duckdb #18

Workflow file for this run

on:
workflow_dispatch:
push:
tags:
- '*'
branches:
- main
- master
jobs:
build:
name: build ${{ matrix.platform }} ${{ matrix.target }}
strategy:
matrix:
include:
- platform: windows-latest
target: x86_64-pc-windows-msvc
library_artifact: libduckdb-windows-amd64.zip
- platform: macos-latest
target: aarch64-apple-darwin
library_artifact: libduckdb-osx-universal.zip
- platform: ubuntu-latest
target: x86_64-unknown-linux-gnu
library_artifact: libduckdb-linux-amd64.zip
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- uses: robinraju/release-downloader@v1.4
name: download duckdb
with:
repository: "duckdb/duckdb"
tag: "v0.10.1"
fileName: ${{ matrix.library_artifact }}
out-file-path: .
- name: extract duckdb
uses: ihiroky/extract-action@v1
with:
file_path: ${{ github.workspace }}/${{ matrix.library_artifact }}
extract_dir: libduckdb
- run: cargo build --target ${{ matrix.target }} --release
env:
DUCKDB_INCLUDE_DIR: ${{ github.workspace }}/libduckdb
LD_LIBRARY_PATH: ${{ github.workspace }}/libduckdb
- name: save artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.platform }}-${{ matrix.target }}
path: target/${{ matrix.target }}/release/*duckdb_protobuf*
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
- run: |
mkdir release
mv build-macos-latest-aarch64-apple-darwin/libduckdb_protobuf.dylib ./release/protobuf.osx_arm64.duckdb_extension
mv build-ubuntu-latest-x86_64-unknown-linux-gnu/libduckdb_protobuf.so ./release/protobuf.linux_amd64.duckdb_extension
mv build-windows-latest-x86_64-pc-windows-msvc/duckdb_protobuf.dll ./release/protobuf.windows_amd64.duckdb_extension
- name: release
uses: softprops/action-gh-release@v2
with:
files: release/*