Add tvOS (Apple TV) support for NetBird VPN client #68
This file contains hidden or 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: Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Build and Test | |
| 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@latest | |
| - 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>IS_SIGNIN_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: Run Tests | |
| working-directory: ios-client | |
| run: | | |
| set -o pipefail | |
| xcodebuild test \ | |
| -project NetBird.xcodeproj \ | |
| -scheme NetBird \ | |
| -destination 'platform=iOS Simulator,name=iPhone 16' \ | |
| -configuration Debug \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| 2>&1 | tee test-output.log | xcpretty --color --test | |
| - name: Upload test logs on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-logs | |
| path: ios-client/test-output.log | |
| - name: Find and upload crash logs | |
| if: failure() | |
| run: | | |
| echo "=== Searching for crash logs ===" | |
| find ~/Library/Logs/DiagnosticReports -name "*.crash" -mmin -10 -exec echo "Found: {}" \; -exec cat {} \; || echo "No crash logs found" | |
| - name: Upload crash reports | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: crash-reports | |
| path: ~/Library/Logs/DiagnosticReports/*.crash | |
| if-no-files-found: ignore |