Skip to content

Commit 20a4987

Browse files
authored
Merge pull request #58 from Maxxen/build
Add `linux_amd64_gcc4` arch to CI
2 parents 4bb981a + d8013f1 commit 20a4987

File tree

4 files changed

+115
-7
lines changed

4 files changed

+115
-7
lines changed

.github/workflows/Linux.yml

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ jobs:
2424
matrix:
2525
# Add commits/tags to build against other DuckDB versions
2626
duckdb_version: [ 'v0.7.1' ]
27-
arch: ['linux_amd64', 'linux_arm64']
27+
arch: ['linux_amd64', 'linux_arm64', 'linux_amd64_gcc4']
2828
include:
2929
- arch: 'linux_amd64'
3030
container: 'ubuntu:18.04'
3131
- arch: 'linux_arm64'
3232
container: 'ubuntu:18.04'
33+
- arch: 'linux_amd64_gcc4'
34+
container: 'quay.io/pypa/manylinux2014_x86_64'
3335
env:
3436
GEN: ninja
3537

@@ -42,6 +44,7 @@ jobs:
4244
add-apt-repository ppa:git-core/ppa
4345
apt-get update -y -qq
4446
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
47+
4548
- name: Install Git 2.18.5
4649
if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }}
4750
run: |
@@ -51,6 +54,7 @@ jobs:
5154
make
5255
make prefix=/usr install
5356
git --version
57+
5458
- uses: actions/checkout@v3
5559
with:
5660
fetch-depth: 0
@@ -61,12 +65,18 @@ jobs:
6165
run: |
6266
cd duckdb
6367
git checkout ${{ matrix.duckdb_version }}
64-
65-
# Setup ccache
68+
69+
# Setup ccache (not on _gcc4)
6670
- name: ccache
71+
if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }}
6772
uses: hendrikmuhs/[email protected]
6873
with:
6974
key: ${{ github.job }}-${{ matrix.arch }}
75+
76+
- if: ${{ matrix.arch == 'linux_amd64_gcc4' }}
77+
uses: ./duckdb/.github/actions/centos_7_setup
78+
with:
79+
openssl: 1
7080

