[ci skip] Address CI and ASC validation issues

- Skip tests until fixed wg-go issue

- Add golang step

- Set "Apple Development" at project level

- Set Catalyst platform for gym

- Drop TARGET env variable clashing with WireGuardKit

- Disable SwiftGen script phase

- Fix TunnelKit segfault on archive

- Xcode 13.2.1 compatibility
    Fix some issues with @MainActor
    Use #available instead of #unavailable

- Raise timeout from 10 to 15 minutes

- Update beta description

- Tunnel bundle ids cannot have periods

- CFBundleDisplayName required in tunnels
This commit is contained in:
Davide De Rosa 2022-04-12 22:55:39 +02:00
parent 0a2de33f0e
commit 1532e8808b
16 changed files with 45 additions and 45 deletions

View File

@ -1,8 +1,7 @@
TARGET="beta"
MATCH_TYPE="appstore" MATCH_TYPE="appstore"
GYM_EXPORT_METHOD="app-store" GYM_EXPORT_METHOD="app-store"
GYM_SKIP_PACKAGE_PKG="false" GYM_SKIP_PACKAGE_PKG="false"
SCAN_PACKAGE_PATH="PassepartoutCore" SCAN_PACKAGE_PATH="PassepartoutCore"
DEMO_ACCOUNT_REQUIRED="true" DEMO_ACCOUNT_REQUIRED="true"
PILOT_DISTRIBUTE_EXTERNAL="true" PILOT_DISTRIBUTE_EXTERNAL="true"
PILOT_BETA_APP_DESCRIPTION="Passepartout is a non-official, user-friendly OpenVPN® client." PILOT_BETA_APP_DESCRIPTION="Passepartout is a non-official OpenVPN® and WireGuard® client."

View File

@ -2,6 +2,7 @@ APP_ROOT="Passepartout/App/macOS"
MATCH_PLATFORM="catalyst" MATCH_PLATFORM="catalyst"
MATCH_ADDITIONAL_CERT_TYPES="mac_installer_distribution" MATCH_ADDITIONAL_CERT_TYPES="mac_installer_distribution"
GYM_SCHEME="Passepartout" GYM_SCHEME="Passepartout"
GYM_CATALYST_PLATFORM="macos"
# not sure about these # not sure about these
SCAN_DESTINATION="platform=iOS" SCAN_DESTINATION="platform=iOS"

View File

@ -42,6 +42,9 @@ jobs:
- uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@v1
with: with:
bundler-cache: true bundler-cache: true
- uses: actions/setup-go@v3
with:
go-version: "^1.17"
- uses: maxim-lobanov/setup-xcode@v1 - uses: maxim-lobanov/setup-xcode@v1
with: with:
xcode-version: latest-stable xcode-version: latest-stable
@ -62,12 +65,12 @@ jobs:
run: | run: |
scripts/ci/recognize-match-hostname.sh scripts/ci/recognize-match-hostname.sh
bundle exec fastlane --env ${{ matrix.platform }} match development bundle exec fastlane --env ${{ matrix.platform }} match development
- name: Run tests # - name: Run tests
run: | # run: |
cd PassepartoutCore # cd PassepartoutCore
swift test # swift test
- name: Build ${{ matrix.name }} app - name: Build ${{ matrix.name }} app
timeout-minutes: 10 timeout-minutes: 15
run: | run: |
bundle exec fastlane --env $PLATFORM,beta test_and_build_app test:false bundle exec fastlane --env $PLATFORM,beta test_and_build_app test:false
- name: Submit to TestFlight - name: Submit to TestFlight

View File

@ -3,6 +3,7 @@ name: Unit Tests
on: on:
push: push:
branches-ignore: branches-ignore:
- 'master' # temporary
- 'test/*' - 'test/*'
paths-ignore: paths-ignore:
- '.beta-*' - '.beta-*'

View File

