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.1.3 #116

Merged
merged 54 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
8d4a9e2
small ci tweaks
samansmink Oct 15, 2024
5f70495
add skipping option to makefile
samansmink Oct 15, 2024
5f13e93
call test_release explicitly instead of test
samansmink Oct 15, 2024
f564633
use : not =
samansmink Oct 15, 2024
df506fd
skip tests outside docker for now
samansmink Oct 15, 2024
12c1fc2
tabs not whitespaces
samansmink Oct 15, 2024
e4955f0
fix windows; switch to make configure_ci step instead of custom_toolc…
samansmink Oct 15, 2024
3d1c62e
allow passing platform as file
samansmink Nov 6, 2024
0d7e751
update workflow for upcoming rust template
samansmink Nov 6, 2024
3930e25
cleaner error handling in metadata script
samansmink Nov 6, 2024
fbcf3da
fix disabling test outside docker
samansmink Nov 6, 2024
74f0e97
cleaning comments for skipping
samansmink Nov 6, 2024
6ec869b
switch to matrix distro script in ci
samansmink Nov 6, 2024
bb3809d
Merge pull request #98 from samansmink/minor-ci-tweaks
samansmink Nov 7, 2024
795955c
add platform/version detection script
samansmink Nov 7, 2024
27facd3
add makefiles for C extensions
samansmink Nov 7, 2024
3e987be
Merge pull request #101 from samansmink/minor-scipt-additions
samansmink Nov 7, 2024
df8d46f
bump download artifact
samansmink Nov 8, 2024
21d3a39
also bump upload
samansmink Nov 8, 2024
5cd6f79
Merge pull request #102 from samansmink/bump-download-artifact
samansmink Nov 8, 2024
ab001a8
simplify matrix generation step of build
samansmink Nov 8, 2024
74cca85
simplify matrix creation step for deploy
samansmink Nov 8, 2024
f164d86
Fix hardcoded extension_name
joewalnes Nov 10, 2024
eb07f23
Merge pull request #104 from joewalnes/fix-extension-name
samansmink Nov 12, 2024
0315837
Merge pull request #103 from samansmink/refactor-matrix-generation
samansmink Nov 12, 2024
cd15603
formatting
carlopi Nov 12, 2024
a1a430d
Add EXTENSION_FILENAME_NO_METADATA concept
carlopi Nov 12, 2024
9b64725
Add wasm detection, and handling both in Capi and rust
carlopi Nov 12, 2024
1f7a0fe
Workaround for crate-type
carlopi Nov 12, 2024
78eb998
emscripten invokation: skip verbose
carlopi Nov 12, 2024
5bdbe4d
Merge pull request #105 from carlopi/fixes_wasm
carlopi Nov 13, 2024
ce31455
Move Wasm targets instructions into extension-ci-tools
carlopi Nov 13, 2024
d3a5766
Merge pull request #106 from carlopi/more_fixes_wasm
samansmink Nov 13, 2024
ca1ea12
add c makefile
samansmink Nov 13, 2024
f801a7a
two small tweaks
samansmink Nov 14, 2024
4364677
rename
samansmink Nov 15, 2024
871db4d
Merge pull request #108 from samansmink/add-c-makefile-2
samansmink Nov 15, 2024
37750a4
add new templates to CI
samansmink Nov 15, 2024
92969bb
disable non-working archs
samansmink Nov 15, 2024
e8b396a
trigger ci
samansmink Nov 15, 2024
902ed05
disable rust threads ci run
samansmink Nov 15, 2024
a4c1050
Support also Wasm targets
carlopi Nov 15, 2024
9fd9123
Merge pull request #110 from carlopi/wasm_support_c
carlopi Nov 15, 2024
3d16a4d
Fixup invocation
carlopi Nov 15, 2024
83c4013
Actually fix properly for ninja
carlopi Nov 15, 2024
512b17d
Merge pull request #109 from samansmink/add-new-templates-to-ci
samansmink Nov 15, 2024
271ebe1
Fixup cmake --build invocation for Wasm targets
carlopi Nov 17, 2024
0c1e35e
vcpkg: Add handling for Wasm targets in c_api
carlopi Nov 17, 2024
f950015
Move from wasm_coi to wasm_threads
carlopi Nov 17, 2024
afbb4dc
Merge pull request #113 from carlopi/wasm_support_c
samansmink Nov 18, 2024
78529d2
Enable Wasm for templates and remove unnecessary toolchains
carlopi Nov 19, 2024
916d4ef
Merge pull request #114 from carlopi/enable_wasm_templates
samansmink Nov 19, 2024
b712ab8
remove pkg-config brew install
samansmink Nov 25, 2024
46a8dd6
Merge pull request #115 from samansmink/remove-pkg-config
samansmink Nov 25, 2024
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
26 changes: 25 additions & 1 deletion .github/workflows/TestCITools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,31 @@ jobs:
override_ci_tools_repository: ${{ github.repository }}
ci_tools_version: ${{ github.sha }}
extra_toolchains: 'parser_tools;fortran;omp;go;python3'
custom_toolchain_script: true