7181
- if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }}
7282
uses: ./duckdb/.github/actions/ubuntu_16_setup
@@ -79,7 +89,7 @@ jobs:
7989
run: |
8090
export OPENSSL_ROOT_DIR=`pwd`/build/openssl/build
8191
echo "OPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR" >> $GITHUB_ENV
82-
92+
8393
# Build extension
8494
- name: Build extension
8595
env:
@@ -90,12 +100,37 @@ jobs:
90100
run: |
91101
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
92102
make release
103+
93104
- name: Build extension
94105
if: ${{ matrix.arch != 'linux_arm64'}}
95106
run: |
96107
make test_release
108+
97109
- uses: actions/upload-artifact@v2
98110
with:
99111
name: ${{matrix.arch}}-extensions
100112
path: |
101-
build/release/extension/spatial/spatial.duckdb_extension
113+
build/release/extension/spatial/spatial.duckdb_extension
114+
115+
- name: Deploy
116+
env:
117+
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DEPLOY_ID }}
118+
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DEPLOY_KEY }}
119+
AWS_DEFAULT_REGION: ${{ secrets.S3_REGION }}
120+
BUCKET_NAME: ${{ secrets.S3_BUCKET }}
121+
run: |
122+
git config --global --add safe.directory '*'
123+
cd duckdb
124+
git fetch --tags
125+
export DUCKDB_VERSION=`git tag --points-at HEAD`
126+
export DUCKDB_VERSION=${DUCKDB_VERSION:=`git log -1 --format=%h`}
127+
cd ..
128+
if [[ "$AWS_ACCESS_KEY_ID" == "" ]] ; then
129+
echo 'No key set, skipping'
130+
elif [[ "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then
131+
python3 -m pip install pip awscli
132+
./scripts/extension-upload.sh spatial ${{ github.ref_name }} $DUCKDB_VERSION ${{matrix.arch}} $BUCKET_NAME true
133+
elif [[ "$GITHUB_REF" =~ ^(refs/heads/main)$ ]] ; then
134+
python3 -m pip install pip awscli
135+
./scripts/extension-upload.sh spatial `git log -1 --format=%h` $DUCKDB_VERSION ${{matrix.arch}} $BUCKET_NAME false
136+
fi

.github/workflows/MacOS.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,30 @@ jobs:
8989
with:
9090
name: macos_universal-extensions
9191
path: |
92-
build/release/extension/spatial/spatial.duckdb_extension
92+
build/release/extension/spatial/spatial.duckdb_extension
93+
94+
- name: Deploy
95+
env:
96+
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DEPLOY_ID }}
97+
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DEPLOY_KEY }}
98+
AWS_DEFAULT_REGION: ${{ secrets.S3_REGION }}
99+
BUCKET_NAME: ${{ secrets.S3_BUCKET }}
100+
run: |
101+
cd duckdb
102+
git fetch --tags
103+
export DUCKDB_VERSION=`git tag --points-at HEAD`
104+
echo $DUCKDB_VERSION
105+
export DUCKDB_VERSION=${DUCKDB_VERSION:=`git log -1 --format=%h`}
106+
echo $DUCKDB_VERSION
107+
cd ..
108+
if [[ "$AWS_ACCESS_KEY_ID" == "" ]] ; then
109+
echo 'No key set, skipping'
110+
elif [[ "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then
111+
python -m pip install awscli
112+
./scripts/extension-upload.sh spatial ${{ github.ref_name }} $DUCKDB_VERSION osx_amd64 $BUCKET_NAME true
113+
./scripts/extension-upload.sh spatial ${{ github.ref_name }} $DUCKDB_VERSION osx_arm64 $BUCKET_NAME true
114+
elif [[ "$GITHUB_REF" =~ ^(refs/heads/main)$ ]] ; then
115+
python -m pip install awscli
116+
./scripts/extension-upload.sh spatial `git log -1 --format=%h` $DUCKDB_VERSION osx_amd64 $BUCKET_NAME false
117+
./scripts/extension-upload.sh spatial `git log -1 --format=%h` $DUCKDB_VERSION osx_arm64 $BUCKET_NAME false
118+
fi

.github/workflows/Windows.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,26 @@ jobs:
6969
with:
7070
name: windows_x64-extensions
7171
path: |
72-
build/release/extension/spatial/spatial.duckdb_extension
72+
build/release/extension/spatial/spatial.duckdb_extension
73+
74+
- name: Deploy
75+
env:
76+
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DEPLOY_ID }}
77+
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DEPLOY_KEY }}
78+
AWS_DEFAULT_REGION: ${{ secrets.S3_REGION }}
79+
BUCKET_NAME: ${{ secrets.S3_BUCKET }}
80+
run: |
81+
cd duckdb
82+
git fetch --tags
83+
export DUCKDB_VERSION=`git tag --points-at HEAD`
84+
export DUCKDB_VERSION=${DUCKDB_VERSION:=`git log -1 --format=%h`}
85+
cd ..
86+
if [[ "$AWS_ACCESS_KEY_ID" == "" ]] ; then
87+
echo 'No key set, skipping'
88+
elif [[ "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then
89+
python -m pip install awscli
90+
./scripts/extension-upload.sh spatial ${{ github.ref_name }} $DUCKDB_VERSION windows_amd64 $BUCKET_NAME true
91+
elif [[ "$GITHUB_REF" =~ ^(refs/heads/main)$ ]] ; then
92+
python -m pip install awscli
93+
./scripts/extension-upload.sh spatial `git log -1 --format=%h` $DUCKDB_VERSION windows_amd64 $BUCKET_NAME false
94+
fi

scripts/extension-upload.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
# Usage: ./extension-upload.sh <name> <extension_version> <duckdb_version> <architecture> <s3_bucket> <copy_to_latest>
4+
# <name> : Name of the extension
5+
# <extension_version> : Version (commit / version tag) of the extension
6+
# <duckdb_version> : Version (commit / version tag) of DuckDB
7+
# <architecture> : Architecture target of the extension binary
8+
# <s3_bucket> : S3 bucket to upload to
9+
# <copy_to_latest> : Set this as the latest version ("true" / "false", default: "false")
10+
11+
set -e
12+
13+
ext="build/release/extension/$1/$1.duckdb_extension"
14+
15+
# compress extension binary
16+
gzip < $ext > "$1.duckdb_extension.gz"
17+
18+
# upload compressed extension binary to S3
19+
aws s3 cp $1.duckdb_extension.gz s3://$5/$1/$2/$3/$4/$1.duckdb_extension.gz --acl public-read
20+
21+
if [ $6 = 'true']
22+
then
23+
aws s3 cp $1.duckdb_extension.gz s3://$5/$1/latest/$3/$4/$1.duckdb_extension.gz --acl public-read
24+
fi
25+
# also uplo

0 commit comments

Comments
 (0)