-
Notifications
You must be signed in to change notification settings - Fork 10
add musl target to kos-go #212
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
16 commits
Select commit
Hold shift + click to select a range
6585775
modify cgo directives to work with vendor path
klever-patrick c545ff9
add steps to commit lib
klever-patrick c7b7e92
add lib folder to path-ignore
klever-patrick a9af963
run build-go only when bindings change
klever-patrick 1462871
add musl support
klever-patrick b56bde0
rename kos-go workflow
klever-patrick 07c11ea
fix musl testing rule
klever-patrick 6d5618b
avoid push-on-PR failures and CI loops
klever-patrick 6c13db2
grant token permissions to push commits
klever-patrick 91d9246
Update Linux Go bindings library
klever-patrick eddeb98
Update macOS Go bindings library
klever-patrick 3a95991
add musl gcc
klever-patrick 01891de
Merge remote-tracking branch 'refs/remotes/origin/fix/cgo-vendor' int…
klever-patrick 722161b
add musl gcc directly on kos-go workflow
klever-patrick 8785b4d
Update Linux musl Go bindings library
klever-patrick 65a4d9a
force ci to run
klever-patrick 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 |
|---|---|---|
| @@ -0,0 +1,142 @@ | ||
| name: KOS-Go Checks | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - 'packages/kos-go/kos_mobile/**' | ||
| branches: | ||
| - develop | ||
| pull_request: | ||
| branches: | ||
| - develop | ||
|
|
||
| jobs: | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| build-go-linux: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.21' | ||
|
|
||
| - name: RustUp | ||
| uses: klever-io/kos-rs/.github/actions/rustup@develop | ||
| with: | ||
| with_cache: true | ||
|
|
||
| - name: Build Linux Go bindings | ||
| run: make build-go | ||
|
|
||
| - name: Copy .so to Go package | ||
| run: | | ||
| mkdir -p packages/kos-go/kos_mobile/lib/linux-amd64 | ||
| cp target/release/libkos_mobile.so packages/kos-go/kos_mobile/lib/linux-amd64/ | ||
|
|
||
| - name: Commit and push changes | ||
| if: github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]') | ||
| uses: stefanzweifel/git-auto-commit-action@v4 | ||
| with: | ||
| commit_message: "Update Linux Go bindings library" | ||
| file_pattern: "packages/kos-go/kos_mobile/lib/linux-amd64/libkos_mobile.so" | ||
|
|
||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| - name: Run Go tests | ||
| run: | | ||
| cd packages/kos-go | ||
| make test | ||
|
|
||
| build-go-linux-musl: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.21' | ||
|
|
||
| - name: RustUp | ||
| uses: klever-io/kos-rs/.github/actions/rustup@develop | ||
| with: | ||
| with_cache: true | ||
|
|
||
| - name: Install musl tools | ||
| run: sudo apt-get update && sudo apt-get install -y musl-tools | ||
|
|
||
| - name: Build Linux musl Go bindings | ||
| run: | | ||
| rustup target add x86_64-unknown-linux-musl | ||
| make build-go-musl | ||
|
|
||
|
klever-patrick marked this conversation as resolved.
|
||
| - name: Copy .so to Go package | ||
| run: | | ||
| mkdir -p packages/kos-go/kos_mobile/lib/linux-amd64 | ||
| cp target/x86_64-unknown-linux-musl/release/libkos_mobile.so packages/kos-go/kos_mobile/lib/linux-musl-amd64/ | ||
|
|
||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| - name: Commit and push changes | ||
| if: github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]') | ||
| uses: stefanzweifel/git-auto-commit-action@v4 | ||
| with: | ||
| commit_message: "Update Linux musl Go bindings library" | ||
| file_pattern: "packages/kos-go/kos_mobile/lib/linux-musl-amd64/libkos_mobile.so" | ||
|
|
||
| - name: Run Go tests | ||
| run: | | ||
| cd packages/kos-go | ||
| make test-linux-musl | ||
|
|
||
| build-go-mac: | ||
| runs-on: [ "macos-14" ] | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.21' | ||
|
|
||
| - name: Install Rust toolchain | ||
| shell: bash | ||
| run: | | ||
| set -e | ||
| rustup component add --toolchain stable rustfmt clippy | ||
| rustup default stable | ||
|
|
||
| - name: Setup protobuf | ||
| run: brew install protobuf | ||
|
|
||
| - name: Build Mac Go bindings | ||
| run: make build-go | ||
|
|
||
| - name: Copy dylib to Go package | ||
| run: | | ||
| mkdir -p packages/kos-go/kos_mobile/lib/darwin-aarch64 | ||
| cp target/release/libkos_mobile.dylib packages/kos-go/kos_mobile/lib/darwin-aarch64/ | ||
|
|
||
| - name: Commit and push changes | ||
| if: github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]') | ||
| uses: stefanzweifel/git-auto-commit-action@v4 | ||
| with: | ||
| commit_message: "Update macOS Go bindings library" | ||
| file_pattern: "packages/kos-go/kos_mobile/lib/darwin-aarch64/libkos_mobile.dylib" | ||
|
|
||
| - name: Run Go tests | ||
| run: | | ||
| cd packages/kos-go | ||
| make test | ||
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,2 @@ | ||
| vendor | ||
| bin |
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,16 @@ | ||
| *.test | ||
|
|
||
| *.out | ||
| coverage.* | ||
| *.coverprofile | ||
| profile.cov | ||
|
|
||
| vendor/ | ||
|
|
||
| go.work | ||
| go.work.sum | ||
|
|
||
| .env | ||
|
|
||
| .idea/ | ||
| .vscode/ |
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
Binary file modified
BIN
-27.7 KB
(100%)
packages/kos-go/kos_mobile/lib/darwin-aarch64/libkos_mobile.dylib
Binary file not shown.
Binary file modified
BIN
+2.52 KB
(100%)
packages/kos-go/kos_mobile/lib/linux-amd64/libkos_mobile.so
Binary file not shown.
Binary file not shown.
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.