Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Workflow file for this run

name: Build static library dependencies
on:
push:
paths:
- ".github/workflows/**"
- "Makefile"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
prepare:
if: ${{ github.repository != 'sundeck-io/go-duckdb-latest' }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- shell: bash
run: make deps.header
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: "Run tests"
run: go test ./ -run '^TestOpen$' duckdb_test.go
- uses: actions/upload-artifact@v4
with:
name: duckdb_h
path: duckdb.h
retention-days: 1
darwin_amd64:
if: ${{ github.repository != 'sundeck-io/go-duckdb-latest' }}
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- shell: bash
run: make deps.darwin.amd64
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: "Run tests"
run: go test ./ -run '^TestOpen$' duckdb_test.go
- uses: actions/upload-artifact@v4
with:
name: darwin_amd64
path: deps/darwin_amd64/libduckdb.a
retention-days: 1
darwin_arm64:
if: ${{ github.repository != 'sundeck-io/go-duckdb-latest' }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- shell: bash
run: make deps.darwin.arm64
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: "Run tests"
run: go test ./ -run '^TestOpen$' duckdb_test.go
- uses: actions/upload-artifact@v4
with:
name: darwin_arm64
path: deps/darwin_arm64/libduckdb.a
retention-days: 1
linux_amd64:
if: ${{ github.repository != 'sundeck-io/go-duckdb-latest' }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- shell: bash
run: make deps.linux.amd64
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: "Run tests"
run: go test ./ -run '^TestOpen$' duckdb_test.go
- uses: actions/upload-artifact@v4
with:
name: linux_amd64
path: deps/linux_amd64/libduckdb.a
retention-days: 1
linux_arm64:
if: ${{ github.repository != 'sundeck-io/go-duckdb-latest' }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Install cross compile toolchain
shell: bash
run: |
sudo apt update
sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- shell: bash
run: make deps.linux.arm64
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: "Run tests"
run: go test ./ -run '^TestOpen$' duckdb_test.go
- uses: actions/upload-artifact@v4
with:
name: linux_arm64
path: deps/linux_arm64/libduckdb.a
retention-days: 1
freebsd_amd64:
if: ${{ github.repository != 'sundeck-io/go-duckdb-latest' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y \
cmake \
gmake \
git
run: gmake deps.freebsd.amd64
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: "Run tests"
run: go test ./ -run '^TestOpen$' duckdb_test.go
- uses: actions/upload-artifact@v4
with:
name: freebsd_amd64
path: deps/freebsd_amd64/libduckdb.a
retention-days: 1
windows_amd64:
if: ${{ github.repository != 'sundeck-io/go-duckdb-latest' }}
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- shell: bash
run: make deps.windows.amd64
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- uses: actions/upload-artifact@v4
with:
name: windows_amd64
path: deps/windows_amd64/libduckdb.a
retention-days: 1
commit:
runs-on: ubuntu-latest
needs: [prepare, darwin_amd64, darwin_arm64, linux_amd64, linux_arm64, freebsd_amd64, windows_amd64]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- shell: bash
run: |
rm -f deps/darwin_amd64/libduckdb.a
rm -f deps/darwin_arm64/libduckdb.a
rm -f deps/linux_amd64/libduckdb.a
rm -f deps/linux_arm64/libduckdb.a
rm -f deps/freebsd_amd64/libduckdb.a
rm -f deps/windows_amd64/libduckdb.a
rm -f duckdb.h
- uses: actions/download-artifact@v4
with:
name: duckdb_h
path: .
- uses: actions/download-artifact@v4
with:
name: darwin_amd64
path: deps/darwin_amd64
- uses: actions/download-artifact@v4
with:
name: darwin_arm64
path: deps/darwin_arm64
- uses: actions/download-artifact@v4
with:
name: linux_amd64
path: deps/linux_amd64
- uses: actions/download-artifact@v4
with:
name: linux_arm64
path: deps/linux_arm64
- uses: actions/download-artifact@v4
with:
name: freebsd_amd64
path: deps/freebsd_amd64
- uses: actions/download-artifact@v4
with:
name: windows_amd64
path: deps/windows_amd64
- name: Push static libraries
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Re-build static libraries