mirror of
https://github.com/netbirdio/ios-client.git
synced 2026-09-23 09:28:33 -07:00
234 lines
6.9 KiB
YAML
234 lines
6.9 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
build_ios:
|
|
name: Build iOS App
|
|
runs-on: macos-15
|
|
|
|
steps:
|
|
- name: Select Xcode 26.1.1
|
|
run: sudo xcode-select -s /Applications/Xcode_26.1.1.app/Contents/Developer
|
|
|
|
- name: Checkout ios-client
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: ios-client
|
|
|
|
- name: Checkout netbird
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: netbirdio/netbird
|
|
path: netbird
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.24'
|
|
cache-dependency-path: netbird/go.sum
|
|
|
|
- name: Install gomobile
|
|
run: go install golang.org/x/mobile/cmd/gomobile@v0.0.0-20251113184115-a159579294ab
|
|
|
|
- name: Build NetBirdSDK xcframework
|
|
working-directory: ios-client
|
|
run: ./build-go-lib.sh ../netbird
|
|
|
|
- name: Install xcpretty
|
|
working-directory: ios-client
|
|
run: gem install xcpretty
|
|
|
|
- name: Create dummy GoogleService-Info.plist
|
|
working-directory: ios-client
|
|
run: |
|
|
cat > GoogleService-Info.plist << 'EOF'
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>CLIENT_ID</key>
|
|
<string>dummy</string>
|
|
<key>REVERSED_CLIENT_ID</key>
|
|
<string>dummy</string>
|
|
<key>API_KEY</key>
|
|
<string>dummy</string>
|
|
<key>GCM_SENDER_ID</key>
|
|
<string>dummy</string>
|
|
<key>PLIST_VERSION</key>
|
|
<string>1</string>
|
|
<key>BUNDLE_ID</key>
|
|
<string>io.netbird.app</string>
|
|
<key>PROJECT_ID</key>
|
|
<string>dummy</string>
|
|
<key>STORAGE_BUCKET</key>
|
|
<string>dummy</string>
|
|
<key>IS_ADS_ENABLED</key>
|
|
<false/>
|
|
<key>IS_ANALYTICS_ENABLED</key>
|
|
<false/>
|
|
<key>IS_APPINVITE_ENABLED</key>
|
|
<false/>
|
|
<key>IS_GCM_ENABLED</key>
|
|
<false/>
|
|
<key>GOOGLE_APP_ID</key>
|
|
<string>dummy</string>
|
|
</dict>
|
|
</plist>
|
|
EOF
|
|
|
|
- name: Resolve Swift packages
|
|
working-directory: ios-client
|
|
run: |
|
|
xcodebuild -resolvePackageDependencies \
|
|
-project NetBird.xcodeproj \
|
|
-scheme NetBird
|
|
|
|
- name: Build iOS App
|
|
working-directory: ios-client
|
|
run: |
|
|
set -o pipefail
|
|
xcodebuild build \
|
|
-project NetBird.xcodeproj \
|
|
-scheme NetBird \
|
|
-destination 'generic/platform=iOS' \
|
|
-configuration Debug \
|
|
CODE_SIGNING_ALLOWED=NO \
|
|
CODE_SIGNING_REQUIRED=NO \
|
|
CODE_SIGN_IDENTITY="" \
|
|
| xcpretty --color
|
|
|
|
- name: Build Network Extension
|
|
working-directory: ios-client
|
|
run: |
|
|
set -o pipefail
|
|
xcodebuild build \
|
|
-project NetBird.xcodeproj \
|
|
-scheme NetbirdNetworkExtension \
|
|
-destination 'generic/platform=iOS' \
|
|
-configuration Debug \
|
|
CODE_SIGNING_ALLOWED=NO \
|
|
CODE_SIGNING_REQUIRED=NO \
|
|
CODE_SIGN_IDENTITY="" \
|
|
| xcpretty --color
|
|
|
|
build_tvos:
|
|
name: Build tvOS App
|
|
runs-on: macos-15
|
|
|
|
steps:
|
|
- name: Select Xcode 26.1.1
|
|
run: sudo xcode-select -s /Applications/Xcode_26.1.1.app/Contents/Developer
|
|
|
|
- name: Checkout ios-client
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: ios-client
|
|
|
|
- name: Checkout netbird
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: netbirdio/netbird
|
|
path: netbird
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.24'
|
|
cache-dependency-path: netbird/go.sum
|
|
|
|
- name: Install gomobile-netbird
|
|
run: GOPROXY=direct go install github.com/netbirdio/gomobile-tvos-fork/cmd/gomobile-netbird@latest
|
|
|
|
- name: Add gomobile-tvos-fork to netbird dependencies
|
|
working-directory: netbird
|
|
run: go get github.com/netbirdio/gomobile-tvos-fork@latest
|
|
|
|
- name: Build NetBirdSDK xcframework
|
|
working-directory: ios-client
|
|
run: ./build-go-lib-tv.sh ../netbird
|
|
|
|
- name: Install xcpretty
|
|
working-directory: ios-client
|
|
run: gem install xcpretty
|
|
|
|
- name: Create dummy GoogleService-Info.plist
|
|
working-directory: ios-client
|
|
run: |
|
|
cat > GoogleService-Info.plist << 'EOF'
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>CLIENT_ID</key>
|
|
<string>dummy</string>
|
|
<key>REVERSED_CLIENT_ID</key>
|
|
<string>dummy</string>
|
|
<key>API_KEY</key>
|
|
<string>dummy</string>
|
|
<key>GCM_SENDER_ID</key>
|
|
<string>dummy</string>
|
|
<key>PLIST_VERSION</key>
|
|
<string>1</string>
|
|
<key>BUNDLE_ID</key>
|
|
<string>io.netbird.app</string>
|
|
<key>PROJECT_ID</key>
|
|
<string>dummy</string>
|
|
<key>STORAGE_BUCKET</key>
|
|
<string>dummy</string>
|
|
<key>IS_ADS_ENABLED</key>
|
|
<false/>
|
|
<key>IS_ANALYTICS_ENABLED</key>
|
|
<false/>
|
|
<key>IS_APPINVITE_ENABLED</key>
|
|
<false/>
|
|
<key>IS_GCM_ENABLED</key>
|
|
<false/>
|
|
<key>GOOGLE_APP_ID</key>
|
|
<string>dummy</string>
|
|
</dict>
|
|
</plist>
|
|
EOF
|
|
|
|
- name: Resolve Swift packages
|
|
working-directory: ios-client
|
|
run: |
|
|
xcodebuild -resolvePackageDependencies \
|
|
-project NetBird.xcodeproj \
|
|
-scheme NetBird
|
|
|
|
- name: Build tvOS App
|
|
working-directory: ios-client
|
|
run: |
|
|
set -o pipefail
|
|
xcodebuild build \
|
|
-project NetBird.xcodeproj \
|
|
-scheme NetBird \
|
|
-destination 'generic/platform=tvOS' \
|
|
-configuration Debug \
|
|
CODE_SIGNING_ALLOWED=NO \
|
|
CODE_SIGNING_REQUIRED=NO \
|
|
CODE_SIGN_IDENTITY="" \
|
|
| xcpretty --color
|
|
|
|
- name: Build tvOS Network Extension
|
|
working-directory: ios-client
|
|
run: |
|
|
set -o pipefail
|
|
xcodebuild build \
|
|
-project NetBird.xcodeproj \
|
|
-scheme NetbirdNetworkExtension \
|
|
-destination 'generic/platform=tvOS' \
|
|
-configuration Debug \
|
|
CODE_SIGNING_ALLOWED=NO \
|
|
CODE_SIGNING_REQUIRED=NO \
|
|
CODE_SIGN_IDENTITY="" \
|
|
| xcpretty --color
|