chore: test Mobileproxy on CI #688
Workflow file for this run
This file contains 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
name: Build and Test | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
permissions: # added using https://github.com/step-security/secure-workflows | ||
contents: read | ||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
# Use windows-2019, which is a lot faster than windows-2022: | ||
# https://github.com/actions/runner-images/issues/5166 | ||
os: [ubuntu-latest, macos-latest, windows-2019] | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
OUTPUT_DIR: ${{ env.GITHUB_WORKSPACE }}/out | ||
Check failure on line 22 in .github/workflows/test.yml GitHub Actions / Build and TestInvalid workflow file
|
||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
- name: Set up Go 1.20 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: '${{ github.workspace }}/go.mod' | ||
- name: Build SDK | ||
run: go build -v ./... | ||
- name: Build X | ||
run: go build -C x -o "${{ env.OUTPUT_DIR }}" -v ./... | ||
- name: Build Mobileproxy | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
go build -C x -o "${{ env.OUTPUT_DIR }}" golang.org/x/mobile/cmd/gomobile golang.org/x/mobile/cmd/gobind | ||
cd "${{ env.GITHUB_WORKSPACE }}/x/mobileproxy" | ||
PATH="${{ env.OUTPUT_DIR }}:$PATH" gomobile bind -ldflags='-s -w' -target=ios -iosversion=11.0 -o "${{ env.OUTPUT_DIR }}/mobileproxy.xcframework" github.com/Jigsaw-Code/outline-sdk/x/mobileproxy | ||
- name: Test SDK | ||
run: go test -v -race -bench '.' ./... -benchtime=100ms | ||
- name: Test X | ||
run: go test -C x -v -race -bench '.' ./... -benchtime=100ms |