Skip to content

Commit

Permalink
use go file and split ios/macos calls
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellacosse committed Dec 11, 2023
1 parent 0c61a37 commit 121147b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build_and_test_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version-file: '${{ github.workspace }}/go.mod'

- name: Build Linux Client
run: npm run action electron/build linux
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version-file: '${{ github.workspace }}/go.mod'

- name: Build Windows Client
run: npm run action electron/build windows
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version-file: '${{ github.workspace }}/go.mod'

- name: Build Tun2Socks (required for Test OutlineAppleLib)
run: npm run action tun2socks/build macos
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version-file: '${{ github.workspace }}/go.mod'

- name: Build Tun2Socks (required for Test OutlineAppleLib)
run: npm run action tun2socks/build ios
Expand Down Expand Up @@ -206,7 +206,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version-file: '${{ github.workspace }}/go.mod'

- name: Build Tun2Socks (required for Test OutlineAppleLib)
run: npm run action tun2socks/build maccatalyst
Expand Down Expand Up @@ -244,7 +244,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version-file: '${{ github.workspace }}/go.mod'

- name: Install Java
uses: actions/[email protected]
Expand Down
13 changes: 12 additions & 1 deletion src/tun2socks/build.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ export async function main(...parameters) {
'github.com/Jigsaw-Code/outline-client/src/tun2socks/outline/shadowsocks'
);
case 'ios' + 'darwin':
return spawnStream(
'gomobile',
'bind',
'-bundleid=org.outline.tun2socks',
'-iosversion=12.0',
`-target=ios,iossimulator`,
`-o=${buildDir}/tun2socks.xcframework`,

'github.com/Jigsaw-Code/outline-client/src/tun2socks/outline/tun2socks',
'github.com/Jigsaw-Code/outline-client/src/tun2socks/outline/shadowsocks'
);
case 'macos' + 'darwin':
case 'maccatalyst' + 'darwin':
process.env.MACOSX_DEPLOYMENT_TARGET = '10.14';
Expand All @@ -76,7 +87,7 @@ export async function main(...parameters) {
'bind',
'-bundleid=org.outline.tun2socks',
'-iosversion=13.1',
`-target=ios,iossimulator,macos,maccatalyst`,
`-target=macos,maccatalyst`,
`-o=${buildDir}/tun2socks.xcframework`,

'github.com/Jigsaw-Code/outline-client/src/tun2socks/outline/tun2socks',
Expand Down

0 comments on commit 121147b

Please sign in to comment.