Skip to content

Commit 34e78c9

Browse files
fix: update for _typos and build fix
Signed-off-by: Janos Sarusi-Kis <[email protected]>
1 parent d0e9401 commit 34e78c9

File tree

4 files changed

+39
-13
lines changed

4 files changed

+39
-13
lines changed

.github/workflows/reusable-bindings-build-and-test.yaml

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,23 @@ jobs:
153153
task bindings:build:all TARGET=${{ matrix.platform.target }} PROFILE=release
154154
- name: Strip and rename artifacts
155155
run: |
156-
ls -lah ../../target/${{ matrix.platform.target }}/release/
157-
158-
# Split target and use in filename
156+
# Cargo output path: zigbuild uses versioned target (e.g. .2.28) for linux-gnu;
157+
# native build with --target uses unversioned path. Detect which exists.
159158
TARGET="${{ matrix.platform.target }}"
159+
if [[ "$TARGET" == *"-linux-gnu" ]]; then
160+
if [ -d "../../target/${TARGET}.2.28/release" ]; then
161+
CARGO_TARGET="${TARGET}.2.28"
162+
else
163+
CARGO_TARGET="$TARGET"
164+
fi
165+
else
166+
CARGO_TARGET="$TARGET"
167+
fi
168+
169+
RELEASE_DIR="../../target/${CARGO_TARGET}/release"
170+
ls -lah "$RELEASE_DIR/"
171+
172+
# Split target (logical name) for library filename
160173
ARCH=$(echo "$TARGET" | cut -d'-' -f1)
161174
OS=$(echo "$TARGET" | cut -d'-' -f3)
162175
ABI=$(echo "$TARGET" | cut -d'-' -f4)
@@ -172,20 +185,23 @@ jobs:
172185
LIB_NAME="slim_bindings_${ARCH}_${OS}"
173186
fi
174187
175-
# Handle both libslim_bindings* (Unix) and slim_bindings* (Windows)
176-
for file in ../../target/${{ matrix.platform.target }}/release/libslim_bindings* ../../target/${{ matrix.platform.target }}/release/slim_bindings.*; do
188+
# Rename in place in the cargo output directory
189+
for file in "$RELEASE_DIR"/libslim_bindings* "$RELEASE_DIR"/slim_bindings.*; do
177190
if [ -f "$file" ]; then
178191
filename=$(basename "$file")
179-
180-
# Replace slim_bindings with arch_os_abi version, keeping any existing prefix
181192
new_filename="${filename/slim_bindings/${LIB_NAME}}"
182-
183193
if [ "$filename" != "$new_filename" ]; then
184-
mv "$file" "../../target/${{ matrix.platform.target }}/release/${new_filename}"
194+
mv "$file" "$RELEASE_DIR/${new_filename}"
185195
fi
186196
fi
187197
done
188198
199+
# If cargo used a versioned target, move renamed files to the path the rest of the workflow expects
200+
if [ "$CARGO_TARGET" != "$TARGET" ]; then
201+
mkdir -p "../../target/${TARGET}/release"
202+
mv "$RELEASE_DIR"/*slim_bindings* "../../target/${TARGET}/release/"
203+
fi
204+
189205
echo "📁 Renamed files:"
190206
ls -lah ../../target/${{ matrix.platform.target }}/release/*slim_bindings*
191207
- name: Upload libs
@@ -436,6 +452,11 @@ jobs:
436452
run: |
437453
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
438454
455+
- name: Install uniffi-bindgen-node
456+
run: |
457+
rustup install stable --no-self-update 2>/dev/null || true
458+
rustup run stable cargo install --git https://github.com/livekit/uniffi-bindgen-node.git --tag [email protected]
459+
439460
- name: Download libraries
440461
uses: actions/download-artifact@v4
441462
with:

data-plane/_typos.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ extend-exclude = [
1111
"**/*.pem",
1212
"**/*.yaml",
1313
"bindings/go/generated/**",
14+
"**/*.pbxproj",
15+
"**/*.pbxproj.bak",
1416
]

data-plane/bindings/node/Taskfile.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ tasks:
4545
- which uniffi-bindgen-node
4646
cmds:
4747
- echo "📦 Installing uniffi-bindgen-node..."
48-
- cargo install --git https://github.com/livekit/uniffi-bindgen-node.git --tag v0.1.3
49-
silent: true
48+
- cargo install --git https://github.com/livekit/uniffi-bindgen-node.git --tag [email protected]
5049

5150
generate:
5251
desc: Generate Node.js bindings using uniffi-bindgen-node

data-plane/bindings/rust/Taskfile.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ tasks:
2525

2626
bindings:install-cargo-components:
2727
desc: Install required cargo components
28+
status:
29+
- which cargo-zigbuild
2830
cmds:
2931
- echo "🦀 Installing required cargo components..."
3032
- cargo install cargo-zigbuild
@@ -48,14 +50,16 @@ tasks:
4850
ARGS=()
4951
5052
# Determine whether to use cargo build or cargo zigbuild
51-
# - Native builds: use regular cargo build
53+
# - Native builds: use regular cargo build with --target for consistent paths
5254
# - Apple targets (iOS, macOS): use regular cargo build (zigbuild not compatible)
5355
# - Linux/gnu targets: use zigbuild with libc version for gnu ABI
5456
# - Other cross-compilation targets: use zigbuild
5557
if [[ "{{.TARGET}}" == "" || "{{.TARGET}}" == "$(rustc -vV | sed -n 's|host: ||p')" ]]; then
56-
# Native build
58+
# Native build - explicitly specify target for consistent output paths
5759
ARGS=(
5860
"build"
61+
"--target"
62+
"{{.TARGET}}"
5963
{{.RELEASE}}
6064
)
6165
elif [[ "{{.TARGET}}" == *"apple-ios"* || "{{.TARGET}}" == *"apple-darwin"* ]]; then

0 commit comments

Comments
 (0)