Skip to content

Commit bd3a5f7

Browse files
authored
Update build workflow for new DuckDB release (v1.5.3) (#22)
1 parent da3e487 commit bd3a5f7

18 files changed

Lines changed: 507 additions & 81 deletions

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ trim_trailing_whitespace = false
2020
[*.sh]
2121
indent_size = 2
2222

23-
[*.{yaml,yml}]
23+
[*.{yaml,yml,json}]
2424
indent_size = 2
2525

2626
[*.{c,cpp,h,hpp}]

.github/workflows/dist_pipeline.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,34 +34,34 @@ jobs:
3434
exclude_archs: "windows_amd64_mingw;osx_amd64;wasm_mvp;wasm_eh;wasm_threads"
3535

3636
duckdb-stable-build:
37-
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@v1.5.2
37+
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@v1.5.3
3838
with:
39-
duckdb_version: v1.5.2
40-
ci_tools_version: v1.5.2
39+
duckdb_version: v1.5.3
40+
ci_tools_version: v1.5.3
4141
extension_name: infera
4242
enable_rust: true
4343
exclude_archs: "windows_amd64_mingw;osx_amd64;wasm_mvp;wasm_eh;wasm_threads"
4444

4545
create-release-draft:
46-
name: Create Draft Release with Built Binaries
46+
name: Create draft release with built binaries
4747
needs:
4848
- duckdb-stable-build
4949
if: startsWith(github.ref, 'refs/tags/')
5050
runs-on: ubuntu-latest
5151
permissions:
5252
contents: write
5353
steps:
54-
- name: Download All Build Artifacts
54+
- name: Download all build artifacts
5555
uses: actions/download-artifact@v4
5656
with:
5757
path: dist
5858
merge-multiple: true
59-
- name: List Artifacts
59+
- name: List artifacts
6060
run: |
6161
echo "Downloaded artifacts to: $(pwd)/dist"
6262
ls -la dist || true
6363
find dist -type f -maxdepth 2 -print || true
64-
- name: Create Draft Release and Upload Assets
64+
- name: Create draft release and upload assets
6565
uses: softprops/action-gh-release@v2
6666
with:
6767
draft: true

.github/workflows/lints.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ jobs:
1717
runs-on: ubuntu-latest
1818

1919
steps:
20-
- name: Checkout Code
20+
- name: Checkout code
2121
uses: actions/checkout@v4
2222
with:
2323
submodules: recursive
2424

2525
- name: Set up Rust
2626
uses: actions-rust-lang/setup-rust-toolchain@v1
2727

28-
- name: Install Dependencies
28+
- name: Install dependencies
2929
run: |
3030
sudo apt-get update && sudo apt-get upgrade -y
3131
sudo apt-get install -y gcc curl pkg-config libssl-dev make
3232
33-
- name: Run Linters
33+
- name: Run linters
3434
run: make rust-lint

.github/workflows/tests.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@ on:
1111
push:
1212
branches:
1313
- main
14+
- develop
1415

1516
permissions:
1617
contents: read
1718

1819
jobs:
1920
rust-tests:
20-
name: Rust Tests and Code Coverage
21+
name: Rust tests and code coverage
2122
runs-on: ubuntu-latest
2223
env:
2324
CARGO_TERM_COLOR: always
2425
steps:
25-
- name: Checkout Code
26+
- name: Checkout code
2627
uses: actions/checkout@v4
2728
with:
2829
submodules: recursive
@@ -41,44 +42,44 @@ jobs:
4142
restore-keys: |
4243
${{ runner.os }}-cargo-
4344
44-
- name: Install System Dependencies
45+
- name: Install system dependencies
4546
run: |
4647
sudo apt-get update
4748
sudo apt-get install -y gcc curl pkg-config libssl-dev make
4849
cargo install cargo-tarpaulin --locked || true
4950
50-
- name: Run Rust Tests
51+
- name: Run Rust tests
5152
run: |
5253
make rust-test
5354
54-
- name: Generate Coverage (using Tarpaulin)
55+
- name: Generate coverage (using Tarpaulin)
5556
run: |
5657
make rust-coverage
5758
58-
- name: Upload Coverage Reports to Codecov
59+
- name: Upload coverage reports to Codecov
5960
uses: codecov/codecov-action@v5
6061
with:
6162
token: ${{ secrets.CODECOV_TOKEN }}
6263
continue-on-error: false
6364

6465
sqllogictest:
65-
name: Sqllogicest Tests
66+
name: Sqllogicest tests
6667
runs-on: ubuntu-latest
6768
steps:
68-
- name: Checkout Code
69+
- name: Checkout code
6970
uses: actions/checkout@v4
7071
with:
7172
submodules: recursive
7273

7374
- name: Set up Rust
7475
uses: actions-rust-lang/setup-rust-toolchain@v1
7576

76-
- name: Install System Dependencies
77+
- name: Install system dependencies
7778
run: |
7879
sudo apt-get update
7980
sudo apt-get install -y gcc curl pkg-config libssl-dev make
8081
81-
- name: Build Extension & Run SQL Tests
82+
- name: Build extension and run SQL tests
8283
run: |
8384
make release
8485
make test

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,5 @@ tests/temp_models/
9797
*.cast
9898
.claude/
9999
.codex
100+
.antigravitycli/
101+
.agents/

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@AGENTS.md

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.5)
22