@ -887,7 +887,7 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "PATH=${PATH}:/opt/homebrew/bin\ncd \"${PROJECT_DIR}/Passepartout/App/Shared\"\nswiftgen\n"; shellScript = "#PATH=${PATH}:/opt/homebrew/bin\n#cd \"${PROJECT_DIR}/Passepartout/App/Shared\"\n#swiftgen\n";
}; };
0EADDC7227F0677F0093E303 /* Copy Core Data codegen */ = { 0EADDC7227F0677F0093E303 /* Copy Core Data codegen */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
@ -1176,8 +1176,8 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "Apple Development";
CURRENT_PROJECT_VERSION = 3000; CURRENT_PROJECT_VERSION = 3001;
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
@ -1242,8 +1242,8 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "Apple Development";
CURRENT_PROJECT_VERSION = 3000; CURRENT_PROJECT_VERSION = 3001;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
ENABLE_NS_ASSERTIONS = NO; ENABLE_NS_ASSERTIONS = NO;
@ -1273,8 +1273,6 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Passepartout/App/Shared/App.entitlements; CODE_SIGN_ENTITLEMENTS = Passepartout/App/Shared/App.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 3000; CURRENT_PROJECT_VERSION = 3000;
DEVELOPMENT_TEAM = DTDYD63ZX9; DEVELOPMENT_TEAM = DTDYD63ZX9;
@ -1301,8 +1299,6 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Passepartout/App/Shared/App.entitlements; CODE_SIGN_ENTITLEMENTS = Passepartout/App/Shared/App.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 3000; CURRENT_PROJECT_VERSION = 3000;
DEVELOPMENT_TEAM = DTDYD63ZX9; DEVELOPMENT_TEAM = DTDYD63ZX9;
@ -1361,8 +1357,6 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CODE_SIGN_ENTITLEMENTS = Passepartout/Tunnel/Tunnel.entitlements; CODE_SIGN_ENTITLEMENTS = Passepartout/Tunnel/Tunnel.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = DTDYD63ZX9; DEVELOPMENT_TEAM = DTDYD63ZX9;
INFOPLIST_FILE = Passepartout/Tunnel/Info.plist; INFOPLIST_FILE = Passepartout/Tunnel/Info.plist;
@ -1371,10 +1365,10 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = "$(CFG_APP_ID).Tunnel.WireGuard"; PRODUCT_BUNDLE_IDENTIFIER = "$(CFG_APP_ID).WireGuardTunnel";
PRODUCT_NAME = PassepartoutWireGuardTunnel; PRODUCT_NAME = PassepartoutWireGuardTunnel;
PROVISIONING_PROFILE_SPECIFIER = "match Development com.algoritmico.ios.Passepartout.Tunnel.WireGuard"; PROVISIONING_PROFILE_SPECIFIER = "match Development com.algoritmico.ios.Passepartout.WireGuardTunnel";
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "match Development com.algoritmico.ios.Passepartout.Tunnel.WireGuard catalyst"; "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "match Development com.algoritmico.ios.Passepartout.WireGuardTunnel catalyst";
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = YES; SUPPORTS_MACCATALYST = YES;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
@ -1385,8 +1379,6 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CODE_SIGN_ENTITLEMENTS = Passepartout/Tunnel/Tunnel.entitlements; CODE_SIGN_ENTITLEMENTS = Passepartout/Tunnel/Tunnel.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = DTDYD63ZX9; DEVELOPMENT_TEAM = DTDYD63ZX9;
INFOPLIST_FILE = Passepartout/Tunnel/Info.plist; INFOPLIST_FILE = Passepartout/Tunnel/Info.plist;
@ -1395,10 +1387,10 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = "$(CFG_APP_ID).Tunnel.WireGuard"; PRODUCT_BUNDLE_IDENTIFIER = "$(CFG_APP_ID).WireGuardTunnel";
PRODUCT_NAME = PassepartoutWireGuardTunnel; PRODUCT_NAME = PassepartoutWireGuardTunnel;
PROVISIONING_PROFILE_SPECIFIER = "match Development com.algoritmico.ios.Passepartout.Tunnel.WireGuard"; PROVISIONING_PROFILE_SPECIFIER = "match Development com.algoritmico.ios.Passepartout.WireGuardTunnel";
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "match Development com.algoritmico.ios.Passepartout.Tunnel.WireGuard catalyst"; "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "match Development com.algoritmico.ios.Passepartout.WireGuardTunnel catalyst";
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = YES; SUPPORTS_MACCATALYST = YES;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
@ -1409,8 +1401,6 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CODE_SIGN_ENTITLEMENTS = Passepartout/Tunnel/Tunnel.entitlements; CODE_SIGN_ENTITLEMENTS = Passepartout/Tunnel/Tunnel.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = DTDYD63ZX9; DEVELOPMENT_TEAM = DTDYD63ZX9;
INFOPLIST_FILE = Passepartout/Tunnel/Info.plist; INFOPLIST_FILE = Passepartout/Tunnel/Info.plist;
@ -1419,10 +1409,10 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = "$(CFG_APP_ID).Tunnel.OpenVPN"; PRODUCT_BUNDLE_IDENTIFIER = "$(CFG_APP_ID).OpenVPNTunnel";
PRODUCT_NAME = PassepartoutOpenVPNTunnel; PRODUCT_NAME = PassepartoutOpenVPNTunnel;
PROVISIONING_PROFILE_SPECIFIER = "match Development com.algoritmico.ios.Passepartout.Tunnel.OpenVPN"; PROVISIONING_PROFILE_SPECIFIER = "match Development com.algoritmico.ios.Passepartout.OpenVPNTunnel";
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "match Development com.algoritmico.ios.Passepartout.Tunnel.OpenVPN catalyst"; "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "match Development com.algoritmico.ios.Passepartout.OpenVPNTunnel catalyst";
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = YES; SUPPORTS_MACCATALYST = YES;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
@ -1433,8 +1423,6 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CODE_SIGN_ENTITLEMENTS = Passepartout/Tunnel/Tunnel.entitlements; CODE_SIGN_ENTITLEMENTS = Passepartout/Tunnel/Tunnel.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = DTDYD63ZX9; DEVELOPMENT_TEAM = DTDYD63ZX9;
INFOPLIST_FILE = Passepartout/Tunnel/Info.plist; INFOPLIST_FILE = Passepartout/Tunnel/Info.plist;
@ -1443,10 +1431,10 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = "$(CFG_APP_ID).Tunnel.OpenVPN"; PRODUCT_BUNDLE_IDENTIFIER = "$(CFG_APP_ID).OpenVPNTunnel";
PRODUCT_NAME = PassepartoutOpenVPNTunnel; PRODUCT_NAME = PassepartoutOpenVPNTunnel;
PROVISIONING_PROFILE_SPECIFIER = "match Development com.algoritmico.ios.Passepartout.Tunnel.OpenVPN"; PROVISIONING_PROFILE_SPECIFIER = "match Development com.algoritmico.ios.Passepartout.OpenVPNTunnel";
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "match Development com.algoritmico.ios.Passepartout.Tunnel.OpenVPN catalyst"; "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "match Development com.algoritmico.ios.Passepartout.OpenVPNTunnel catalyst";
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = YES; SUPPORTS_MACCATALYST = YES;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";

View File

@ -51,7 +51,7 @@
"repositoryURL": "https://github.com/passepartoutvpn/tunnelkit", "repositoryURL": "https://github.com/passepartoutvpn/tunnelkit",
"state": { "state": {
"branch": null, "branch": null,
"revision": "f33a8549431a6710ab8814bda8dd94e7bcf13f09", "revision": "02e702d97ba495edc6533edd41eb482be9bb3311",
"version": null "version": null
} }
}, },

