Skip to content

chore: add outline-go-tun2socks, except android #2

chore: add outline-go-tun2socks, except android

chore: add outline-go-tun2socks, except android #2

name: Build and Test Tun2Socks
concurrency:
group: ${{ github.head_ref || github.ref }}
cancel-in-progress: true
on:
pull_request:
types:
- opened
- synchronize
push:
branches:
- master
jobs:
test:
name: Test
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: '^1.20'
- name: Build
run: cd outline/tun2socks && go build -v ./...
- name: Test
run: cd outline/tun2socks && go test -v -race -bench=. -benchtime=100ms ./...
linux:
name: Electron Build
runs-on: ubuntu-22.04
timeout-minutes: 10
needs: test
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: '^1.20'
- name: Build for Linux
run: cd outline/tun2socks && make linux
- name: Build for Windows
run: cd outline/tun2socks && make windows
apple:
name: Apple Build
runs-on: macos-12
timeout-minutes: 30
needs: test
env:
# Prevent gomobile from interacting with the Android NDK. The runner's
# default NDK is not compatible with gomobile, but we aren't trying
# to build for Android anyway.
ANDROID_HOME: ""
ANDROID_NDK_HOME: ""
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: '^1.20'
- name: Set XCode Version
run: sudo xcode-select -switch /Applications/Xcode_13.3.app
- name: Build for Apple platforms
run: cd outline/tun2socks && make apple
android:
name: Android Build
runs-on: ubuntu-22.04
timeout-minutes: 10
needs: test
env:
# Let gomobile choose its preferred NDK version
ANDROID_NDK_HOME: ""
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: '^1.20'
- name: Build Outline Library
run: cd outline/tun2socks && make android
- name: Build Intra Library
run: cd outline/tun2socks && make intra