Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 40 additions & 5 deletions .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ jobs:
matrix:
# Add commits/tags to build against other DuckDB versions
duckdb_version: [ 'v0.7.1' ]
arch: ['linux_amd64', 'linux_arm64']
arch: ['linux_amd64', 'linux_arm64', 'linux_amd64_gcc4']
include:
- arch: 'linux_amd64'
container: 'ubuntu:18.04'
- arch: 'linux_arm64'
container: 'ubuntu:18.04'
- arch: 'linux_amd64_gcc4'
container: 'quay.io/pypa/manylinux2014_x86_64'
env:
GEN: ninja

Expand All @@ -42,6 +44,7 @@ jobs:
add-apt-repository ppa:git-core/ppa
apt-get update -y -qq
apt-get install -y -qq lsb-release sqlite3 ninja-build make gcc-multilib g++-multilib libssl-dev wget openjdk-8-jdk zip maven unixodbc-dev libc6-dev-i386 lib32readline6-dev libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip build-essential checkinstall libffi-dev curl libz-dev openssh-client

- name: Install Git 2.18.5
if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }}
run: |
Expand All @@ -51,6 +54,7 @@ jobs:
make
make prefix=/usr install
git --version

- uses: actions/checkout@v3
with:
fetch-depth: 0
Expand All @@ -61,12 +65,18 @@ jobs:
run: |
cd duckdb
git checkout ${{ matrix.duckdb_version }}

# Setup ccache
# Setup ccache (not on _gcc4)
- name: ccache
if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }}
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}-${{ matrix.arch }}

- if: ${{ matrix.arch == 'linux_amd64_gcc4' }}
uses: ./duckdb/.github/actions/centos_7_setup
with:
openssl: 1

- if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }}
uses: ./duckdb/.github/actions/ubuntu_16_setup
Expand All @@ -79,7 +89,7 @@ jobs:
run: |
export OPENSSL_ROOT_DIR=`pwd`/build/openssl/build
echo "OPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR" >> $GITHUB_ENV

# Build extension
- name: Build extension
env:
Expand All @@ -90,12 +100,37 @@ jobs:
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
make release

- name: Build extension
if: ${{ matrix.arch != 'linux_arm64'}}
run: |
make test_release

- uses: actions/upload-artifact@v2
with:
name: ${{matrix.arch}}-extensions
path: |
build/release/extension/spatial/spatial.duckdb_extension
build/release/extension/spatial/spatial.duckdb_extension

- name: Deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DEPLOY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DEPLOY_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.S3_REGION }}
BUCKET_NAME: ${{ secrets.S3_BUCKET }}
run: |
git config --global --add safe.directory '*'
cd duckdb
git fetch --tags
export DUCKDB_VERSION=`git tag --points-at HEAD`
export DUCKDB_VERSION=${DUCKDB_VERSION:=`git log -1 --format=%h`}
cd ..
if [[ "$AWS_ACCESS_KEY_ID" == "" ]] ; then
echo 'No key set, skipping'
elif [[ "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then
python3 -m pip install pip awscli
./scripts/extension-upload.sh spatial ${{ github.ref_name }} $DUCKDB_VERSION ${{matrix.arch}} $BUCKET_NAME true
elif [[ "$GITHUB_REF" =~ ^(refs/heads/main)$ ]] ; then
python3 -m pip install pip awscli
./scripts/extension-upload.sh spatial `git log -1 --format=%h` $DUCKDB_VERSION ${{matrix.arch}} $BUCKET_NAME false
fi
28 changes: 27 additions & 1 deletion .github/workflows/MacOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,30 @@ jobs:
with:
name: macos_universal-extensions
path: |
build/release/extension/spatial/spatial.duckdb_extension
build/release/extension/spatial/spatial.duckdb_extension

- name: Deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DEPLOY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DEPLOY_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.S3_REGION }}
BUCKET_NAME: ${{ secrets.S3_BUCKET }}
run: |
cd duckdb
git fetch --tags
export DUCKDB_VERSION=`git tag --points-at HEAD`
echo $DUCKDB_VERSION
export DUCKDB_VERSION=${DUCKDB_VERSION:=`git log -1 --format=%h`}
echo $DUCKDB_VERSION
cd ..
if [[ "$AWS_ACCESS_KEY_ID" == "" ]] ; then
echo 'No key set, skipping'
elif [[ "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then
python -m pip install awscli
./scripts/extension-upload.sh spatial ${{ github.ref_name }} $DUCKDB_VERSION osx_amd64 $BUCKET_NAME true
./scripts/extension-upload.sh spatial ${{ github.ref_name }} $DUCKDB_VERSION osx_arm64 $BUCKET_NAME true
elif [[ "$GITHUB_REF" =~ ^(refs/heads/main)$ ]] ; then
python -m pip install awscli
./scripts/extension-upload.sh spatial `git log -1 --format=%h` $DUCKDB_VERSION osx_amd64 $BUCKET_NAME false
./scripts/extension-upload.sh spatial `git log -1 --format=%h` $DUCKDB_VERSION osx_arm64 $BUCKET_NAME false
fi
24 changes: 23 additions & 1 deletion .github/workflows/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,26 @@ jobs:
with:
name: windows_x64-extensions
path: |
build/release/extension/spatial/spatial.duckdb_extension
build/release/extension/spatial/spatial.duckdb_extension

- name: Deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DEPLOY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DEPLOY_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.S3_REGION }}
BUCKET_NAME: ${{ secrets.S3_BUCKET }}
run: |
cd duckdb
git fetch --tags
export DUCKDB_VERSION=`git tag --points-at HEAD`
export DUCKDB_VERSION=${DUCKDB_VERSION:=`git log -1 --format=%h`}
cd ..
if [[ "$AWS_ACCESS_KEY_ID" == "" ]] ; then
echo 'No key set, skipping'
elif [[ "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then
python -m pip install awscli
./scripts/extension-upload.sh spatial ${{ github.ref_name }} $DUCKDB_VERSION windows_amd64 $BUCKET_NAME true
elif [[ "$GITHUB_REF" =~ ^(refs/heads/main)$ ]] ; then
python -m pip install awscli
./scripts/extension-upload.sh spatial `git log -1 --format=%h` $DUCKDB_VERSION windows_amd64 $BUCKET_NAME false
fi
25 changes: 25 additions & 0 deletions scripts/extension-upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# Usage: ./extension-upload.sh <name> <extension_version> <duckdb_version> <architecture> <s3_bucket> <copy_to_latest>
# <name> : Name of the extension
# <extension_version> : Version (commit / version tag) of the extension
# <duckdb_version> : Version (commit / version tag) of DuckDB
# <architecture> : Architecture target of the extension binary
# <s3_bucket> : S3 bucket to upload to
# <copy_to_latest> : Set this as the latest version ("true" / "false", default: "false")

set -e

ext="build/release/extension/$1/$1.duckdb_extension"

# compress extension binary
gzip < $ext > "$1.duckdb_extension.gz"

# upload compressed extension binary to S3
aws s3 cp $1.duckdb_extension.gz s3://$5/$1/$2/$3/$4/$1.duckdb_extension.gz --acl public-read

if [ $6 = 'true']
then
aws s3 cp $1.duckdb_extension.gz s3://$5/$1/latest/$3/$4/$1.duckdb_extension.gz --acl public-read
fi
# also uplo