33
set(CORROSION_VERBOSE_OUTPUT ON)
4-
set(CMAKE_CXX_STANDARD 11)
4+
set(CMAKE_CXX_STANDARD 17)
55
set(CMAKE_CXX_STANDARD_REQUIRED 1)
66

77
option(INFERA_ENABLE_ONNX "Enable ONNX (tract) inference backend in Rust crate" ON)

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ would like to work on or if it has already been resolved.
2929
3030
### Development Workflow
3131

32+
> [!IMPORTANT]
33+
> If you're using an AI-assisted coding tool like Claude Code or Codex, make sure the AI follows the instructions in the [AGENTS.md](AGENTS.md) file.
34+
3235
#### Code Style
3336

3437
- Use the `make rust-format` command to format the code.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ make release
9696
#### Trying Infera
9797

9898
```sql
99-
-- 0. Install and load Infera
99+
-- 0. Install and load Infera
100100
-- Skip this step if you built from source and ran `./build/release/duckdb`
101101
install infera from community;
102102
load infera;

extension_config.cmake

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,14 @@ if (EXISTS ${INFERA_RUST_LIB})
6969
# Create an imported target for the Rust library
7070
add_library(infera_rust STATIC IMPORTED GLOBAL)
7171
if(UNIX)
72-
set(_INFERA_RUST_LINK_LIBS "pthread;dl;m")
72+
if(APPLE)
73+
# reqwest 0.13 uses rustls-platform-verifier on Apple platforms, which
74+
# calls into the macOS Security and CoreFoundation frameworks. Link them
75+
# explicitly so the static Rust archive resolves at extension link time.
76+
set(_INFERA_RUST_LINK_LIBS "pthread;dl;m;-framework Security;-framework CoreFoundation;-framework SystemConfiguration")
77+
else()
78+
set(_INFERA_RUST_LINK_LIBS "pthread;dl;m")
79+
endif()
7380
else()
7481
set(_INFERA_RUST_LINK_LIBS "")
7582
endif()
@@ -80,7 +87,11 @@ if (EXISTS ${INFERA_RUST_LIB})
8087

8188
# Add the Rust library to global link libraries so it gets linked to everything
8289
if(UNIX)
83-
link_libraries(${INFERA_RUST_LIB} pthread dl m)
90+
if(APPLE)
91+
link_libraries(${INFERA_RUST_LIB} pthread dl m "-framework Security" "-framework CoreFoundation" "-framework SystemConfiguration")
92+
else()
93+
link_libraries(${INFERA_RUST_LIB} pthread dl m)
94+
endif()
8495
else()
8596
link_libraries(${INFERA_RUST_LIB})
8697
if(WIN32)
@@ -107,6 +118,11 @@ if (EXISTS ${INFERA_RUST_LIB})
107118
add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-lpthread>)
108119
add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-ldl>)
109120
add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-lm>)
121+
# Apple framework flags are NOT added via add_link_options: CMake splits
122+
# "-framework Security" at the space inside generator expressions, producing
123+
# the literal token '$<0:-framework' instead of an empty string. The frameworks
124+
# are already propagated to all targets by link_libraries() and
125+
# INTERFACE_LINK_LIBRARIES above, so no add_link_options entry is needed.
110126
else()
111127
add_link_options($<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:${INFERA_RUST_LIB}>)
112128
endif()

0 commit comments

Comments
 (0)