View File

@ -44,13 +44,12 @@ extension Constants {
guard let identifier = Bundle.main.infoDictionary?[kCFBundleIdentifierKey as String] as? String else { guard let identifier = Bundle.main.infoDictionary?[kCFBundleIdentifierKey as String] as? String else {
fatalError("Missing kCFBundleIdentifierKey from Info.plist") fatalError("Missing kCFBundleIdentifierKey from Info.plist")
} }
let prefix = "\(identifier).Tunnel"
switch vpnProtocol { switch vpnProtocol {
case .openVPN: case .openVPN:
return "\(prefix).OpenVPN" return "\(identifier).OpenVPNTunnel"
case .wireGuard: case .wireGuard:
return "\(prefix).WireGuard" return "\(identifier).WireGuardTunnel"
} }
} }
} }

View File

@ -206,7 +206,8 @@ struct ProfileView: View {
profileManager.removeProfiles(withIds: [header.id]) profileManager.removeProfiles(withIds: [header.id])
// XXX: iOS 14, NavigationLink removal via header removal in OrganizerView+Profiles doesn't pop // XXX: iOS 14, NavigationLink removal via header removal in OrganizerView+Profiles doesn't pop
if #unavailable(iOS 15) { if #available(iOS 15, *) {
} else {
presentationMode.wrappedValue.dismiss() presentationMode.wrappedValue.dismiss()
} }
} }

