Skip to content

Commit

Permalink
stage
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani committed Nov 23, 2024
1 parent 01690db commit da9df57
Show file tree
Hide file tree
Showing 14 changed files with 172 additions and 620 deletions.
178 changes: 0 additions & 178 deletions .github/workflows/ExtensionTemplate.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/MainDistributionPipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
with:
duckdb_version: main
ci_tools_version: main
extension_name: quack
extension_name: wvlet

duckdb-stable-build:
name: Build extension binaries
uses: duckdb/extension-ci-tools/.github/workflows/[email protected]
with:
duckdb_version: v1.1.3
ci_tools_version: v1.1.3
extension_name: quack
extension_name: wvlet

duckdb-stable-deploy:
name: Deploy extension binaries
Expand All @@ -35,5 +35,5 @@ jobs:
secrets: inherit
with:
duckdb_version: v1.1.3
extension_name: quack
extension_name: wvlet
deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
32 changes: 28 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,51 @@
cmake_minimum_required(VERSION 3.5)

# Set extension name here
set(TARGET_NAME quack)
set(TARGET_NAME wvlet)

# DuckDB's extension distribution supports vcpkg. As such, dependencies can be added in ./vcpkg.json and then
# used in cmake with find_package. Feel free to remove or replace with other dependencies.
# Note that it should also be removed from vcpkg.json to prevent needlessly installing it..
find_package(OpenSSL REQUIRED)

# Define wvlet library details
set(WVLET_LIB_URL "https://github.com/quackmagic/wvlet-lib/releases/download/v2024.9.12/libwvlet_linux-x64.so")
set(WVLET_LIB_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third-party/libwvlet_linux-x64.so")

# Download wvlet library if it doesn't exist
if(NOT EXISTS ${WVLET_LIB_PATH})
message(STATUS "Downloading wvlet library from ${WVLET_LIB_URL}")
# Create third-party directory if it doesn't exist
file(MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/third-party")
# Download the file
file(DOWNLOAD
${WVLET_LIB_URL}
${WVLET_LIB_PATH}
SHOW_PROGRESS
STATUS DOWNLOAD_STATUS
TLS_VERIFY ON)

list(GET DOWNLOAD_STATUS 0 STATUS_CODE)
if(NOT STATUS_CODE EQUAL 0)
message(FATAL_ERROR "Failed to download wvlet library")
endif()

endif()

set(EXTENSION_NAME ${TARGET_NAME}_extension)
set(LOADABLE_EXTENSION_NAME ${TARGET_NAME}_loadable_extension)

project(${TARGET_NAME})
include_directories(src/include)

set(EXTENSION_SOURCES src/quack_extension.cpp)
set(EXTENSION_SOURCES src/wvlet_extension.cpp)

build_static_extension(${TARGET_NAME} ${EXTENSION_SOURCES})
build_loadable_extension(${TARGET_NAME} " " ${EXTENSION_SOURCES})

# Link OpenSSL in both the static library as the loadable extension
target_link_libraries(${EXTENSION_NAME} OpenSSL::SSL OpenSSL::Crypto)
target_link_libraries(${LOADABLE_EXTENSION_NAME} OpenSSL::SSL OpenSSL::Crypto)
target_link_libraries(${EXTENSION_NAME} OpenSSL::SSL OpenSSL::Crypto ${WVLET_LIB_PATH})
target_link_libraries(${LOADABLE_EXTENSION_NAME} OpenSSL::SSL OpenSSL::Crypto ${WVLET_LIB_PATH})

install(
TARGETS ${EXTENSION_NAME}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))

# Configuration of extension
EXT_NAME=quack
EXT_NAME=wvlet
EXT_CONFIG=${PROJ_DIR}extension_config.cmake

# Include the Makefile from extension-ci-tools
Expand Down
86 changes: 0 additions & 86 deletions docs/NEXT_README.md

This file was deleted.

Loading

0 comments on commit da9df57

Please sign in to comment.