forked from antoineMoPa/beamcoder
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(*): compile binaries for mac and linux #16
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
+2,167
−122
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
f84b59d
fix(*): make release
stepancar 457b26a
fix(*): make release
stepancar 1bbe573
fix(*): make release
stepancar 6568bb0
fix(*): make release
stepancar e58cce8
fix(*): make release
stepancar 8cd4ac5
fix(*): make release
stepancar 07832c7
fix(*): release
stepancar 701c29a
fix(*): release
stepancar 4209c36
fix(*): build for mac
stepancar aac86c9
fix(*): static linking libvpx
stepancar ea4637e
fix(*): static linking libvpx
stepancar 10fba43
fix(*): static linking libvpx
stepancar def928d
fix(*): static linking libvpx
stepancar 37e11de
fix(*): fix
stepancar 2a0c043
fix(*): fix
stepancar 6607276
fix(*): fix
stepancar c8458d4
fix(*): fix
stepancar 0f8fbb3
fix(*): fix
stepancar 1fa2e25
fix(*): fix
stepancar ee79a9e
fix(*): fix
stepancar 4c6fcff
fix(*): remove unnecessary files in package
stepancar 5ef354c
Update .github/workflows/prebuild.yml
stepancar 8877412
fix(*): separate release and build
stepancar 672c0df
fix(*): separate release and build
stepancar 68ea219
fix(*): separate release and build
stepancar 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
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 |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: Build | ||
|
|
||
| on: | ||
| push: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| prebuild: | ||
| strategy: | ||
| matrix: | ||
| include: | ||
| - os: ubuntu-22.04 | ||
| platform: linux | ||
| - os: macos-14 | ||
| platform: darwin | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
|
|
||
| - uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Install system dependencies (Linux) | ||
| if: matrix.platform == 'linux' | ||
| run: sudo apt-get update && sudo apt-get install -y libvpx-dev | ||
|
|
||
| - name: Install system dependencies (macOS) | ||
| if: matrix.platform == 'darwin' | ||
| run: brew install libvpx | ||
|
|
||
| - name: Install dependencies (skip native build) | ||
| run: yarn install --frozen-lockfile --ignore-scripts | ||
|
|
||
| - name: Download FFmpeg static libraries | ||
| run: node install_ffmpeg_static.js | ||
|
|
||
| - name: Build prebuild | ||
| run: npx prebuild --strip -r node -t 22.0.0 | ||
| env: | ||
| FFMPEG_STATIC: "1" | ||
|
|
||
| - name: List prebuilds | ||
| run: find prebuilds -name "*.tar.gz" -ls | ||
|
|
||
| - name: Upload prebuild artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: prebuild-${{ matrix.platform }} | ||
| path: prebuilds/**/*.tar.gz |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,53 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: [Build] | ||
| types: [completed] | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| release: | ||
| if: github.event.workflow_run.conclusion == 'success' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
|
|
||
| - uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 22 | ||
| registry-url: https://registry.npmjs.org/ | ||
|
|
||
| - name: Get package version | ||
| id: version | ||
| run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Download prebuild artifacts from build workflow | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: prebuilds | ||
| pattern: prebuild-* | ||
| merge-multiple: true | ||
| run-id: ${{ github.event.workflow_run.id }} | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: List all prebuilds | ||
| run: find prebuilds -name "*.tar.gz" -ls | ||
|
|
||
| - name: Create or update GitHub release | ||
| run: | | ||
| VERSION="v${{ steps.version.outputs.version }}" | ||
| if gh release view "$VERSION" >/dev/null 2>&1; then | ||
| echo "Release $VERSION exists, uploading prebuilds..." | ||
| else | ||
| echo "Creating release $VERSION..." | ||
| gh release create "$VERSION" --title "$VERSION" --notes "Prebuilt binaries for version $VERSION" | ||
| fi | ||
| find prebuilds -name "*.tar.gz" -exec gh release upload "$VERSION" {} --clobber \; | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Publish to npm | ||
| run: npm publish | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.npm_token }} |
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,22 @@ | ||
| # Prebuilds are downloaded from GitHub releases, not bundled in npm | ||
| prebuilds/ | ||
|
|
||
| # Build artifacts | ||
| build/ | ||
|
|
||
| # FFmpeg libraries (downloaded at install time) | ||
| ffmpeg/ | ||
|
|
||
| # Development files | ||
| .circleci/ | ||
| .github/ | ||
| .claude/ | ||
| test/ | ||
| scratch/ | ||
| examples/ | ||
| images/ | ||
| *.tgz | ||
|
|
||
| # Editor/IDE | ||
| .vscode/ | ||
| *.swp |
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.
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.
Uh oh!
There was an error while loading. Please reload this page.