extension-template-capi:
name: Extension template (C API)
uses: ./.github/workflows/_extension_distribution.yml
with:
extension_name: capi_quack
override_repository: duckdb/extension-template-c
override_ref: main
duckdb_version: v1.1.3
override_ci_tools_repository: ${{ github.repository }}
ci_tools_version: ${{ github.sha }}
extra_toolchains: 'python3'

extension-template-rust:
name: Extension template (Rust)
uses: ./.github/workflows/_extension_distribution.yml
with:
extension_name: rusty_quack
override_repository: duckdb/extension-template-rs
override_ref: main
duckdb_version: v1.1.3
override_ci_tools_repository: ${{ github.repository }}
ci_tools_version: ${{ github.sha }}
extra_toolchains: 'rust;python3'
exclude_archs: 'windows_amd64_rtools;windows_amd64_mingw' # TODO: remove once fixed upstream

delta-extension-main:
name: Rust builds (using Delta extension)
Expand Down
27 changes: 17 additions & 10 deletions .github/workflows/_extension_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ on:
duckdb_version:
required: true
type: string
# The version of the https://github.com/duckdb/extension-ci-tools submodule of the extension. In most cases will be identical to `duckdb_version`.
# Passing this explicitly is required because of https://github.com/actions/toolkit/issues/1264
ci_tools_version:
required: true
type: string
# Override the repo for the CI tools (for testing CI tools itself)
override_ci_tools_repository:
required: false
type: string
default: "duckdb/extension-ci-tools"
# ';' separated list of architectures to exclude, for example: 'linux_amd64;osx_arm64'
exclude_archs:
required: false
Expand Down Expand Up @@ -47,7 +57,7 @@ on:
matrix_parse_script:
required: false
type: string
default: "./duckdb/scripts/modify_distribution_matrix.py"
default: "./extension-ci-tools/scripts/modify_distribution_matrix.py"

jobs:
generate_matrix:
Expand All @@ -57,18 +67,15 @@ jobs:
deploy_matrix: ${{ steps.parse-matrices.outputs.deploy_matrix }}
steps:
- uses: actions/checkout@v4
name: Checkout Extension CI tools
with:
fetch-depth: 0
submodules: 'true'

- name: Checkout DuckDB to version
run: |
cd duckdb
git checkout ${{ inputs.duckdb_version }}
path: 'extension-ci-tools'
ref: ${{ inputs.ci_tools_version }}
repository: ${{ inputs.override_ci_tools_repository }}

