Skip to content

Commit

Permalink
Merge pull request #60 from Maxxen/build
Browse files Browse the repository at this point in the history
Properly support linux ubuntu 16 target
  • Loading branch information
Maxxen authored Apr 28, 2023
2 parents 20a4987 + 65c5a6f commit f5df20b
Showing 1 changed file with 44 additions and 6 deletions.
50 changes: 44 additions & 6 deletions .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
arch: ['linux_amd64', 'linux_arm64', 'linux_amd64_gcc4']
include:
- arch: 'linux_amd64'
container: 'ubuntu:18.04'
container: 'ubuntu:16.04'
- arch: 'linux_arm64'
container: 'ubuntu:18.04'
- arch: 'linux_amd64_gcc4'
Expand Down Expand Up @@ -82,18 +82,56 @@ jobs:
uses: ./duckdb/.github/actions/ubuntu_16_setup
with:
aarch64_cross_compile: ${{ matrix.arch == 'linux_arm64' && 1 }}
openssl: 1
openssl: 0

# Openssl install dir was weirdly configured in main duckdb?
- name: Install OpenSSL 1.1.1 (for AMD64)
if: ${{ matrix.arch == 'linux_amd64' }}
shell: bash
run: |
wget https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_1_1_1s.tar.gz
tar -xzvf OpenSSL_1_1_1s.tar.gz
mv openssl-OpenSSL_1_1_1s openssl-1.1.1s
cd openssl-1.1.1s
find ./ -type f -exec sed -i -e 's/\#\ define\ OPENSSL\_VERSION\_NUMBER/\#define\ OPENSSL\_VERSION\_NUMBER/g' {} \;
./config --libdir=lib no-shared zlib-dynamic
make
make install
- name: Configure OpenSSL path
- name: Install OpenSSL for Cross compiling (for ARM64)
if: ${{ matrix.arch == 'linux_arm64' }}
shell: bash
run: |
mkdir -p build/openssl
cd build/openssl
mkdir sources build
curl https://www.openssl.org/source/openssl-3.0.5.tar.gz | tar zxv -C sources --strip-components 1
export OPENSSL_ROOT_DIR=`pwd`/build
cd sources
export CC="aarch64-linux-gnu-gcc"
perl ./Configure --prefix=$OPENSSL_ROOT_DIR linux-aarch64 no-asm
make -j
make install_sw
- name: Configure OpenSSL path for ARM64
if: ${{ matrix.arch == 'linux_arm64' }}
shell: bash
run: |
export OPENSSL_ROOT_DIR=`pwd`/build/openssl/build
echo "OPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR" >> $GITHUB_ENV
- name: Configure OpenSSL path for AMD64
if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_amd64_gcc4'}}
shell: bash
run: |
export OPENSSL_ROOT_DIR=`pwd`/build/openssl/build
echo "OPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR" >> $GITHUB_ENV
echo "OPENSSL_ROOT_DIR=/usr/local/ssl" >> $GITHUB_ENV
# Build extension
- name: Build extension
env:
GEN: ninja
GEN: ninja
OPENSSL_ROOT_DIR: ${{ env.OPENSSL_ROOT_DIR }}
STATIC_OPENSSL: 1
STATIC_LIBCPP: 1
CC: ${{ matrix.arch == 'linux_arm64' && 'aarch64-linux-gnu-gcc' || '' }}
CXX: ${{ matrix.arch == 'linux_arm64' && 'aarch64-linux-gnu-g++' || '' }}
Expand Down

0 comments on commit f5df20b

Please sign in to comment.