Skip to content

allow specifying extension directory #37

allow specifying extension directory

allow specifying extension directory #37

Workflow file for this run

name: CI
on:
push:
branches: [master]
tags:
- '*'
pull_request:
branches: [master]
jobs:
build-macos:
name: Build extension for macos-unversal
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Set up Rust for macos
uses: actions-rs/toolchain@v1
with:
toolchain: stable
# we need only aarch64 since x86 target is installed by default
target: aarch64-apple-darwin
- name: Build extension
run: make loadable-extension
- name: Test Java
run: cd jdbc && ./gradlew test
- name: Save extension output
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v2
with:
name: extension-build
path: build/*
build-linux-amd64:
name: Build extension for linux-amd64
runs-on: ubuntu-latest
# We build the extension in the container which is same as the one used for
# duckdb build as of 0.9.1 to avoid any compatibility issues as much as possible
container: quay.io/pypa/manylinux2014_x86_64
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Set up Rust for linux
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Setup dependencies
# install llvm-toolset-7 for libclang which is required by bindgen
run: yum install -y llvm-toolset-7
- name: Build extension
run: scl enable llvm-toolset-7 "make loadable-extension"
- name: Test Java
run: cd jdbc && ./gradlew test
- name: Save extension output
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v2
with:
name: extension-build
path: build/*
test-rust:
name: Execute Rust test for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
- os: macos-latest
steps:
- uses: actions/checkout@v2
- name: Setup duckdb sources
run: |
make duckdb-sources
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Test Rust
run: |
cargo test
release:
if: startsWith(github.ref, 'refs/tags/')
needs: [build-macos, build-linux-amd64, test-rust]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
outputs:
releaseUploadUrl: ${{ steps.create_release.outputs.upload_url }}
release-binary:
if: startsWith(github.ref, 'refs/tags/')
needs: release
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: osx-universal
- target: linux-amd64
steps:
- uses: actions/checkout@v2
- name: Restore extensions
uses: actions/download-artifact@v2
with:
name: extension-build
path: build
- name: Compress the artifact
shell: bash
run: |
cd build
tar -czf ${{ matrix.target }}.tar.gz ${{ matrix.target }}
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.releaseUploadUrl }}
asset_path: build/${{ matrix.target }}.tar.gz
asset_name: duckdb-jfr-extension-${{ matrix.target }}.tar.gz
asset_content_type: application/octet-stream