- id: parse-matrices
run: |
python3 ${{ inputs.matrix_parse_script }} --input ./duckdb/.github/config/distribution_matrix.json --deploy_matrix --output deploy_matrix.json --exclude "${{ inputs.exclude_archs }}" --pretty
python3 ${{ inputs.matrix_parse_script }} --input extension-ci-tools/config/distribution_matrix.json --deploy_matrix --output deploy_matrix.json --exclude "${{ inputs.exclude_archs }}" --pretty
deploy_matrix="`cat deploy_matrix.json`"
echo deploy_matrix=$deploy_matrix >> $GITHUB_OUTPUT
echo `cat $GITHUB_OUTPUT`
Expand All @@ -92,7 +99,7 @@ jobs:
cd duckdb
git checkout ${{ inputs.duckdb_version }}

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: ${{ inputs.extension_name }}-${{ inputs.duckdb_version }}-extension-${{matrix.duckdb_arch}}${{inputs.artifact_postfix}}${{startsWith(matrix.duckdb, 'wasm') && '.wasm' || ''}}
path: |
Expand Down
122 changes: 53 additions & 69 deletions .github/workflows/_extension_distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ on:
matrix_parse_script:
required: false
type: string
default: "./duckdb/scripts/modify_distribution_matrix.py"
default: "./extension-ci-tools/scripts/modify_distribution_matrix.py"
# Enable building the DuckDB Shell
build_duckdb_shell:
required: false
Expand All @@ -76,11 +76,6 @@ on:
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
rust_logs:
required: false
type: boolean
Expand All @@ -105,6 +100,7 @@ on:
required: false
type: boolean
default: false

jobs:
generate_matrix:
name: Generate matrix
Expand All @@ -115,57 +111,20 @@ jobs:
osx_matrix: ${{ steps.set-matrix-osx.outputs.osx_matrix }}
wasm_matrix: ${{ steps.set-matrix-wasm.outputs.wasm_matrix }}
steps:
- uses: actions/checkout@v4
name: Checkout override repository
if: ${{inputs.override_repository != ''}}
with:
repository: ${{ inputs.override_repository }}
ref: ${{ inputs.override_ref }}
fetch-depth: 0
submodules: 'true'

- uses: actions/checkout@v4
name: Checkout current repository
if: ${{inputs.override_repository == ''}}
with:
fetch-depth: 0
submodules: 'true'

- uses: actions/checkout@v4
name: Checkout Extension CI tools
with:
path: 'extension-ci-tools'
ref: ${{ inputs.ci_tools_version }}
repository: ${{ inputs.override_ci_tools_repository }}

- name: Checkout DuckDB to version
if: ${{inputs.duckdb_version != ''}}
run: |
DUCKDB_GIT_VERSION=${{ inputs.duckdb_version }} make set_duckdb_version

- name: Tag extension
if: ${{inputs.extension_tag != ''}}
run: |
git tag ${{ inputs.extension_tag }}

- name: Tag DuckDB extension
if: ${{inputs.duckdb_tag != '' && (inputs.duckdb_version == 'main' || inputs.duckdb_version[0] == 'v') }}
run: |
echo "When duckdb_tag is provied an explcit git ref is expected" && exit 1

- name: Tag DuckDB extension
if: ${{inputs.duckdb_tag != ''}}
run: |
DUCKDB_TAG=${{ inputs.duckdb_tag }} make set_duckdb_tag

