Skip to content

Commit

Permalink
Improve
Browse files Browse the repository at this point in the history
  • Loading branch information
fortuna committed Dec 26, 2023
1 parent 55a0d95 commit 574a0ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,15 @@ jobs:
run: go build -C x -o "${{ env.OUTPUT_DIR }}/" -v ./...

- name: Build Go Mobile
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
run: go build -C x -o "${{ env.OUTPUT_DIR }}/" golang.org/x/mobile/cmd/gomobile golang.org/x/mobile/cmd/gobind

- name: Build Mobileproxy

- name: Build Mobileproxy (Android)
if: matrix.os == 'ubuntu-latest'
run: PATH="${{ env.OUTPUT_DIR }}:$PATH" gomobile bind -ldflags='-s -w' -v -target=android -androidapi=21 -o "${{ env.OUTPUT_DIR }}/mobileproxy.aar" github.com/Jigsaw-Code/outline-sdk/x/mobileproxy
working-directory: ${{ github.workspace }}/x/mobileproxy

- name: Build Mobileproxy (iOS)
if: matrix.os == 'macos-latest'
run: PATH="${{ env.OUTPUT_DIR }}:$PATH" gomobile bind -ldflags='-s -w' -v -target=ios -iosversion=11.0 -o "${{ env.OUTPUT_DIR }}/mobileproxy.xcframework" github.com/Jigsaw-Code/outline-sdk/x/mobileproxy
working-directory: ${{ github.workspace }}/x/mobileproxy
Expand Down
2 changes: 2 additions & 0 deletions x/mobileproxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Note: Gomobile expects gobind to be in the PATH, that's why we need to prebuild

The `-ldflags='-s -w'` flag strips debug symbols to reduce the size of the output library.

See [our Github Test Action](https://github.com/Jigsaw-Code/outline-sdk/blob/main/.github/workflows/test.yml) for how we build the Mobileproxy in our tests.

<details>
<summary>Sample iOS generated Code</summary>

Expand Down

0 comments on commit 574a0ae

Please sign in to comment.