WASM builds (still linking broken) #141
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux | |
on: [push, pull_request,repository_dispatch] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
linux: | |
name: Linux Release | |
runs-on: ubuntu-latest | |
container: ${{ matrix.container }} | |
strategy: | |
matrix: | |
# Add commits/tags to build against other DuckDB versions | |
duckdb_version: [ '<submodule_version>' ] | |
# arch: ['linux_amd64', 'linux_arm64', 'linux_amd64_gcc4'] | |
arch: ['linux_amd64', 'linux_amd64_gcc4'] # Disable linux_arm64 build for now | |
include: | |
- arch: 'linux_amd64' | |
container: 'ubuntu:18.04' | |
- arch: 'linux_amd64_gcc4' | |
container: 'quay.io/pypa/manylinux2014_x86_64' | |
#- arch: 'linux_arm64' | |
# container: 'ubuntu:18.04' | |
env: | |
GEN: ninja | |
DUCKDB_PLATFORM: ${{ matrix.arch }} | |
steps: | |
- name: Install required ubuntu packages | |
if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }} | |
run: | | |
apt-get update -y -qq | |
apt-get install -y -qq software-properties-common | |
add-apt-repository ppa:git-core/ppa | |
apt-get update -y -qq | |
apt-get install -y -qq 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 Rust | |
run: curl https://sh.rustup.rs -sSf | bash -s -- -y | |
- name: Install Rust Cross-compilation targets | |
if: ${{ matrix.arch == 'linux_arm64' }} | |
run: $HOME/.cargo/bin/rustup target add aarch64-unknown-linux-gnu | |
- name: Install Git 2.18.5 | |
if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }} | |
run: | | |
wget https://github.com/git/git/archive/refs/tags/v2.18.5.tar.gz | |
tar xvf v2.18.5.tar.gz | |
cd git-2.18.5 | |
make | |
make prefix=/usr install | |
git --version | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: 'true' | |
- name: Checkout DuckDB to version | |
if: ${{ matrix.duckdb_version != '<submodule_version>'}} | |
run: | | |
cd duckdb | |
git checkout ${{ matrix.duckdb_version }} | |
- name: Patch manylinux_2014_setup | |
if: ${{ matrix.arch == 'linux_amd64_gcc4' }} | |
run: | | |
sed -i 's@scripts/@duckdb/scripts/@g' ./duckdb/.github/actions/manylinux_2014_setup/action.yml | |
- if: ${{ matrix.arch == 'linux_amd64_gcc4' }} | |
uses: ./duckdb/.github/actions/manylinux_2014_setup | |
with: | |
openssl: 0 | |
ssh: 1 | |
- if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }} | |
uses: ./duckdb/.github/actions/ubuntu_18_setup | |
with: | |
aarch64_cross_compile: ${{ matrix.arch == 'linux_arm64' && 1 }} | |
# Build extension | |
- name: Build extension | |
env: | |
GEN: ninja | |
STATIC_LIBCPP: 1 | |
EXTENSION_STATIC_BUILD: 1 | |
CC: ${{ matrix.arch == 'linux_arm64' && 'aarch64-linux-gnu-gcc' || '' }} | |
CXX: ${{ matrix.arch == 'linux_arm64' && 'aarch64-linux-gnu-g++' || '' }} | |
Rust_CARGO_TARGET: ${{ matrix.arch == 'linux_arm64' && 'aarch64-unknown-linux-gnu' || '' }} | |
run: | | |
make release | |
- name: Build extension | |
if: ${{ matrix.arch != 'linux_arm64'}} | |
run: | | |
make test | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: ${{matrix.arch}}-extensions | |
path: | | |
build/release/extension/prql/prql.duckdb_extension | |
- name: Install SSH Key | |
uses: shimataro/ssh-key-action@v2.6.1 | |
with: | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | |
- name: Deploy | |
env: | |
SSH_USER: ${{ secrets.SSH_USER }} | |
SSH_HOST: ${{ secrets.SSH_HOST }} | |
UPLOAD_BASE_PATH: ${{ secrets.UPLOAD_BASE_PATH }} | |
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 [[ "$SSH_HOST" == "" ]] ; then | |
echo 'No key set, skipping' | |
elif [[ "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then | |
./scripts/extension-upload.sh prql ${{ github.ref_name }} $DUCKDB_VERSION ${{matrix.arch}} true | |
elif [[ "$GITHUB_REF" =~ ^(refs/heads/main)$ ]] ; then | |
./scripts/extension-upload.sh prql `git log -1 --format=%h` $DUCKDB_VERSION ${{matrix.arch}} false | |
fi |