- id: parse-matrices
run: |
mkdir build
make output_distribution_matrix | tail -n +2 > build/distribution_matrix.json
python3 ${{ inputs.matrix_parse_script }} --input build/distribution_matrix.json --select_os linux --output build/linux_matrix.json --exclude "${{ inputs.exclude_archs }}" --pretty
python3 ${{ inputs.matrix_parse_script }} --input build/distribution_matrix.json --select_os osx --output build/osx_matrix.json --exclude "${{ inputs.exclude_archs }}" --pretty
python3 ${{ inputs.matrix_parse_script }} --input build/distribution_matrix.json --select_os windows --output build/windows_matrix.json --exclude "${{ inputs.exclude_archs }}" --pretty
python3 ${{ inputs.matrix_parse_script }} --input build/distribution_matrix.json --select_os wasm --output build/wasm_matrix.json --exclude "${{ inputs.exclude_archs }}" --pretty
python3 ${{ inputs.matrix_parse_script }} --input extension-ci-tools/config/distribution_matrix.json --select_os linux --output build/linux_matrix.json --exclude "${{ inputs.exclude_archs }}" --pretty
python3 ${{ inputs.matrix_parse_script }} --input extension-ci-tools/config/distribution_matrix.json --select_os osx --output build/osx_matrix.json --exclude "${{ inputs.exclude_archs }}" --pretty
python3 ${{ inputs.matrix_parse_script }} --input extension-ci-tools/config/distribution_matrix.json --select_os windows --output build/windows_matrix.json --exclude "${{ inputs.exclude_archs }}" --pretty
python3 ${{ inputs.matrix_parse_script }} --input extension-ci-tools/config/distribution_matrix.json --select_os wasm --output build/wasm_matrix.json --exclude "${{ inputs.exclude_archs }}" --pretty

- id: set-matrix-linux
run: |
Expand Down Expand Up @@ -283,6 +242,8 @@ jobs:
echo "OPENSSL_DIR=/duckdb_build_dir/build/release/vcpkg_installed/${{ matrix.vcpkg_triplet }}" >> docker_env.txt
echo "OPENSSL_USE_STATIC_LIBS=true" >> docker_env.txt
echo "DUCKDB_PLATFORM=${{ matrix.duckdb_arch }}" >> docker_env.txt
echo "DUCKDB_GIT_VERSION=${{ inputs.duckdb_version }}" >> docker_env.txt
echo "LINUX_CI_IN_DOCKER=1" >> docker_env.txt
echo "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' || '' }}" >> docker_env.txt

- name: Generate timestamp for Ccache entry
Expand All @@ -304,16 +265,37 @@ jobs:
restore-keys: |
ccache-extension-distribution-${{ matrix.duckdb_arch }}-

- name: Build extension
- name: Run configure (outside Docker)
shell: bash
env:
DUCKDB_GIT_VERSION: ${{ inputs.duckdb_version }}
LINUX_CI_IN_DOCKER: 0
run: |
make configure_ci

- name: Run configure (inside Docker)
shell: bash
run: |
docker run --env-file=docker_env.txt -v `pwd`:/duckdb_build_dir -v `pwd`/ccache_dir:/ccache_dir duckdb/${{ matrix.duckdb_arch }} make configure_ci

- name: Build extension (inside Docker)
run: |
docker run --env-file=docker_env.txt -v `pwd`:/duckdb_build_dir -v `pwd`/ccache_dir:/ccache_dir duckdb/${{ matrix.duckdb_arch }} make release

- name: Test extension
- name: Test extension (inside docker)
if: ${{ matrix.duckdb_arch != 'linux_arm64' && inputs.skip_tests == false }}
run: |
docker run --env-file=docker_env.txt -v `pwd`:/duckdb_build_dir -v `pwd`/ccache_dir:/ccache_dir duckdb/${{ matrix.duckdb_arch }} make test
docker run --env-file=docker_env.txt -v `pwd`:/duckdb_build_dir -v `pwd`/ccache_dir:/ccache_dir duckdb/${{ matrix.duckdb_arch }} make test_release

- uses: actions/upload-artifact@v3
- name: Test extension (outside docker)
if: ${{ matrix.duckdb_arch != 'linux_arm64' && inputs.skip_tests == false }}
env:
DUCKDB_GIT_VERSION: ${{ inputs.duckdb_version }}
LINUX_CI_IN_DOCKER: 0
run: |
make test_release

