diff --git a/.github/workflows/Linux.yml b/.github/workflows/Linux.yml index 5a31761d..cef79ace 100644 --- a/.github/workflows/Linux.yml +++ b/.github/workflows/Linux.yml @@ -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' @@ -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++' || '' }}