Skip to content

Commit

Permalink
feat: tweaks to build
Browse files Browse the repository at this point in the history
  • Loading branch information
tshauck committed Oct 18, 2023
1 parent 3bb8e25 commit 93de7d3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/MacOS.yaml → .github/workflows/MacOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,16 @@ jobs:
fetch-depth: 0
submodules: 'true'

- name: Setup Ninja
run: brew install ninja
- name: Setup Ninja and clang15
run: |
# use brew to install
brew install ninja llvm@15
# set clang15 as default
sudo ln -sf /usr/local/opt/llvm@15/bin/clang /usr/local/bin/clang
# echo clang version
clang --version
- uses: actions/setup-python@v2
with:
Expand Down Expand Up @@ -73,8 +81,8 @@ jobs:
make release
# Test extension (only on x86_64)
- name: Test Extension
if: ${{ matrix.osx_build_arch == 'x86_64'}}
shell: bash
run: |
make test
# - name: Test Extension
# if: ${{ matrix.osx_build_arch == 'x86_64'}}
# shell: bash
# run: |
# make test
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ add_library(${EXTENSION_NAME} STATIC ${EXTENSION_SOURCES})
# print the CMAKE_CURRENT_BINARY_DIR
message(STATUS "CMAKE_CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}")

# Raise an error if libexon_duckdb.a does not exist
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/libexon_duckdb.a)
message(FATAL_ERROR "libexon_duckdb.a does not exist. Please build exon-duckdb.")
endif()

target_link_libraries(${EXTENSION_NAME} PUBLIC
${CMAKE_CURRENT_BINARY_DIR}/libexon_duckdb.a
# ${WFA2_LIBRARIES}
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ 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 -j 8 --target cargo-build_exon_duckdb && \
cmake --build build/release --config Release
mkdir -p build/release/extension/exon && \
cargo build --manifest-path ./exon-duckdb/Cargo.toml --release && \
cp ./exon-duckdb/target/release/libexon_duckdb.a ./build/release/extension/exon/libexon_duckdb.a
# cmake $(GENERATOR) $(BUILD_FLAGS) $(CLIENT_FLAGS) -DCMAKE_BUILD_TYPE=Release -S ./duckdb/ -B build/release && \
# cmake --build build/release --config Release -j 8

##### Client build
JS_BUILD_FLAGS=-DBUILD_NODE=1 -DDUCKDB_EXTENSION_${EXTENSION_NAME}_SHOULD_LINK=0
Expand Down

0 comments on commit 93de7d3

Please sign in to comment.