Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge main into v1.0.0 #60

Merged
merged 15 commits into from
Aug 27, 2024
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
5 changes: 3 additions & 2 deletions .github/workflows/TestCITools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
duckdb_version: v1.0.0
override_ci_tools_repository: ${{ github.repository }}
override_ci_tools_ref: ${{ github.sha }}
extra_toolchains: 'parser_tools'
extra_toolchains: 'parser_tools;fortran;omp'
custom_toolchain_script: true

delta-extension-main:
name: Rust builds (using Delta extension)
Expand All @@ -35,4 +36,4 @@ jobs:
override_ci_tools_ref: ${{ github.sha }}
duckdb_version: v1.0.0
exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools'
extra_toolchains: 'rust'
extra_toolchains: 'rust'
79 changes: 75 additions & 4 deletions .github/workflows/_extension_distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ on:
required: false
type: string
default: ""
# Override the default vcpkg repository
vcpkg_url:
required: false
type: string
default: "https://github.com/microsoft/vcpkg.git"
# Override the default vcpkg commit used by this version of DuckDB
vcpkg_commit:
required: false
Expand Down Expand Up @@ -66,11 +71,16 @@ on:
type: string
default: ""
# Pass extra toolchains
# available: (rust)
# available: (rust, fortran, omp)
extra_toolchains:
required: false
type: string
default: ""
# If set, the setup will look for a script in `./scripts/custom-toolchain-script.sh` to run
custom_toolchain_script:
required: false
type: boolean
default: false
# DEPRECATED: use extra_toolchains instead
enable_rust:
required: false
Expand Down Expand Up @@ -221,6 +231,16 @@ jobs:
run: |
yum install -y bison flex

- name: Install fortran (amd64)
if: ${{ contains(format(';{0};', inputs.extra_toolchains), ';fortran;') && matrix.duckdb_arch == 'linux_amd64' }}
run: |
apt-get install -y -qq gfortran

- name: Install fortran (arm64)
if: ${{ contains(format(';{0};', inputs.extra_toolchains), ';fortran;') && matrix.duckdb_arch == 'linux_arm64' }}
run: |
apt-get install -y -qq gfortran gfortran-aarch64-linux-gnu

###
# Checkin out repositories
###
Expand Down Expand Up @@ -272,6 +292,7 @@ jobs:
uses: lukka/[email protected]
with:
vcpkgGitCommitId: ${{ inputs.vcpkg_commit }}
vcpkgGitURL: ${{ inputs.vcpkg_url }}

- name: Configure OpenSSL for Rust
if: ${{ (inputs.enable_rust || contains(format(';{0};', inputs.extra_toolchains), ';rust;')) }}
Expand All @@ -280,14 +301,22 @@ jobs:
echo "OPENSSL_DIR=`pwd`/build/release/vcpkg_installed/${{ matrix.vcpkg_triplet }}" >> $GITHUB_ENV
echo "OPENSSL_USE_STATIC_LIBS=true" >> $GITHUB_ENV

###
# Custom toolchain script
###
- name: Run custom toolchain script
if: ${{ inputs.custom_toolchain_script }}
shell: bash
run: |
bash scripts/setup-custom-toolchain.sh

###
# Building & testing
###
- name: Build extension
env:
GEN: ninja
CC: ${{ matrix.duckdb_arch == 'linux_arm64' && 'aarch64-linux-gnu-gcc' || '' }}
CXX: ${{ matrix.duckdb_arch == 'linux_arm64' && 'aarch64-linux-gnu-g++' || '' }}
TOOLCHAIN_FLAGS: ${{ matrix.duckdb_arch == 'linux_arm64' && '-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_Fortran_COMPILER=aarch64-linux-gnu-gfortran' || '' }}
DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }}
run: |
make release
Expand Down Expand Up @@ -367,6 +396,7 @@ jobs:
uses: lukka/[email protected]
with:
vcpkgGitCommitId: ${{ inputs.vcpkg_commit }}
vcpkgGitURL: ${{ inputs.vcpkg_url }}

