Skip to content

Commit 58eef75

Browse files
committed
Merge branch 'main' into dc/feature/user_timestamp
2 parents 22f93d9 + 02c24c5 commit 58eef75

98 files changed

Lines changed: 22461 additions & 20281 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/node-builds.yml

Lines changed: 75 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,46 @@ env:
2222
APP_NAME: rtc-node
2323

2424
jobs:
25+
bump_version:
26+
runs-on: macos-15
27+
outputs:
28+
commit_sha: ${{ steps.commit.outputs.commit_long_sha }}
29+
steps:
30+
- uses: actions/checkout@v6
31+
32+
- uses: pnpm/action-setup@v4
33+
with:
34+
package_json_file: livekit-ffi-node-bindings/package.json
35+
36+
- name: Setup node
37+
uses: actions/setup-node@v6
38+
with:
39+
node-version: 24
40+
cache: pnpm
41+
cache-dependency-path: livekit-ffi-node-bindings/pnpm-lock.yaml
42+
43+
- working-directory: livekit-ffi-node-bindings
44+
run: pnpm install
45+
46+
- name: Set package version from tag
47+
working-directory: livekit-ffi-node-bindings
48+
run: |
49+
# Extract version from tag (e.g., rust-sdks/livekit-ffi@0.12.43 -> 0.12.43)
50+
VERSION=$(echo "${{ env.TAG_NAME }}" | sed 's/.*@//')
51+
echo "Setting package version to $VERSION"
52+
npm version $VERSION --no-git-tag-version
53+
pnpm run ci:version
54+
55+
- name: Add changes
56+
id: commit
57+
uses: EndBug/add-and-commit@v9
58+
with:
59+
add: '["**/package.json"]'
60+
default_author: github_actions
61+
message: bump livekit-ffi-node-binding version
62+
2563
build:
64+
needs: bump_version
2665
strategy:
2766
fail-fast: false
2867
matrix:
@@ -55,6 +94,8 @@ jobs:
5594
- uses: actions/checkout@v6
5695
with:
5796
submodules: recursive
97+
ref: ${{ needs.bump_version.outputs.commit_sha }}
98+
fetch-depth: 0
5899
- uses: pnpm/action-setup@v4
59100
with:
60101
package_json_file: livekit-ffi-node-bindings/package.json
@@ -147,20 +188,32 @@ jobs:
147188
working-directory: livekit-ffi-node-bindings
148189
run: pnpm build --target ${{ matrix.target }}
149190

150-
- name: Upload artifact
191+
- name: Upload binary artifact
151192
uses: actions/upload-artifact@v4
152193
if: github.event_name != 'pull-request'
153194
with:
154-
name: bindings-${{ matrix.target }}
155-
path: livekit-ffi-node-bindings/src/napi/${{ env.APP_NAME }}.*.node
195+
name: native-bindings-${{ matrix.target }}
196+
path: livekit-ffi-node-bindings/${{ env.APP_NAME }}.*.node
156197
if-no-files-found: error
157198

158-
release:
159-
needs: build
160-
name: Release
199+
- name: Upload JS
200+
uses: actions/upload-artifact@v4
201+
if: ${{ github.event_name != 'pull-request' && matrix.os == 'macos-15' }}
202+
with:
203+
name: js-bindings
204+
path: livekit-ffi-node-bindings/native.*
205+
if-no-files-found: error
206+
207+
commit_and_release:
208+
needs: [bump_version, build]
209+
name: Commit and Release
161210
runs-on: ubuntu-latest
162211
steps:
163-
- uses: actions/checkout@v5
212+
- uses: actions/checkout@v6
213+
214+
- run: git fetch origin ${{ needs.bump_version.outputs.commit_sha }}
215+
216+
- run: git reset --hard ${{ needs.bump_version.outputs.commit_sha }}
164217

165218
- uses: pnpm/action-setup@v4
166219
with:
@@ -176,40 +229,27 @@ jobs:
176229
- working-directory: livekit-ffi-node-bindings
177230
run: pnpm install
178231

179-
- name: Install Protoc
180-
uses: arduino/setup-protoc@v3
181-
with:
182-
version: "25.1"
183-
repo-token: ${{ secrets.GITHUB_TOKEN }}
184-
185-
- name: Download all artifacts
232+
- name: Download native build artifacts
186233
uses: actions/download-artifact@v4
187234
with:
235+
pattern: native-bindings-*
188236
path: livekit-ffi-node-bindings/artifacts
189237

190-
- name: Set package version from tag
191-
working-directory: livekit-ffi-node-bindings
192-
run: |
193-
# Extract version from tag (e.g., rust-sdks/livekit-ffi@0.12.43 -> 0.12.43)
194-
VERSION=$(echo "${{ env.TAG_NAME }}" | sed 's/.*@//')
195-
echo "Setting package version to $VERSION"
196-
npm version $VERSION --no-git-tag-version
197-
pnpm run version
198-
199-
- name: Commit and push versioning changes
200-
run: |
201-
git config --global user.name "github-actions[bot]"
202-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
203-
git add .
204-
git commit -m "chore: update livekit-ffi-node-bindings version to $(echo "${{ env.TAG_NAME }}" | sed 's/.*@//')" || echo "No changes to commit"
205-
git push origin HEAD
238+
- name: Download js artifacts
239+
uses: actions/download-artifact@v4
240+
with:
241+
name: js-bindings
242+
path: livekit-ffi-node-bindings
206243

207-
- name: Build TS parts
208-
working-directory: livekit-ffi-node-bindings
209-
run: pnpm build:ts
244+
- name: Add changes
245+
uses: EndBug/add-and-commit@v9
246+
with:
247+
add: '["livekit-ffi-node-bindings/native.js", "livekit-ffi-node-bindings/native.d.ts"]'
248+
default_author: github_actions
249+
message: update js bindings for release
210250

211251
- name: Move artifacts
212-
run: pnpm artifacts
252+
run: pnpm run ci:artifacts
213253
working-directory: livekit-ffi-node-bindings
214254

215255
- name: List packages
@@ -218,4 +258,4 @@ jobs:
218258

219259
- name: Publish
220260
working-directory: livekit-ffi-node-bindings
221-
run: pnpm publish --tag dev
261+
run: pnpm publish -r

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,26 @@ jobs:
101101
fetch-depth: 0
102102
- name: Install Rust toolchain
103103
uses: dtolnay/rust-toolchain@stable
104+
- name: Install VA-API/NVIDIA drivers and other dependencies for build
105+
run: |
106+
sudo apt update -y
107+
sudo apt install \
108+
libnvidia-compute-570 \
109+
libnvidia-decode-570 \
110+
nvidia-cuda-dev \
111+
libasound2-dev \
112+
libssl-dev \
113+
libx11-dev \
114+
libgl1-mesa-dev \
115+
libxext-dev \
116+
libva-dev \
117+
libdrm-dev \
118+
libgbm-dev \
119+
libxfixes-dev \
120+
libxdamage-dev \
121+
libxrandr-dev \
122+
libxcomposite-dev \
123+
libglib2.0-dev -y
104124
- name: Run release-plz
105125
uses: release-plz/action@v0.5
106126
with:

0 commit comments

Comments
 (0)