-
Notifications
You must be signed in to change notification settings - Fork 135
node binding generation follow up #834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
e5587c6
pnpm setup in subfolder
lukasIO 3305bd0
fix order
lukasIO dc044ca
run proto generate in release flow
lukasIO fc52f91
speedup
lukasIO 59c7468
fixes
lukasIO c782845
order
lukasIO 143d4c8
cache
lukasIO d610668
fix directories
lukasIO 97bc9d5
protoc setup
lukasIO 1fce0ce
skip windows for now
lukasIO 2bf3a05
whitespace
lukasIO 4c3f0d8
commit versioning diff
lukasIO 03f9bf2
chore: update livekit-ffi-node-bindings version to 0.1.0
github-actions[bot] 3c7e6cc
license headers
lukasIO 1ac63ba
Merge branch 'lukas/node-binding-follow' of https://github.com/liveki…
lukasIO 35016f6
chore: update livekit-ffi-node-bindings version to 0.1.1
github-actions[bot] d83e4bd
Update license stuff
lukasIO f72462d
chore: update livekit-ffi-node-bindings version to 0.12.43
github-actions[bot] 152ab40
generate node ffi proto for every PR
lukasIO 63c6b7c
Merge branch 'lukas/node-binding-follow' of https://github.com/liveki…
lukasIO 6813673
fix permissions
lukasIO 4d39f7f
fix node deps
lukasIO 101efda
run proto generation only on PRs
lukasIO 03707d3
fix deps
lukasIO 8d47189
fix permissions
lukasIO b6d913b
fix ffi-workflow
lukasIO File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -100,13 +100,15 @@ jobs: | |
| - name: Install VA-API/NVIDIA drivers for linux x64 build | ||
| if: ${{ matrix.os == 'ubuntu-latest'}} | ||
| run: | | ||
| run: | | ||
| sudo apt install -y libva-dev libdrm-dev libnvidia-compute-570 libnvidia-decode-570 nvidia-cuda-dev -y | ||
| - name: Install Rust toolchain. | ||
| run: | | ||
| rustup target add ${{ matrix.target }} | ||
| - uses: Swatinem/[email protected] | ||
|
|
||
| - name: Build (Cargo) | ||
| if: ${{ !contains(matrix.target, 'android') }} | ||
| run: | | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -117,6 +117,8 @@ jobs: | |
| run: | | ||
| rustup target add ${{ matrix.target }} | ||
|
|
||
| - uses: Swatinem/[email protected] | ||
|
|
||
| - name: Install Protoc | ||
| uses: arduino/setup-protoc@v2 | ||
| with: | ||
|
|
@@ -209,11 +211,6 @@ jobs: | |
| name: ffi-builds-${{ matrix.target }} | ||
| path: ${{ matrix.name }}.zip | ||
|
|
||
| build_node: | ||
| name: Build node bindings | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
|
|
||
| release: | ||
| name: Release to GH (Draft) | ||
| runs-on: ubuntu-latest | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| name: Generate FFI Proto (Node) | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - livekit-ffi/** | ||
| - livekit-ffi-node-bindings/** | ||
| workflow_dispatch: | ||
| workflow_call: | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.sha }} | ||
| cancel-in-progress: false | ||
|
|
||
| env: | ||
| PACKAGE_DIR: ./livekit-ffi-node-bindings | ||
|
|
||
| jobs: | ||
| generate_protobuf: | ||
| runs-on: ubuntu-latest | ||
| name: Generating protobuf | ||
| if: github.event_name == 'pull_request' | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: ${{ env.PACKAGE_DIR }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: true | ||
| ref: ${{ github.event.pull_request.head.ref }} | ||
|
|
||
| - name: Install Protoc | ||
| uses: arduino/setup-protoc@v3 | ||
| with: | ||
| version: "25.1" | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - uses: actions/checkout@v6 | ||
| with: | ||
| submodules: recursive | ||
| - uses: pnpm/action-setup@v4 | ||
| with: | ||
| package_json_file: livekit-ffi-node-bindings/package.json | ||
|
|
||
| - name: Setup node | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24 | ||
| cache: pnpm | ||
| cache-dependency-path: livekit-ffi-node-bindings/pnpm-lock.yaml | ||
|
|
||
| - run: pnpm install | ||
|
|
||
| - name: generate JS stubs | ||
| run: ./generate_proto.sh | ||
|
|
||
| - name: Add changes | ||
| uses: EndBug/add-and-commit@v9 | ||
| with: | ||
| add: '["livekit-ffi-node-bindings/src/proto"]' | ||
| default_author: github_actions | ||
| message: generated protobuf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,8 @@ | ||
| name: node ffi binding build | ||
| name: Node FFI binding build and release | ||
|
|
||
| permissions: | ||
| id-token: write # Required for OIDC | ||
| contents: write # Required to create GH releases | ||
| pull-requests: write # Required to interact with PRs | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
@@ -56,41 +55,33 @@ jobs: | |
| - uses: actions/checkout@v6 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - uses: pnpm/action-setup@v4 | ||
| with: | ||
| package_json_file: livekit-ffi-node-bindings/package.json | ||
|
|
||
| - name: Setup node | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24 | ||
| cache: pnpm | ||
| cache-dependency-path: livekit-ffi-node-bindings/pnpm-lock.yaml | ||
|
|
||
| - run: pnpm install | ||
| working-directory: livekit-ffi-node-bindings | ||
|
|
||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: stable | ||
| targets: ${{ matrix.target }} | ||
|
|
||
| - uses: Swatinem/[email protected] | ||
|
|
||
| - name: Install Protoc | ||
| uses: arduino/setup-protoc@v3 | ||
| with: | ||
| version: "25.1" | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Cache cargo | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry/index/ | ||
| ~/.cargo/registry/cache/ | ||
| ~/.cargo/git/db/ | ||
| packages/livekit-ffi/.cargo-cache | ||
| packages/livekit-ffi/target/ | ||
| key: ${{ matrix.target }}-cargo-${{ matrix.os }} | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: livekit-ffi-node-bindings | ||
| run: pnpm install | ||
|
|
||
| - name: Build (Linux) | ||
| if: ${{ matrix.platform == 'linux' }} | ||
| run: | | ||
|
|
@@ -166,36 +157,36 @@ jobs: | |
|
|
||
| release: | ||
| needs: build | ||
| if: github.ref == 'refs/heads/main' | ||
| name: Release | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
|
|
||
| - uses: pnpm/action-setup@v4 | ||
| with: | ||
| package_json_file: livekit-ffi-node-bindings/package.json | ||
|
|
||
| - name: Setup node | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24 | ||
| cache: pnpm | ||
| cache-dependency-path: livekit-ffi-node-bindings/pnpm-lock.yaml | ||
|
|
||
| - name: Install dependencies | ||
| - working-directory: livekit-ffi-node-bindings | ||
| run: pnpm install | ||
|
|
||
| - name: Install Protoc | ||
| uses: arduino/setup-protoc@v3 | ||
| with: | ||
| version: "25.1" | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Download all artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: livekit-ffi-node-bindings/artifacts | ||
|
|
||
| - name: Move artifacts | ||
| run: pnpm artifacts | ||
| working-directory: livekit-ffi-node-bindings | ||
|
|
||
| - name: List packages | ||
| run: ls -R ./livekit-ffi-node-bindings/npm | ||
| shell: bash | ||
|
|
||
| - name: Set package version from tag | ||
| working-directory: livekit-ffi-node-bindings | ||
| run: | | ||
|
|
@@ -205,10 +196,26 @@ jobs: | |
| npm version $VERSION --no-git-tag-version | ||
| pnpm run version | ||
|
|
||
| - name: Commit and push versioning changes | ||
| run: | | ||
| git config --global user.name "github-actions[bot]" | ||
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
| git add . | ||
| git commit -m "chore: update livekit-ffi-node-bindings version to $(echo "${{ env.TAG_NAME }}" | sed 's/.*@//')" || echo "No changes to commit" | ||
| git push origin HEAD | ||
|
|
||
| - name: Build TS parts | ||
| working-directory: livekit-ffi-node-bindings | ||
| run: pnpm build:ts | ||
|
|
||
| - name: Move artifacts | ||
| run: pnpm artifacts | ||
| working-directory: livekit-ffi-node-bindings | ||
|
|
||
| - name: List packages | ||
| run: ls -R ./livekit-ffi-node-bindings/npm | ||
| shell: bash | ||
|
|
||
| - name: Publish | ||
| working-directory: livekit-ffi-node-bindings | ||
| run: pnpm publish --tag dev | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need this step anymore? when doing local dev?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this part in the previous PR, but running it like this errors out on windows builds, so I kept it as a separate/manual step in the CI as it was before