-
Notifications
You must be signed in to change notification settings - Fork 99
Support for single binary distribution #491
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
dyoshikawa
merged 17 commits into
main
from
claude/enable-bun-compile-binary-011CUv7Fy7fJ9FZYpbxR35VB
Nov 9, 2025
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
979e401
feat: add bun compile support for binary distribution
claude 788e10b
feat: improve binary build process and add release workflow
claude 802ea6b
refactor: simplify binary build process using bun --external giget
claude 51b7ee9
Merge remote-tracking branch 'origin/main' into claude/enable-bun-com…
claude 0fe7a9d
chore: add giget to cspell dictionary
claude 7e58278
Merge remote-tracking branch 'origin/main' into claude/enable-bun-com…
cm-dyoshikawa 5e07f39
chore: update .gitignore for Bun compiled binaries
cm-dyoshikawa e32a19f
chore: streamline Bun binary build process and workflows
cm-dyoshikawa fc80928
refactor: reorganize CI/E2E workflows for better separation of concerns
cm-dyoshikawa 0e0d1ae
chore: update E2E workflow name to clarify cross-platform testing
cm-dyoshikawa 81f56a9
chore: add dependency installation step to E2E workflow
cm-dyoshikawa 7be4797
chore: skip install scripts in E2E workflow
cm-dyoshikawa be59d7d
refactor: reorganize GitHub Actions workflows for better separation
cm-dyoshikawa 306bf6d
fix: adjust release workflow permissions to read-only
cm-dyoshikawa 927cbd9
chore: simplify release workflow by using Bun exclusively
cm-dyoshikawa 5170fba
fix: address high-severity security issues in GitHub Actions workflows
cm-dyoshikawa ff7f4e8
chore: pin Bun version to 1.3.2 in mise.toml for consistency
claude 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| name: E2E Tests on Cross-Platform | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read # Required for checking out code | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build binaries | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Install Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version: 1.3.2 | ||
|
|
||
| - name: Install dependencies | ||
| run: bun install --ignore-scripts | ||
|
|
||
| - name: Build binaries | ||
| run: | | ||
| mkdir -p dist-bun | ||
| # Linux | ||
| bun build --compile --minify --sourcemap --target=bun-linux-x64 src/cli/index.ts --outfile dist-bun/rulesync-linux-x64 | ||
| bun build --compile --minify --sourcemap --target=bun-linux-arm64 src/cli/index.ts --outfile dist-bun/rulesync-linux-arm64 | ||
| # macOS | ||
| bun build --compile --minify --sourcemap --target=bun-darwin-x64 src/cli/index.ts --outfile dist-bun/rulesync-darwin-x64 | ||
| bun build --compile --minify --sourcemap --target=bun-darwin-arm64 src/cli/index.ts --outfile dist-bun/rulesync-darwin-arm64 | ||
|
|
||
| - name: Cache binaries | ||
| uses: actions/cache/save@v4 | ||
| with: | ||
| path: dist-bun | ||
| key: rulesync-binaries-${{ github.sha }} | ||
| enableCrossOsArchive: true | ||
|
|
||
| e2e: | ||
| name: E2E Test (${{ matrix.os }}) | ||
| runs-on: ${{ matrix.os }} | ||
| needs: build | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest] | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Restore cached binaries | ||
| uses: actions/cache/restore@v4 | ||
| with: | ||
| path: dist-bun | ||
| key: rulesync-binaries-${{ github.sha }} | ||
| enableCrossOsArchive: true | ||
| fail-on-cache-miss: true | ||
|
|
||
| - name: Make binary executable | ||
| env: | ||
| MATRIX_OS: ${{ matrix.os }} | ||
| run: | | ||
| if [ "$MATRIX_OS" = "ubuntu-latest" ]; then | ||
| chmod +x dist-bun/rulesync-linux-x64 | ||
| BINARY_PATH=dist-bun/rulesync-linux-x64 | ||
| else | ||
| chmod +x dist-bun/rulesync-darwin-arm64 | ||
| BINARY_PATH=dist-bun/rulesync-darwin-arm64 | ||
| fi | ||
| echo "BINARY_PATH=$BINARY_PATH" >> $GITHUB_ENV | ||
|
|
||
| - name: Test binary version | ||
| run: | | ||
| "${BINARY_PATH}" --version | ||
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 Binaries | ||
|
|
||
| on: | ||
| release: | ||
| types: [created] | ||
|
|
||
| permissions: | ||
| contents: write # Required for uploading release assets | ||
|
|
||
| jobs: | ||
| build-binaries: | ||
| name: Build and upload binaries | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| ref: main | ||
|
|
||
| - name: Install Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version: 1.3.2 | ||
|
|
||
| - name: Install dependencies | ||
| run: bun install --ignore-scripts | ||
|
|
||
| - name: Build binaries | ||
| run: | | ||
| mkdir -p dist-bun | ||
| # Linux | ||
| bun build --compile --minify --sourcemap --target=bun-linux-x64 src/cli/index.ts --outfile dist-bun/rulesync-linux-x64 | ||
| bun build --compile --minify --sourcemap --target=bun-linux-arm64 src/cli/index.ts --outfile dist-bun/rulesync-linux-arm64 | ||
| # macOS | ||
| bun build --compile --minify --sourcemap --target=bun-darwin-x64 src/cli/index.ts --outfile dist-bun/rulesync-darwin-x64 | ||
| bun build --compile --minify --sourcemap --target=bun-darwin-arm64 src/cli/index.ts --outfile dist-bun/rulesync-darwin-arm64 | ||
|
|
||
| - name: Generate checksums | ||
| run: | | ||
| cd dist-bun | ||
| sha256sum rulesync-* > SHA256SUMS | ||
| cat SHA256SUMS | ||
|
|
||
| - name: Upload binaries to release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: | | ||
| dist-bun/rulesync-linux-x64 | ||
| dist-bun/rulesync-linux-arm64 | ||
| dist-bun/rulesync-darwin-x64 | ||
| dist-bun/rulesync-darwin-arm64 | ||
| dist-bun/SHA256SUMS |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,6 +115,7 @@ | |
| "geminicli", | ||
| "geminiignore", | ||
| "gibo", | ||
| "giget", | ||
| "GITSTATUS", | ||
| "globby", | ||
| "gnueabihf", | ||
|
|
||
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,4 +1,5 @@ | ||
| [tools] | ||
| bun = "1.3.2" | ||
| node = "24" | ||
| pnpm = "10.20.0" | ||
| python = "3" | ||
|
|
||
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.