generated from duckdb/extension-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from Maxxen/main
Port forward changes from v0.10.2
- Loading branch information
Showing
26 changed files
with
305 additions
and
201 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# | ||
# This workflow calls the main distribution pipeline from DuckDB to build, test and (optionally) release the extension | ||
# | ||
name: Stable Extension Distribution Pipeline | ||
on: | ||
pull_request: | ||
branches: | ||
- v0.10.2 | ||
paths-ignore: | ||
- '**/README.md' | ||
- 'doc/**' | ||
push: | ||
branches: | ||
- v0.10.2 | ||
paths-ignore: | ||
- '**/README.md' | ||
- 'doc/**' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/v0.10.2' || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
duckdb-stable-build: | ||
name: Build extension binaries | ||
uses: duckdb/extension-ci-tools/.github/workflows/[email protected] | ||
with: | ||
vcpkg_commit: a42af01b72c28a8e1d7b48107b33e4f286a55ef6 | ||
duckdb_version: v0.10.2 | ||
extension_name: vss | ||
|
||
duckdb-stable-deploy: | ||
name: Deploy extension binaries | ||
needs: duckdb-stable-build | ||
uses: duckdb/extension-ci-tools/.github/workflows/[email protected] | ||
secrets: inherit | ||
with: | ||
duckdb_version: v0.10.2 | ||
extension_name: vss | ||
deploy_latest: ${{ startsWith(github.ref, 'refs/heads/v') || github.ref == 'refs/heads/main' }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,138 +1,8 @@ | ||
.PHONY: all clean format debug release duckdb_debug duckdb_release pull update wasm_mvp wasm_eh wasm_threads | ||
|
||
all: release | ||
|
||
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) | ||
PROJ_DIR := $(dir $(MKFILE_PATH)) | ||
|
||
TEST_PATH="/test/unittest" | ||
DUCKDB_PATH="/duckdb" | ||
|
||
# For non-MinGW windows the path is slightly different | ||
ifeq ($(OS),Windows_NT) | ||
ifneq ($(CXX),g++) | ||
TEST_PATH="/test/Release/unittest.exe" | ||
DUCKDB_PATH="/Release/duckdb.exe" | ||
endif | ||
endif | ||
|
||
#### OSX config | ||
OSX_BUILD_FLAG= | ||
ifneq (${OSX_BUILD_ARCH}, "") | ||
OSX_BUILD_FLAG=-DOSX_BUILD_ARCH=${OSX_BUILD_ARCH} | ||
endif | ||
|
||
#### VCPKG config | ||
VCPKG_TOOLCHAIN_PATH?= | ||
ifneq ("${VCPKG_TOOLCHAIN_PATH}", "") | ||
TOOLCHAIN_FLAGS:=${TOOLCHAIN_FLAGS} -DVCPKG_MANIFEST_DIR='${PROJ_DIR}' -DVCPKG_BUILD=1 -DCMAKE_TOOLCHAIN_FILE='${VCPKG_TOOLCHAIN_PATH}' | ||
endif | ||
ifneq ("${VCPKG_TARGET_TRIPLET}", "") | ||
TOOLCHAIN_FLAGS:=${TOOLCHAIN_FLAGS} -DVCPKG_TARGET_TRIPLET='${VCPKG_TARGET_TRIPLET}' | ||
endif | ||
|
||
#### Enable Ninja as generator | ||
ifeq ($(GEN),ninja) | ||
GENERATOR=-G "Ninja" -DFORCE_COLORED_OUTPUT=1 | ||
endif | ||
PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) | ||
|
||
# Configuration of extension | ||
EXT_NAME=vss | ||
EXT_CONFIG=${PROJ_DIR}extension_config.cmake | ||
|
||
#### Configuration for this extension | ||
EXTENSION_NAME=VSS | ||
EXTENSION_FLAGS=\ | ||
-DDUCKDB_EXTENSION_NAMES="vss" \ | ||
-DDUCKDB_EXTENSION_${EXTENSION_NAME}_PATH="$(PROJ_DIR)" \ | ||
-DDUCKDB_EXTENSION_${EXTENSION_NAME}_LOAD_TESTS=1 \ | ||
-DDUCKDB_EXTENSION_${EXTENSION_NAME}_INCLUDE_PATH="$(PROJ_DIR)src/include" \ | ||
-DDUCKDB_EXTENSION_${EXTENSION_NAME}_TEST_PATH="$(PROJ_DIR)test/sql" | ||
|
||
#### Add more of the DuckDB in-tree extensions here that you need (also feel free to remove them when not needed) | ||
EXTRA_EXTENSIONS_FLAG=-DBUILD_EXTENSIONS="tpch" | ||
|
||
BUILD_FLAGS=-DEXTENSION_STATIC_BUILD=1 $(EXTENSION_FLAGS) ${EXTRA_EXTENSIONS_FLAG} $(OSX_BUILD_FLAG) $(TOOLCHAIN_FLAGS) -DDUCKDB_EXPLICIT_PLATFORM='${DUCKDB_PLATFORM}' | ||
CLIENT_FLAGS:= | ||
|
||
#### Main build | ||
# For regular CLI build, we link the vss extension directly into the DuckDB executable | ||
CLIENT_FLAGS=-DDUCKDB_EXTENSION_${EXTENSION_NAME}_SHOULD_LINK=1 | ||
|
||
debug: | ||
mkdir -p build/debug && \ | ||
cmake $(GENERATOR) $(BUILD_FLAGS) $(CLIENT_FLAGS) -DCMAKE_BUILD_TYPE=Debug -S ./duckdb/ -B build/debug && \ | ||
cmake --build build/debug --config Debug | ||
|
||
release: | ||
mkdir -p build/release && \ | ||
cmake $(GENERATOR) $(BUILD_FLAGS) $(CLIENT_FLAGS) -DCMAKE_BUILD_TYPE=Release -S ./duckdb/ -B build/release && \ | ||
cmake --build build/release --config Release | ||
|
||
##### Client build | ||
JS_BUILD_FLAGS=-DBUILD_NODE=1 -DDUCKDB_EXTENSION_${EXTENSION_NAME}_SHOULD_LINK=0 | ||
PY_BUILD_FLAGS=-DBUILD_PYTHON=1 -DDUCKDB_EXTENSION_${EXTENSION_NAME}_SHOULD_LINK=0 | ||
|
||
debug_js: CLIENT_FLAGS=$(JS_BUILD_FLAGS) | ||
debug_js: debug | ||
debug_python: CLIENT_FLAGS=$(PY_BUILD_FLAGS) | ||
debug_python: debug | ||
release_js: CLIENT_FLAGS=$(JS_BUILD_FLAGS) | ||
release_js: release | ||
release_python: CLIENT_FLAGS=$(PY_BUILD_FLAGS) | ||
release_python: release | ||
|
||
# Main tests | ||
test: test_release | ||
test_release: release | ||
./build/release/$(TEST_PATH) "$(PROJ_DIR)test/*" | ||
test_debug: debug | ||
./build/debug/$(TEST_PATH) "$(PROJ_DIR)test/*" | ||
|
||
#### Client tests | ||
DEBUG_EXT_PATH='$(PROJ_DIR)build/debug/extension/vss/vss.duckdb_extension' | ||
RELEASE_EXT_PATH='$(PROJ_DIR)build/release/extension/vss/vss.duckdb_extension' | ||
test_js: test_debug_js | ||
test_debug_js: debug_js | ||
cd duckdb/tools/nodejs && ${EXTENSION_NAME}_EXTENSION_BINARY_PATH=$(DEBUG_EXT_PATH) npm run test-path -- "../../../test/nodejs/**/*.js" | ||
test_release_js: release_js | ||
cd duckdb/tools/nodejs && ${EXTENSION_NAME}_EXTENSION_BINARY_PATH=$(RELEASE_EXT_PATH) npm run test-path -- "../../../test/nodejs/**/*.js" | ||
test_python: test_debug_python | ||
test_debug_python: debug_python | ||
cd test/python && ${EXTENSION_NAME}_EXTENSION_BINARY_PATH=$(DEBUG_EXT_PATH) python3 -m pytest | ||
test_release_python: release_python | ||
cd test/python && ${EXTENSION_NAME}_EXTENSION_BINARY_PATH=$(RELEASE_EXT_PATH) python3 -m pytest | ||
|
||
#### Misc | ||
format: | ||
find src/ -iname *.hpp -o -iname *.cpp | xargs clang-format --sort-includes=0 -style=file -i | ||
cmake-format -i CMakeLists.txt | ||
update: | ||
git submodule update --remote --merge | ||
pull: | ||
git submodule init | ||
git submodule update --recursive --remote | ||
|
||
clean: | ||
rm -rf build | ||
rm -rf testext | ||
cd duckdb && make clean | ||
cd duckdb && make clean-python | ||
|
||
WASM_LINK_TIME_FLAGS= | ||
|
||
wasm_mvp: | ||
mkdir -p build/wasm_mvp | ||
emcmake cmake $(GENERATOR) -DWASM_LOADABLE_EXTENSIONS=1 -DBUILD_EXTENSIONS_ONLY=1 -Bbuild/wasm_mvp -DCMAKE_CXX_FLAGS="-DDUCKDB_CUSTOM_PLATFORM=wasm_mvp" -DSKIP_EXTENSIONS="parquet" -S duckdb $(TOOLCHAIN_FLAGS) $(EXTENSION_FLAGS) -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$(EMSDK)/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DDUCKDB_EXPLICIT_PLATFORM='${DUCKDB_PLATFORM}' | ||
emmake make -j8 -Cbuild/wasm_mvp | ||
cd build/wasm_mvp/extension/${EXT_NAME} && emcc $f -sSIDE_MODULE=1 -o ../../${EXT_NAME}.duckdb_extension.wasm -O3 ${EXT_NAME}.duckdb_extension.wasm $(WASM_LINK_TIME_FLAGS) | ||
|
||
wasm_eh: | ||
mkdir -p build/wasm_eh | ||
emcmake cmake $(GENERATOR) -DWASM_LOADABLE_EXTENSIONS=1 -DBUILD_EXTENSIONS_ONLY=1 -Bbuild/wasm_eh -DCMAKE_CXX_FLAGS="-fwasm-exceptions -DWEBDB_FAST_EXCEPTIONS=1 -DDUCKDB_CUSTOM_PLATFORM=wasm_eh" -DSKIP_EXTENSIONS="parquet" -S duckdb $(TOOLCHAIN_FLAGS) $(EXTENSION_FLAGS) -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$(EMSDK)/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DDUCKDB_EXPLICIT_PLATFORM='${DUCKDB_PLATFORM}' | ||
emmake make -j8 -Cbuild/wasm_eh | ||
cd build/wasm_eh/extension/${EXT_NAME} && emcc $f -sSIDE_MODULE=1 -o ../../${EXT_NAME}.duckdb_extension.wasm -O3 ${EXT_NAME}.duckdb_extension.wasm $(WASM_LINK_TIME_FLAGS) | ||
|
||
wasm_threads: | ||
mkdir -p ./build/wasm_threads | ||
emcmake cmake $(GENERATOR) -DWASM_LOADABLE_EXTENSIONS=1 -DBUILD_EXTENSIONS_ONLY=1 -Bbuild/wasm_threads -DCMAKE_CXX_FLAGS="-fwasm-exceptions -DWEBDB_FAST_EXCEPTIONS=1 -DWITH_WASM_THREADS=1 -DWITH_WASM_SIMD=1 -DWITH_WASM_BULK_MEMORY=1 -DDUCKDB_CUSTOM_PLATFORM=wasm_threads" -DSKIP_EXTENSIONS="parquet" -S duckdb $(TOOLCHAIN_FLAGS) $(EXTENSION_FLAGS) -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$(EMSDK)/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DDUCKDB_EXPLICIT_PLATFORM='${DUCKDB_PLATFORM}' | ||
emmake make -j8 -Cbuild/wasm_threads | ||
cd build/wasm_threads/extension/${EXT_NAME} && emcc $f -sSIDE_MODULE=1 -o ../../${EXT_NAME}.duckdb_extension.wasm -O3 ${EXT_NAME}.duckdb_extension.wasm $(WASM_LINK_TIME_FLAGS) | ||
# Include the Makefile from extension-ci-tools | ||
include extension-ci-tools/makefiles/duckdb_extension.Makefile |
Submodule duckdb
updated
1028 files
Submodule extension-ci-tools
added at
54facf
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This file is included by DuckDB's build system. It specifies which extension to load | ||
|
||
# Extension from this repo | ||
duckdb_extension_load(vss | ||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} | ||
LOAD_TESTS | ||
) | ||
|
||
# Any extra extensions that should be built | ||
# e.g.: duckdb_extension_load(json) |
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
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
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
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
Oops, something went wrong.