Skip to content

Commit 4c3a838

Browse files
committed
update duckdb
1 parent dd415bb commit 4c3a838

File tree

5,467 files changed

+643605
-591340
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,467 files changed

+643605
-591340
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
BasedOnStyle: LLVM
3+
SortIncludes: false
34
TabWidth: 4
45
IndentWidth: 4
56
ColumnLimit: 120

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.test linguist-language=sql

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,25 @@ body:
1616
* [duckdb-odbc](https://github.com/duckdb/duckdb-odbc/issues/new)
1717
* [duckdb-r](https://github.com/duckdb/duckdb-r/issues/new)
1818
* [duckdb-rs](https://github.com/duckdb/duckdb-rs/issues/new)
19+
* [duckdb-swift](https://github.com/duckdb/duckdb-swift/issues/new)
1920
* [duckdb-wasm](https://github.com/duckdb/duckdb-wasm/issues/new)
2021
* [go-duckdb](https://github.com/marcboeker/go-duckdb/issues/new)
2122
* Extensions:
22-
* [Arrow extension](https://github.com/duckdb/arrow/issues/new)
23-
* [AWS extension](https://github.com/duckdb/duckdb_aws/issues/new)
24-
* [Azure extension](https://github.com/duckdb/duckdb_azure/issues/new)
25-
* [Delta extension](https://github.com/duckdb/duckdb_delta/issues/new)
26-
* [Iceberg extension](https://github.com/duckdb/duckdb_iceberg/issues/new)
27-
* [MySQL extension](https://github.com/duckdb/duckdb_mysql/issues/new)
28-
* [Postgres scanner](https://github.com/duckdb/postgres_scanner/issues/new)
29-
* [Spatial extension](https://github.com/duckdb/duckdb_spatial/issues/new)
30-
* [SQLite scanner](https://github.com/duckdb/sqlite_scanner/issues/new)
31-
* [VSS extension](https://github.com/duckdb/duckdb_vss/issues/new)
23+
* [AWS extension](https://github.com/duckdb/duckdb-aws/issues/new)
24+
* [Azure extension](https://github.com/duckdb/duckdb-azure/issues/new)
25+
* [Delta extension](https://github.com/duckdb/duckdb-delta/issues/new)
26+
* [Encodings extension](https://github.com/duckdb/duckdb-encodings/issues/new)
27+
* [Excel extension](https://github.com/duckdb/duckdb-excel/issues/new)
28+
* [fts (full text search) extension](https://github.com/duckdb/duckdb-fts/issues/new)
29+
* [httpfs extension](https://github.com/duckdb/duckdb-httpfs/issues/new)
30+
* [Iceberg extension](https://github.com/duckdb/duckdb-iceberg/issues/new)
31+
* [inet extension](https://github.com/duckdb/duckdb-inet/issues/new)
32+
* [MySQL extension](https://github.com/duckdb/duckdb-mysql/issues/new)
33+
* [Postgres scanner](https://github.com/duckdb/duckdb-postgres/issues/new)
34+
* [Spatial extension](https://github.com/duckdb/duckdb-spatial/issues/new)
35+
* [SQLite scanner](https://github.com/duckdb/duckdb-sqlite/issues/new)
36+
* [UI](https://github.com/duckdb/duckdb-ui/issues/new)
37+
* [VSS extension](https://github.com/duckdb/duckdb-vss/issues/new)
3238
* Connectors:
3339
* [dbt-duckdb](https://github.com/duckdb/dbt-duckdb)
3440

.github/actions/build_extensions/action.yml

Lines changed: 33 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ inputs:
44
# Test config
55
run_tests:
66
description: 'Run extension tests after build'
7-
default: 1
7+
default: '1'
88
run_autoload_tests:
99
description: 'Runs the autoloading tests'
10-
default: 1
10+
default: '1'
1111

1212
# Deploy config
1313
deploy_as:
14-
description: 'Binary architecture name for deploy step'
14+
description: 'Binary architecture name for deploy step - DEPRECATED'
1515
default: ''
1616
deploy_version:
1717
description: 'Version tag or commit short hash for deploy step'
@@ -32,19 +32,19 @@ inputs:
3232
default: ''
3333
static_link_build:
3434
description: 'Links DuckDB statically to the loadable extensions'
35-
default: 1
35+
default: '1'
3636
no_static_linking:
3737
description: 'Disables linking extensions into DuckDB for testing'
38-
default: 0
38+
default: '0'
3939
vcpkg_build:
4040
description: 'Installs vcpkg and pass its toolchain to CMakes'
41-
default: 1
41+
default: '1'
4242
build_dir:
4343
description: 'DuckDB source directory to run the build in'
4444
default: '.'
4545
ninja:
4646
description: 'Use ninja for building'
47-
default: 0
47+
default: '0'
4848
openssl_path:
4949
description: 'Directory of OpenSSL installation'
5050
default: ''
@@ -53,22 +53,28 @@ inputs:
5353
default: ''
5454
treat_warn_as_error:
5555
description: 'Treat compilation warnings as errors'
56-
default: 1
56+
default: '1'
5757
build_in_tree_extensions:
5858
description: 'Build in-tree extensions'
59-
default: 1
59+
default: '1'
6060
build_out_of_tree_extensions:
6161
description: 'Build out-of-tree extensions'
62-
default: 1
62+
default: '1'
63+
build_complete_extensions_set:
64+
description: 'Whether all extensions needs to be built'
65+
default: '1'
66+
bundle_static_lib_mode:
67+
description: 'Build the default bundled extensions to publish the static libs'
68+
default: '0'
6369
osx_universal:
6470
description: 'Build Universal Binary for OSX'
65-
default: 0
71+
default: '0'
6672
osx_arch:
6773
description: 'Build specific architecture for OSX'
6874
default: ''
6975
aarch64_cross_compile:
7076
description: 'Enable Linux aarch64 cross-compiling'
71-
default: 0
77+
default: '0'
7278
vcpkg_target_triplet:
7379
description: 'Target triplet for installing vcpkg dependencies'
7480
default: ''
@@ -91,22 +97,24 @@ runs:
9197
- name: Setup DuckDB extension build config
9298
shell: bash
9399
run: |
100+
export EXTENSION_CONFIGS="$EXTENSION_CONFIGS;${{ inputs.bundle_static_lib_mode == 1 && '.github/config/bundled_extensions.cmake' || ''}}"
94101
export EXTENSION_CONFIGS="$EXTENSION_CONFIGS;${{ inputs.build_in_tree_extensions == 1 && '.github/config/in_tree_extensions.cmake' || ''}}"
95102
export EXTENSION_CONFIGS="$EXTENSION_CONFIGS;${{ inputs.build_out_of_tree_extensions == 1 && '.github/config/out_of_tree_extensions.cmake' || '' }}"
96103
echo "EXTENSION_CONFIGS=$EXTENSION_CONFIGS" >> $GITHUB_ENV
97104
98105
- name: Setup vcpkg
99-
if: inputs.vcpkg_build == 1
106+
if: ${{ inputs.vcpkg_build == 1 }}
100107
uses: lukka/run-vcpkg@v11.1
101108
with:
102-
vcpkgGitCommitId: a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6
109+
vcpkgGitCommitId: ce613c41372b23b1f51333815feb3edd87ef8a8b
103110

104111
- name: Set vcpkg env variables
105-
if: inputs.vcpkg_build == 1
112+
if: ${{ inputs.vcpkg_build == 1 }}
106113
shell: bash
107114
run: |
108115
echo "VCPKG_TOOLCHAIN_PATH=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" >> $GITHUB_ENV
109116
echo "VCPKG_TARGET_TRIPLET=${{ inputs.vcpkg_target_triplet }}" >> $GITHUB_ENV
117+
echo "BUILD_COMPLETE_EXTENSION_SET=${{ inputs.build_complete_extensions_set }}" >> docker_env.txt
110118
111119
- name: workaround for https://github.com/duckdb/duckdb/issues/8360
112120
if: inputs.vcpkg_target_triplet == 'x64-windows-static-md'
@@ -126,7 +134,7 @@ runs:
126134
echo "OPENSSL_ROOT_DIR=${{ inputs.openssl_path }}" >> $GITHUB_ENV
127135
128136
- name: Create combined vcpkg manifest
129-
if: inputs.vcpkg_build == 1 && inputs.build_out_of_tree_extensions == 1
137+
if: ${{ inputs.vcpkg_build == '1' && inputs.build_out_of_tree_extensions == '1' }}
130138
shell: bash
131139
run: |
132140
make extension_configuration
@@ -146,6 +154,7 @@ runs:
146154
LOCAL_EXTENSION_REPO: ${{ inputs.run_autoload_tests == 1 && github.workspace || ''}}
147155
GEN: ${{ inputs.ninja == 1 && 'ninja' || '' }}
148156
USE_MERGED_VCPKG_MANIFEST: 1
157+
# TODO we should no longer override this but we should probably check that it is what we expect
149158
DUCKDB_PLATFORM: ${{ inputs.duckdb_arch }}
150159
CMAKE_VARS_BUILD: ${{ inputs.cmake_flags }}
151160

@@ -165,7 +174,7 @@ runs:
165174
# - statically linked extensions are disable on startup but a sqlogictest require will call their load function
166175
# - loadable-only extensions have their loadable extension loaded with the LOAD statement on a sqlogictest require
167176
- name: Test statically linked extensions
168-
if: ${{ inputs.run_tests == 1 && inputs.no_static_linking == 0}}
177+
if: ${{ inputs.run_tests == '1' && inputs.no_static_linking == '0' }}
169178
shell: bash
170179
run: |
171180
${{ inputs.unittest_script }}
@@ -175,19 +184,19 @@ runs:
175184
shell: bash
176185
run: |
177186
ls
178-
cd ${{ inputs.build_dir}}
187+
cd ${{ inputs.build_dir }}
179188
${{ inputs.post_install }}
180189
181190
# The reason we need to rebuild is we need to test auto-loading extensions: this is only possible without the other
182191
# extensions linked
183192
- name: Rebuild DuckDB without any extensions, but with all extension tests
184-
if: ${{ inputs.run_autoload_tests == 1 }}
193+
if: ${{ inputs.run_autoload_tests == '1' }}
185194
shell: bash
186195
env:
187196
EXTENSION_TESTS_ONLY: 1
188197
ENABLE_EXTENSION_AUTOLOADING: 1
189198
ENABLE_EXTENSION_AUTOINSTALL: 1
190-
GEN: ${{ inputs.ninja == 1 && 'ninja' || '' }}
199+
GEN: ${{ inputs.ninja == '1' && 'ninja' || '' }}
191200
USE_MERGED_VCPKG_MANIFEST: 1
192201
run: |
193202
cd ${{ inputs.build_dir}}
@@ -198,10 +207,11 @@ runs:
198207
199208
# Run all unittests (including the out-of-tree tests) without any extensions linked, relying on the autoloader
200209
- name: Run tests with auto loading
201-
if: ${{ inputs.run_autoload_tests == 1 }}
210+
if: ${{ inputs.run_autoload_tests == '1' }}
202211
shell: bash
203212
env:
204-
LOCAL_EXTENSION_REPO: ${{ inputs.run_autoload_tests == 1 && github.workspace || ''}}
213+
LOCAL_EXTENSION_REPO: ${{ inputs.run_autoload_tests == '1' && github.workspace || ''}}
214+
DUCKDB_TEST_DESCRIPTION: 'Extension autoloading tests. All `require` calls are ignored and auto-loading is tested. Use require no_extension_autoloading in the test to skip tests.'
205215
run: |
206216
cd ${{ inputs.build_dir}}
207217
python3 scripts/get_test_list.py --file-contains 'require ' --list '"*.test"' > test.list
@@ -213,35 +223,5 @@ runs:
213223
- name: Deploy
214224
if: ${{ inputs.deploy_as != '' }}
215225
shell: bash
216-
env:
217-
AWS_ACCESS_KEY_ID: ${{ inputs.s3_id }}
218-
AWS_SECRET_ACCESS_KEY: ${{ inputs.s3_key }}
219-
DUCKDB_EXTENSION_SIGNING_PK: ${{ inputs.signing_pk }}
220-
AWS_DEFAULT_REGION: us-east-1
221-
DUCKDB_DEPLOY_SCRIPT_MODE: for_real
222-
run: |
223-
cd ${{ inputs.build_dir}}
224-
if [[ "$GITHUB_REPOSITORY" = "duckdb/duckdb" ]] ; then
225-
if [[ ! -z "${{ inputs.deploy_version }}" ]] ; then
226-
./scripts/extension-upload-all.sh ${{ inputs.deploy_as }} ${{ inputs.deploy_version }}
227-
elif [[ "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then
228-
./scripts/extension-upload-all.sh ${{ inputs.deploy_as }} ${{ github.ref_name }}
229-
elif [[ "$GITHUB_REF" =~ ^(refs/heads/main)$ ]] ; then
230-
./scripts/extension-upload-all.sh ${{ inputs.deploy_as }} `git log -1 --format=%h`
231-
fi
232-
fi
233-
234-
# Run the unittests (excluding the out-of-tree tests) with the extensions that we deployed to S3
235-
- name: Test deployed extensions
236-
if: ${{ inputs.run_tests == 1 }}
237-
shell: bash
238-
env:
239-
AWS_ACCESS_KEY_ID: ${{ inputs.s3_id }}
240-
AWS_SECRET_ACCESS_KEY: ${{ inputs.s3_key }}
241-
AWS_DEFAULT_REGION: us-east-1
242226
run: |
243-
rm -rf ~/.duckdb
244-
cd ${{ inputs.build_dir}}
245-
if [[ "$GITHUB_REF" =~ ^(refs/heads/main|refs/tags/v.+)$ && "$GITHUB_REPOSITORY" = "duckdb/duckdb" ]] ; then
246-
./scripts/extension-upload-test.sh
247-
fi
227+
exit 1
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: "Build Extensions using Docker"
2+
description: "Build and test the DuckDB extensions"
3+
inputs:
4+
# Build config
5+
run_tests:
6+
description: 'Run extension tests after build'
7+
default: 'true'
8+
duckdb_arch:
9+
description: 'Provide DUCKDB_PLATFORM to build system for cross compilation'
10+
default: ''
11+
vcpkg_target_triplet:
12+
description: 'Target triplet for installing vcpkg dependencies'
13+
default: ''
14+
override_git_describe:
15+
description: 'Override git describe'
16+
default: ''
17+
build_complete_extensions_set:
18+
description: 'Whether all extensions needs to be built'
19+
default: '1'
20+
save_cache:
21+
description: 'Should cache be saved'
22+
default: '1'
23+
24+
runs:
25+
using: "composite"
26+
steps:
27+
- uses: actions/checkout@v4
28+
with:
29+
path: 'duckdb'
30+
fetch-depth: 0
31+
ref: ${{ inputs.git_ref }}
32+
33+
- uses: actions/checkout@v4
34+
name: Checkout Extension CI tools
35+
with:
36+
path: 'extension-ci-tools'
37+
ref: 'main'
38+
repository: 'duckdb/extension-ci-tools'
39+
fetch-depth: 0
40+
41+
- name: Populate composed extension
42+
shell: bash
43+
run: |
44+
cat duckdb/.github/config/in_tree_extensions.cmake duckdb/.github/config/out_of_tree_extensions.cmake > extension_config.cmake
45+
echo "{\"dependencies\": []}" > vcpkg.json
46+
cp duckdb/.github/helper_makefile/build_all_extensions Makefile
47+
48+
- name: Build Docker image
49+
shell: bash
50+
run: |
51+
docker build \
52+
--build-arg 'vcpkg_url=https://github.com/microsoft/vcpkg.git' \
53+
--build-arg 'vcpkg_commit=ce613c41372b23b1f51333815feb3edd87ef8a8b' \
54+
--build-arg 'extra_toolchains=;python3;' \
55+
-t duckdb/${{ inputs.duckdb_arch }} \
56+
./extension-ci-tools/docker/${{ inputs.duckdb_arch }}
57+
58+
- name: Create env file for docker
59+
shell: bash
60+
run: |
61+
touch docker_env.txt
62+
echo "VCPKG_TARGET_TRIPLET=${{ inputs.vcpkg_target_triplet }}" >> docker_env.txt
63+
echo "BUILD_SHELL=1" >> docker_env.txt
64+
echo "OPENSSL_ROOT_DIR=/duckdb_build_dir/build/release/vcpkg_installed/${{ inputs.vcpkg_target_triplet }}" >> docker_env.txt
65+
echo "OPENSSL_DIR=/duckdb_build_dir/build/release/vcpkg_installed/${{ inputs.vcpkg_target_triplet }}" >> docker_env.txt
66+
echo "OPENSSL_USE_STATIC_LIBS=true" >> docker_env.txt
67+
# TODO this should also turn into a check
68+
echo "DUCKDB_PLATFORM=${{ inputs.duckdb_arch }}" >> docker_env.txt
69+
echo "OVERRIDE_GIT_DESCRIBE=${{ inputs.override_git_describe }}" >> docker_env.txt
70+
echo "LINUX_CI_IN_DOCKER=1" >> docker_env.txt
71+
echo "BUILD_COMPLETE_EXTENSION_SET=${{ inputs.build_complete_extensions_set }}" >> docker_env.txt
72+
73+
- name: Generate timestamp for Ccache entry
74+
shell: bash
75+
id: ccache_timestamp
76+
run: |
77+
date --utc +'timestamp=%Y-%m-%d-%H;%M;%S' >> "$GITHUB_OUTPUT"
78+
79+
- name: Create Ccache directory
80+
shell: bash
81+
run: |
82+
mkdir ccache_dir
83+
84+
- name: Load Ccache
85+
uses: actions/cache/restore@v4
86+
with:
87+
path: ./ccache_dir
88+
key: ccache-extension-distribution-${{ inputs.duckdb_arch }}-${{ steps.ccache_timestamp.outputs.timestamp }}
89+
restore-keys: |
90+
ccache-extension-distribution-${{ inputs.duckdb_arch }}-
91+
92+
- name: Run configure (inside Docker)
93+
shell: bash
94+
run: |
95+
docker run --env-file=docker_env.txt -v `pwd`:/duckdb_build_dir -v `pwd`/ccache_dir:/ccache_dir duckdb/${{ inputs.duckdb_arch }} make configure_ci
96+
97+
- name: Build extension (inside Docker)
98+
shell: bash
99+
run: |
100+
docker run --env-file=docker_env.txt -v `pwd`:/duckdb_build_dir -v `pwd`/ccache_dir:/ccache_dir duckdb/${{ inputs.duckdb_arch }} make release
101+
102+
- name: Save Ccache
103+
if: ${{ inputs.save_cache == '1' }}
104+
uses: actions/cache/save@v4
105+
with:
106+
path: ./ccache_dir
107+
key: ccache-extension-distribution-${{ inputs.duckdb_arch }}-${{ steps.ccache_timestamp.outputs.timestamp }}
108+
109+
- name: Test extension (inside docker)
110+
shell: bash
111+
if: ${{ inputs.run_tests == 'true' && inputs.duckdb_arch != 'linux_arm64'}}
112+
run: |
113+
docker run --env-file=docker_env.txt -v `pwd`:/duckdb_build_dir -v `pwd`/ccache_dir:/ccache_dir duckdb/${{ inputs.duckdb_arch }} make test_release

0 commit comments

Comments
 (0)