- name: Install Rust cross compile dependency
if: ${{ (inputs.enable_rust || contains(format(';{0};', inputs.extra_toolchains), ';rust;')) && matrix.osx_build_arch == 'x86_64'}}
Expand All @@ -378,6 +408,33 @@ jobs:
run: |
brew install bison flex

- name: install omp (x86)
if: ${{ contains(format(';{0};', inputs.extra_toolchains), ';omp;') && matrix.duckdb_arch == 'osx_amd64' }}
run: |
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
(echo; echo 'eval "$(/usr/local/bin/brew shellenv)"') >> /Users/runner/.bash_profile
eval "$(/usr/local/bin/brew shellenv)"
arch -x86_64 brew install libomp
echo "LDFLAGS=-L/usr/local/opt/libomp/lib" >> $GITHUB_ENV
echo "CFLAGS=-I/usr/local/opt/libomp/include" >> $GITHUB_ENV
echo "CPPFLAGS=-I/usr/local/opt/libomp/include" >> $GITHUB_ENV
echo "CXXFLAGS=-I/usr/local/opt/libomp/include" >> $GITHUB_ENV

- name: install omp (arm)
if: ${{ contains(format(';{0};', inputs.extra_toolchains), ';omp;') && matrix.duckdb_arch == 'osx_arm64' }}
run: |
brew install libomp
echo "LDFLAGS=-L/opt/homebrew/opt/libomp/lib" >> $GITHUB_ENV
echo "CFLAGS=-I/opt/homebrew/opt/libomp/include" >> $GITHUB_ENV
echo "CPPFLAGS=-I/opt/homebrew/opt/libomp/include" >> $GITHUB_ENV
echo "CXXFLAGS=-I/opt/homebrew/opt/libomp/include" >> $GITHUB_ENV

- name: Run custom toolchain script
if: ${{ inputs.custom_toolchain_script }}
shell: bash
run: |
bash scripts/setup-custom-toolchain.sh

- name: Build extension
shell: bash
env:
Expand Down Expand Up @@ -480,6 +537,13 @@ jobs:
uses: lukka/[email protected]
with:
vcpkgGitCommitId: ${{ inputs.vcpkg_commit }}
vcpkgGitURL: ${{ inputs.vcpkg_url }}

- name: Run custom toolchain script
if: ${{ inputs.custom_toolchain_script }}
shell: bash
run: |
bash scripts/setup-custom-toolchain.sh

- name: Build & test extension
env:
Expand Down Expand Up @@ -552,13 +616,20 @@ jobs:
uses: lukka/[email protected]
with:
vcpkgGitCommitId: ${{ inputs.vcpkg_commit }}
vcpkgGitURL: ${{ inputs.vcpkg_url }}

- name: Setup Ccache
uses: hendrikmuhs/ccache-action@main
continue-on-error: true
with:
key: ${{ github.job }}-${{ matrix.duckdb_arch }}

- name: Run custom toolchain script
if: ${{ inputs.custom_toolchain_script }}
shell: bash
run: |
bash scripts/setup-custom-toolchain.sh

- name: Build Wasm module
run: |
make ${{ matrix.duckdb_arch }}
Expand All @@ -568,4 +639,4 @@ jobs:
if-no-files-found: error
name: ${{ inputs.extension_name }}-${{ inputs.duckdb_version }}-extension-${{matrix.duckdb_arch}}${{inputs.artifact_postfix}}
path: |
build/${{ matrix.duckdb_arch }}/extension/${{ inputs.extension_name }}/${{ inputs.extension_name }}.duckdb_extension.wasm
build/${{ matrix.duckdb_arch }}/extension/${{ inputs.extension_name }}/${{ inputs.extension_name }}.duckdb_extension.wasm
Loading