Skip to content

Commit 331de0d

Browse files
committed
fix(ci): resolve all CI failures (Ruby artifacts, CMAKE, Go bindings, PHP tests, C# metadata)
1 parent 313bbd7 commit 331de0d

File tree

23 files changed

+495
-184
lines changed

23 files changed

+495
-184
lines changed

.github/actions/install-system-deps/action.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,21 @@ runs:
106106
C:\ProgramData\chocolatey\lib\llvm
107107
key: llvm-windows-${{ runner.arch }}-v1
108108

109+
- name: Cache CMake (Windows)
110+
if: runner.os == 'Windows'
111+
id: cache-cmake-windows
112+
uses: actions/cache@v5
113+
with:
114+
path: |
115+
C:\Program Files\CMake
116+
C:\ProgramData\chocolatey\lib\cmake
117+
key: cmake-windows-${{ runner.arch }}-v1
118+
109119
- name: Install dependencies (Windows)
110120
if: runner.os == 'Windows'
111121
shell: pwsh
112122
env:
113123
TESSERACT_CACHE_HIT: ${{ steps.cache-tesseract-windows.outputs.cache-hit }}
114124
LLVM_CACHE_HIT: ${{ steps.cache-llvm-windows.outputs.cache-hit }}
125+
CMAKE_CACHE_HIT: ${{ steps.cache-cmake-windows.outputs.cache-hit }}
115126
run: pwsh -File scripts/ci/install-system-deps/install-windows.ps1

Cargo.lock

Lines changed: 53 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ serde_json = { version = "1.0.149" }
5050

5151
thiserror = "2.0.17"
5252
anyhow = "1.0"
53-
libc = "0.2.179"
53+
libc = "0.2.180"
5454

5555
async-trait = "0.1.89"
5656

crates/kreuzberg-php/src/types.rs

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,18 @@ pub(crate) fn json_value_to_php(value: &serde_json::Value) -> PhpResult<Zval> {
3232
Ok(php_arr.into_zval(false)?)
3333
}
3434
serde_json::Value::Object(obj) => {
35-
let mut map = HashMap::new();
35+
// Create a proper PHP object (stdClass) for JSON objects
36+
use ext_php_rs::boxed::ZBox;
37+
use ext_php_rs::types::ZendObject;
38+
39+
let mut std_obj = ZendObject::new_stdclass();
40+
41+
// Set properties on the stdClass object
3642
for (k, v) in obj {
37-
map.insert(k.clone(), json_value_to_php(v)?);
43+
std_obj.set_property(k.as_str(), json_value_to_php(v)?)?;
3844
}
39-
Ok(map.into_zval(false)?)
45+
46+
Ok(std_obj.into_zval(false)?)
4047
}
4148
}
4249
}
@@ -129,11 +136,16 @@ impl ExtractionResult {
129136
"embeddings" => {
130137
// Extract embeddings from chunks if available
131138
if let Some(chunks) = &self.chunks {
139+
use ext_php_rs::boxed::ZBox;
140+
use ext_php_rs::types::ZendObject;
141+
132142
let mut php_embeddings = Vec::new();
133143
for chunk in chunks {
134144
if let Some(embedding) = &chunk.embedding {
135-
let mut embedding_obj = HashMap::new();
136-
embedding_obj.insert("vector", embedding.clone().into_zval(false)?);
145+
// Create a proper PHP object (stdClass) with vector property
146+
let mut embedding_obj = ZendObject::new_stdclass();
147+
embedding_obj.set_property("vector", embedding.clone().into_zval(false)?)?;
148+
137149
php_embeddings.push(embedding_obj.into_zval(false)?);
138150
}
139151
}
@@ -163,13 +175,18 @@ impl ExtractionResult {
163175
}
164176
"keywords" => {
165177
if let Some(keywords) = &self.keywords {
166-
// Convert keywords to PHP array of associative arrays
178+
use ext_php_rs::boxed::ZBox;
179+
use ext_php_rs::types::ZendObject;
180+
181+
// Convert keywords to PHP array of objects (stdClass)
167182
let mut php_keywords = Vec::new();
168183
for kw in keywords {
169-
let mut kw_map = HashMap::new();
170-
kw_map.insert("text", kw.text.as_str().into_zval(false)?);
171-
kw_map.insert("score", kw.score.into_zval(false)?);
172-
php_keywords.push(kw_map.into_zval(false)?);
184+
// Create a proper PHP object with text and score properties
185+
let mut kw_obj = ZendObject::new_stdclass();
186+
kw_obj.set_property("text", kw.text.as_str().into_zval(false)?)?;
187+
kw_obj.set_property("score", kw.score.into_zval(false)?)?;
188+
189+
php_keywords.push(kw_obj.into_zval(false)?);
173190
}
174191
Ok(Some(php_keywords.into_zval(false)?))
175192
} else {

crates/kreuzberg-tesseract/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ thiserror = { workspace = true }
2424
image = { workspace = true }
2525

2626
[build-dependencies]
27-
cc = { version = "^1.2.51", optional = true }
27+
cc = { version = "^1.2.52", optional = true }
2828
cmake = { version = "0.1.57", optional = true }
2929
zip = { version = "7.0.0", optional = true }
3030

crates/kreuzberg/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ reqwest = { workspace = true, default-features = false, features = [
231231
"rustls",
232232
], optional = true }
233233
# Use rustls-tls for fastembed on non-Windows platforms
234-
fastembed = { version = "5.6", default-features = false, features = [
234+
fastembed = { version = "5.7", default-features = false, features = [
235235
"hf-hub-rustls-tls",
236236
"ort-load-dynamic",
237237
], optional = true }
@@ -245,7 +245,7 @@ reqwest = { workspace = true, default-features = false, features = [
245245
"native-tls",
246246
], optional = true }
247247
# Use native-tls for fastembed on Windows
248-
fastembed = { version = "5.6", default-features = false, features = [
248+
fastembed = { version = "5.7", default-features = false, features = [
249249
"hf-hub-native-tls",
250250
"ort-load-dynamic",
251251
], optional = true }

0 commit comments

Comments
 (0)