- uses: actions/upload-artifact@v4
with:
name: ${{ inputs.extension_name }}-${{ inputs.duckdb_version }}-extension-${{matrix.duckdb_arch}}${{inputs.artifact_postfix}}
path: |
Expand Down Expand Up @@ -362,7 +344,7 @@ jobs:

- name: Install Ninja
run: |
brew install ninja autoconf make libtool pkg-config automake autoconf-archive
brew install ninja autoconf make libtool automake autoconf-archive

- name: Setup Ccache
uses: hendrikmuhs/ccache-action@main
Expand Down Expand Up @@ -439,26 +421,25 @@ jobs:
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 }}
- name: Run configure
shell: bash
env:
DUCKDB_GIT_VERSION: ${{ inputs.duckdb_version }}
run: |
bash scripts/setup-custom-toolchain.sh
make configure_ci

- name: Build extension
shell: bash
env:
DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }}
run: |
make release

- name: Test Extension
if: ${{ matrix.osx_build_arch == 'arm64' && inputs.skip_tests == false }}
shell: bash
run: |
make test
make test_release

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: ${{ inputs.extension_name }}-${{ inputs.duckdb_version }}-extension-${{matrix.duckdb_arch}}${{inputs.artifact_postfix}}
Expand Down Expand Up @@ -583,29 +564,31 @@ jobs:
vcpkgGitCommitId: ${{ inputs.vcpkg_commit }}
vcpkgGitURL: ${{ inputs.vcpkg_url }}

- name: Run custom toolchain script
if: ${{ inputs.custom_toolchain_script }}
- name: Run configure
shell: bash
env:
DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }}
DUCKDB_PLATFORM_RTOOLS: ${{ matrix.duckdb_arch == 'windows_amd64_rtools' && 1 || 0 }}
DUCKDB_GIT_VERSION: ${{ inputs.duckdb_version }}
run: |
bash scripts/setup-custom-toolchain.sh
make configure_ci

- name: Build extension
if: ${{ inputs.skip_tests == true }}
env:
DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }}
DUCKDB_PLATFORM_RTOOLS: ${{ matrix.duckdb_arch == 'windows_amd64_rtools' && 1 || 0 }}
run: |
make release

- name: Build & test extension
- name: Test extension
if: ${{ inputs.skip_tests == false }}
env:
DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }}
DUCKDB_PLATFORM_RTOOLS: ${{ matrix.duckdb_arch == 'windows_amd64_rtools' && 1 || 0 }}
run: |
make test_release

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: ${{ inputs.extension_name }}-${{ inputs.duckdb_version }}-extension-${{matrix.duckdb_arch}}${{inputs.artifact_postfix}}
Expand Down Expand Up @@ -701,17 +684,18 @@ jobs:
with:
key: ${{ github.job }}-${{ matrix.duckdb_arch }}

- name: Run custom toolchain script
if: ${{ inputs.custom_toolchain_script }}
- name: Run configure
shell: bash
env:
DUCKDB_GIT_VERSION: ${{ inputs.duckdb_version }}
run: |
bash scripts/setup-custom-toolchain.sh
make configure_ci

- name: Build Wasm module
run: |
make ${{ matrix.duckdb_arch }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: ${{ inputs.extension_name }}-${{ inputs.duckdb_version }}-extension-${{matrix.duckdb_arch}}${{inputs.artifact_postfix}}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ DuckDB's [Extension Template](https://github.com/duckdb/extension-template/actio
| v0.10.0 | v0.10.0 | no |

Each branch in this repository targets a specific version of DuckDB. Note that these branches will be continually updated to ensure the build environment is functional for that version of DuckDB.
Also note that at some point, support for versions will be dropped. Currently, we aim to support the latest 2 DuckDB versions, to allow extensions devs to transition to a new DuckDB version.
Also note that at some point, support for versions will be dropped. Currently, we aim to support the latest 2 DuckDB versions, to allow extensions devs to transition to a new DuckDB version.
Loading
Loading