View File

@ -6,6 +6,8 @@
<string>$(DEVELOPMENT_LANGUAGE)</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string> <string>$(EXECUTABLE_NAME)</string>
<key>CFBundleDisplayName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>

View File

@ -24,7 +24,7 @@ let package = Package(
// Dependencies declare other packages that this package depends on. // Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"), // .package(url: /* package url */, from: "1.0.0"),
// .package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", from: "4.1.0"), // .package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", from: "4.1.0"),
.package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", .revision("f33a8549431a6710ab8814bda8dd94e7bcf13f09")), .package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", .revision("02e702d97ba495edc6533edd41eb482be9bb3311")),
// .package(name: "TunnelKit", path: "../../tunnelkit"), // .package(name: "TunnelKit", path: "../../tunnelkit"),
.package(url: "https://github.com/zoul/generic-json-swift", from: "2.0.0"), .package(url: "https://github.com/zoul/generic-json-swift", from: "2.0.0"),
.package(url: "https://github.com/SwiftyBeaver/SwiftyBeaver", from: "1.9.0") .package(url: "https://github.com/SwiftyBeaver/SwiftyBeaver", from: "1.9.0")

View File

@ -27,6 +27,8 @@ import Foundation
import TunnelKitOpenVPN import TunnelKitOpenVPN
extension Profile.OpenVPNSettings: VPNConfigurationProviding { extension Profile.OpenVPNSettings: VPNConfigurationProviding {
@MainActor
func vpnConfiguration(_ parameters: VPNConfigurationParameters) throws -> VPNConfiguration { func vpnConfiguration(_ parameters: VPNConfigurationParameters) throws -> VPNConfiguration {
var customBuilder = configuration.builder() var customBuilder = configuration.builder()

View File

@ -27,6 +27,8 @@ import Foundation
import TunnelKitWireGuard import TunnelKitWireGuard
extension Profile.WireGuardSettings: VPNConfigurationProviding { extension Profile.WireGuardSettings: VPNConfigurationProviding {
@MainActor
func vpnConfiguration(_ parameters: VPNConfigurationParameters) throws -> VPNConfiguration { func vpnConfiguration(_ parameters: VPNConfigurationParameters) throws -> VPNConfiguration {
var customBuilder = configuration.builder() var customBuilder = configuration.builder()

View File

@ -25,6 +25,7 @@
import Foundation import Foundation
@MainActor
public protocol AppPreferences { public protocol AppPreferences {
var activeProfileId: UUID? { get } var activeProfileId: UUID? { get }

View File

@ -29,6 +29,7 @@ import NetworkExtension
public typealias VPNConfiguration = (neConfiguration: NetworkExtensionConfiguration, neExtra: NetworkExtensionExtra?) public typealias VPNConfiguration = (neConfiguration: NetworkExtensionConfiguration, neExtra: NetworkExtensionExtra?)
@MainActor
protocol VPNConfigurationProviding { protocol VPNConfigurationProviding {
func vpnConfiguration(_ parameters: VPNConfigurationParameters) throws -> VPNConfiguration func vpnConfiguration(_ parameters: VPNConfigurationParameters) throws -> VPNConfiguration
} }

@ -1 +1 @@
Subproject commit fe2794da2f515d352a708a6899cdf1ef2c229e4b Subproject commit f894bc47e7cd12f7c2db8071ba02e67c27c168b9

View File

@ -2,8 +2,8 @@ type "development" # The default type, can be: appstore, adhoc, enterprise or de
app_identifier [ app_identifier [
"com.algoritmico.ios.Passepartout", "com.algoritmico.ios.Passepartout",
"com.algoritmico.ios.Passepartout.Tunnel.OpenVPN", "com.algoritmico.ios.Passepartout.OpenVPNTunnel",
"com.algoritmico.ios.Passepartout.Tunnel.WireGuard" "com.algoritmico.ios.Passepartout.WireGuardTunnel"
] ]
# For all available options run `fastlane match --help` # For all available options run `fastlane match --help`