Skip to content

Commit 7f59ba0

Browse files
committed
Renamed binary and configured an OSX release
1 parent 2ad7427 commit 7f59ba0

File tree

8 files changed

+166
-11
lines changed

8 files changed

+166
-11
lines changed

.github/workflows/OnTag.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
inputs:
55
override_git_describe:
66
type: string
7-
push:
8-
tags:
9-
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
# push:
8+
# tags:
9+
# - 'v[0-9]+.[0-9]+.[0-9]+'
1010

1111
jobs:
1212
twine_upload:

.github/workflows/SwiftRelease.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: SwiftRelease
22
on:
33
workflow_dispatch:
44
repository_dispatch:
5-
push:
6-
tags:
7-
- '**'
5+
# push:
6+
# tags:
7+
# - '**'
88

99
env:
1010
SOURCE_REF: ${{ github.event_name == 'release' && github.ref_name || 'main' }}

.github/workflows/iPDbOSX.yml

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
name: iPDbOSX
2+
on:
3+
workflow_call:
4+
inputs:
5+
override_git_describe:
6+
type: string
7+
git_ref:
8+
type: string
9+
skip_tests:
10+
type: string
11+
run_all:
12+
type: string
13+
workflow_dispatch:
14+
inputs:
15+
override_git_describe:
16+
type: string
17+
git_ref:
18+
type: string
19+
skip_tests:
20+
type: string
21+
run_all:
22+
type: string
23+
push:
24+
tags:
25+
- 'v[0-9]+.[0-9]+.[0-9]+'
26+
27+
concurrency:
28+
group: osx-${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}-${{ inputs.override_git_describe }}
29+
cancel-in-progress: true
30+
31+
env:
32+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
33+
OVERRIDE_GIT_DESCRIBE: ${{ inputs.override_git_describe }}
34+
35+
jobs:
36+
xcode-release:
37+
# Builds binaries for osx_arm64 and osx_amd64
38+
name: OSX Release
39+
runs-on: ${{ matrix.os }}
40+
strategy:
41+
matrix:
42+
include:
43+
- os: macos-15-large
44+
arch: x86_64
45+
cmake_args: "-DCMAKE_OSX_ARCHITECTURES=x86_64"
46+
artifact_name: ipdb-macos-x86_64
47+
- os: macos-15-xlarge
48+
arch: arm64
49+
cmake_args: "-DCMAKE_OSX_ARCHITECTURES=arm64"
50+
artifact_name: ipdb-macos-arm64
51+
env:
52+
EXTENSION_CONFIGS: '${GITHUB_WORKSPACE}/.github/config/bundled_extensions.cmake'
53+
ENABLE_EXTENSION_AUTOLOADING: 1
54+
ENABLE_EXTENSION_AUTOINSTALL: 1
55+
GEN: ninja
56+
ENABLE_LLM_API: 1
57+
CMAKE_VARS: ${{ matrix.cmake_args }}
58+
59+
steps:
60+
- uses: actions/checkout@v4
61+
with:
62+
fetch-depth: 0
63+
ref: ${{ inputs.git_ref }}
64+
65+
- uses: actions/setup-python@v5
66+
with:
67+
python-version: '3.12'
68+
69+
- name: Install Ninja
70+
run: brew install ninja
71+
72+
- name: Install OpenSSL
73+
run: brew install openssl
74+
75+
- name: Setup Ccache
76+
uses: hendrikmuhs/ccache-action@main
77+
with:
78+
key: ${{ github.job }}
79+
save: ${{ github.ref == 'refs/heads/main' || github.repository != 'duckdb/ipdb' }}
80+
81+
- name: Install pytest
82+
run: |
83+
python -m pip install pytest
84+
85+
- name: Build
86+
shell: bash
87+
run: |
88+
OPENSSL_PREFIX=$(brew --prefix openssl@3)
89+
export LDFLAGS="-L${OPENSSL_PREFIX}/lib"
90+
export CPPFLAGS="-I${OPENSSL_PREFIX}/include"
91+
export PKG_CONFIG_PATH="${OPENSSL_PREFIX}/lib/pkgconfig"
92+
echo $CMAKE_VARS
93+
make
94+
95+
- name: Print platform
96+
shell: bash
97+
run: ./build/release/ipdb -c "PRAGMA platform;"
98+
99+
# from https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
100+
# - name: Sign Binaries
101+
# shell: bash
102+
# env:
103+
# BUILD_CERTIFICATE_BASE64: ${{ secrets.OSX_CODESIGN_BUILD_CERTIFICATE_BASE64 }}
104+
# P12_PASSWORD: ${{ secrets.OSX_CODESIGN_P12_PASSWORD }}
105+
# KEYCHAIN_PASSWORD: ${{ secrets.OSX_CODESIGN_KEYCHAIN_PASSWORD }}
106+
# run: |
107+
# if [[ "$GITHUB_REPOSITORY" = "duckdb/duckdb" ]] ; then
108+
# . scripts/osx_import_codesign_certificate.sh
109+
110+
# codesign --all-architectures --force --sign "Developer ID Application: Stichting DuckDB Foundation" build/release/duckdb
111+
# codesign --all-architectures --force --sign "Developer ID Application: Stichting DuckDB Foundation" build/release/src/libduckdb*.dylib
112+
# fi
113+
114+
- name: Deploy
115+
shell: bash
116+
env:
117+
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DUCKDB_STAGING_ID }}
118+
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
119+
run: |
120+
python scripts/amalgamation.py
121+
zip -j ${{ matrix.artifact_name }}.zip build/release/ipdb
122+
123+
- uses: actions/upload-artifact@v4
124+
with:
125+
name: ${{ matrix.artifact_name }}
126+
path: |
127+
${{ matrix.artifact_name }}.zip
128+
129+
release:
130+
needs: xcode-release
131+
runs-on: ubuntu-latest
132+
steps:
133+
- name: Download artifacts
134+
uses: actions/download-artifact@v4
135+
with:
136+
path: ./artifacts
137+
138+
- name: Create GitHub Release
139+
uses: softprops/action-gh-release@v1
140+
with:
141+
files: artifacts/*/*.zip
142+
env:
143+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144+

scripts/package_build.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ def third_party_includes():
3030
includes += [os.path.join('third_party', 'mbedtls', 'library')]
3131
includes += [os.path.join('third_party', 'miniz')]
3232
includes += [os.path.join('third_party', 'pcg')]
33+
includes += [os.path.join('third_party', 'predictors', 'common')]
34+
includes += [os.path.join('third_party', 'predictors', 'llm_api', 'include')]
35+
includes += [os.path.join('third_party', 'predictors', 'llama_cpp', 'include')]
36+
includes += [os.path.join('third_party', 'predictors', 'onnx', 'include')]
3337
includes += [os.path.join('third_party', 're2')]
3438
includes += [os.path.join('third_party', 'skiplist')]
3539
includes += [os.path.join('third_party', 'tdigest')]

src/execution/operator/projection/physical_predict.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
#include <iostream>
44
#include <map>
55

6-
#if defined(ENABLE_PREDICT) && PREDICTOR_IMPL == 1
7-
#include "duckdb_torch.hpp"
8-
#elif defined(ENABLE_PREDICT) && PREDICTOR_IMPL == 2
6+
#if defined(ENABLE_PREDICT) && PREDICTOR_IMPL == 2
97
#include "duckdb_onnx.hpp"
108
#elif defined(ENABLE_PREDICT) && PREDICTOR_IMPL == 3
119
#include "duckdb_llama_cpp.hpp"

third_party/predictors/LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2025 ThatUdeshUK
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

third_party/predictors/llm_api/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ endif()
77

88
set(CMAKE_CXX_STANDARD 17)
99

10-
include_directories(include ${DUCKDB_MODULE_BASE_DIR}/third_party/httplib)
10+
find_package(OpenSSL REQUIRED)
11+
12+
include_directories(include ${DUCKDB_MODULE_BASE_DIR}/third_party/httplib ${OPENSSL_INCLUDE_DIR})
1113

1214
if (ENABLE_LLM_API)
1315
add_library(duckdb_llm_api STATIC duckdb_llm_api.cpp https_client.cpp)

tools/shell/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ if(WIN32 AND NOT MINGW)
6262
target_sources(shell PRIVATE rc/duckdb.rc)
6363
endif()
6464

65-
set_target_properties(shell PROPERTIES OUTPUT_NAME duckdb)
65+
set_target_properties(shell PROPERTIES OUTPUT_NAME ipdb)
6666
set_target_properties(shell PROPERTIES RUNTIME_OUTPUT_DIRECTORY
6767
${PROJECT_BINARY_DIR})
6868

0 commit comments

Comments
 (0)