diff --git a/.github/workflows/macos_export.yml b/.github/workflows/macos_export.yml new file mode 100644 index 0000000..77ed8af --- /dev/null +++ b/.github/workflows/macos_export.yml @@ -0,0 +1,725 @@ +name: MacOS Export + +on: [push] + +env: + CARGO_TERM_COLOR: always + RUSTFLAGS: -Dwarnings + CARGO_INCREMENTAL: 0 + PROJECT_NAME: Godot Spike + WORKING_DIRECTORY: godot + IOS_APPLE_ID_USERNAME: ${{ secrets.IOS_APPLE_ID_USERNAME }} + IOS_APPLE_ID_PASSWORD: ${{ secrets.IOS_APPLE_ID_PASSWORD }} + + BUILD_CERTIFICATE_BASE64: ${{ secrets.IOS_BUILD_CERTIFICATE_BASE64 }} + P12_PASSWORD: ${{ secrets.P12_PASSWORD }} + BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }} + KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} + +jobs: + export-macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: rustfmt, clippy + - uses: rui314/setup-mold@v1 + - uses: chickensoft-games/setup-godot@v1 + name: Setup Godot + with: + version: 4.2.2 + include-templates: true + use-dotnet: false + - uses: Swatinem/rust-cache@v2 + with: + workspaces: "rust -> target" + cache-all-crates: "true" + + - name: Install just + run: cargo install just + + - name: just Check + run: just --version + + - name: Godot Check + run: | + godot --version + + - name: Godot Export + run: | + set -x + touch godot/.godot/extension_list.cfg + echo "res://rust.gdextension" >> godot/.godot/extension_list.cfg + just macos-release + + export-ios: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: rustfmt, clippy + - uses: rui314/setup-mold@v1 + - uses: chickensoft-games/setup-godot@v1 + name: Setup Godot + with: + version: 4.2.2 + include-templates: true + use-dotnet: false + - uses: Swatinem/rust-cache@v2 + with: + workspaces: "rust -> target" + cache-all-crates: "true" + + - name: Install just + run: cargo install just + + - name: just Check + run: just --version + + - name: Godot Check + run: | + godot --version + + - name: Generate dummy Xcode project + run: | + xcodeproj --help + mkdir DummyProject.xcodeproj + touch DummyProject.xcodeproj/project.pbxproj + echo '// !$*UTF8*$! + { + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + + /* Begin PBXBuildFile section */ + 0BC86CC92BF4DC2300501F94 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BC86CC82BF4DC2300501F94 /* AppDelegate.swift */; }; + 0BC86CCB2BF4DC2300501F94 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BC86CCA2BF4DC2300501F94 /* SceneDelegate.swift */; }; + 0BC86CCD2BF4DC2300501F94 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BC86CCC2BF4DC2300501F94 /* ContentView.swift */; }; + 0BC86CCF2BF4DC2500501F94 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0BC86CCE2BF4DC2500501F94 /* Assets.xcassets */; }; + 0BC86CD22BF4DC2500501F94 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0BC86CD12BF4DC2500501F94 /* Preview Assets.xcassets */; }; + 0BC86CD52BF4DC2500501F94 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0BC86CD32BF4DC2500501F94 /* LaunchScreen.storyboard */; }; + 0BC86CE02BF4DC2500501F94 /* DummyProjectTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BC86CDF2BF4DC2500501F94 /* DummyProjectTests.swift */; }; + 0BC86CEB2BF4DC2500501F94 /* DummyProjectUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BC86CEA2BF4DC2500501F94 /* DummyProjectUITests.swift */; }; + /* End PBXBuildFile section */ + + /* Begin PBXContainerItemProxy section */ + 0BC86CDC2BF4DC2500501F94 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0BC86CBD2BF4DC2300501F94 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0BC86CC42BF4DC2300501F94; + remoteInfo = DummyProject; + }; + 0BC86CE72BF4DC2500501F94 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0BC86CBD2BF4DC2300501F94 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0BC86CC42BF4DC2300501F94; + remoteInfo = DummyProject; + }; + /* End PBXContainerItemProxy section */ + + /* Begin PBXFileReference section */ + 0BC86CC52BF4DC2300501F94 /* DummyProject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DummyProject.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 0BC86CC82BF4DC2300501F94 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 0BC86CCA2BF4DC2300501F94 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 0BC86CCC2BF4DC2300501F94 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 0BC86CCE2BF4DC2500501F94 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 0BC86CD12BF4DC2500501F94 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 0BC86CD42BF4DC2500501F94 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 0BC86CD62BF4DC2500501F94 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0BC86CDB2BF4DC2500501F94 /* DummyProjectTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DummyProjectTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 0BC86CDF2BF4DC2500501F94 /* DummyProjectTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DummyProjectTests.swift; sourceTree = ""; }; + 0BC86CE12BF4DC2500501F94 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0BC86CE62BF4DC2500501F94 /* DummyProjectUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DummyProjectUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 0BC86CEA2BF4DC2500501F94 /* DummyProjectUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DummyProjectUITests.swift; sourceTree = ""; }; + 0BC86CEC2BF4DC2500501F94 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + /* End PBXFileReference section */ + + /* Begin PBXFrameworksBuildPhase section */ + 0BC86CC22BF4DC2300501F94 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0BC86CD82BF4DC2500501F94 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0BC86CE32BF4DC2500501F94 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + /* End PBXFrameworksBuildPhase section */ + + /* Begin PBXGroup section */ + 0BC86CBC2BF4DC2300501F94 = { + isa = PBXGroup; + children = ( + 0BC86CC72BF4DC2300501F94 /* DummyProject */, + 0BC86CDE2BF4DC2500501F94 /* DummyProjectTests */, + 0BC86CE92BF4DC2500501F94 /* DummyProjectUITests */, + 0BC86CC62BF4DC2300501F94 /* Products */, + ); + sourceTree = ""; + }; + 0BC86CC62BF4DC2300501F94 /* Products */ = { + isa = PBXGroup; + children = ( + 0BC86CC52BF4DC2300501F94 /* DummyProject.app */, + 0BC86CDB2BF4DC2500501F94 /* DummyProjectTests.xctest */, + 0BC86CE62BF4DC2500501F94 /* DummyProjectUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 0BC86CC72BF4DC2300501F94 /* DummyProject */ = { + isa = PBXGroup; + children = ( + 0BC86CC82BF4DC2300501F94 /* AppDelegate.swift */, + 0BC86CCA2BF4DC2300501F94 /* SceneDelegate.swift */, + 0BC86CCC2BF4DC2300501F94 /* ContentView.swift */, + 0BC86CCE2BF4DC2500501F94 /* Assets.xcassets */, + 0BC86CD32BF4DC2500501F94 /* LaunchScreen.storyboard */, + 0BC86CD62BF4DC2500501F94 /* Info.plist */, + 0BC86CD02BF4DC2500501F94 /* Preview Content */, + ); + path = DummyProject; + sourceTree = ""; + }; + 0BC86CD02BF4DC2500501F94 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 0BC86CD12BF4DC2500501F94 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 0BC86CDE2BF4DC2500501F94 /* DummyProjectTests */ = { + isa = PBXGroup; + children = ( + 0BC86CDF2BF4DC2500501F94 /* DummyProjectTests.swift */, + 0BC86CE12BF4DC2500501F94 /* Info.plist */, + ); + path = DummyProjectTests; + sourceTree = ""; + }; + 0BC86CE92BF4DC2500501F94 /* DummyProjectUITests */ = { + isa = PBXGroup; + children = ( + 0BC86CEA2BF4DC2500501F94 /* DummyProjectUITests.swift */, + 0BC86CEC2BF4DC2500501F94 /* Info.plist */, + ); + path = DummyProjectUITests; + sourceTree = ""; + }; + /* End PBXGroup section */ + + /* Begin PBXNativeTarget section */ + 0BC86CC42BF4DC2300501F94 /* DummyProject */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0BC86CEF2BF4DC2500501F94 /* Build configuration list for PBXNativeTarget "DummyProject" */; + buildPhases = ( + 0BC86CC12BF4DC2300501F94 /* Sources */, + 0BC86CC22BF4DC2300501F94 /* Frameworks */, + 0BC86CC32BF4DC2300501F94 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DummyProject; + productName = DummyProject; + productReference = 0BC86CC52BF4DC2300501F94 /* DummyProject.app */; + productType = "com.apple.product-type.application"; + }; + 0BC86CDA2BF4DC2500501F94 /* DummyProjectTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0BC86CF22BF4DC2500501F94 /* Build configuration list for PBXNativeTarget "DummyProjectTests" */; + buildPhases = ( + 0BC86CD72BF4DC2500501F94 /* Sources */, + 0BC86CD82BF4DC2500501F94 /* Frameworks */, + 0BC86CD92BF4DC2500501F94 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 0BC86CDD2BF4DC2500501F94 /* PBXTargetDependency */, + ); + name = DummyProjectTests; + productName = DummyProjectTests; + productReference = 0BC86CDB2BF4DC2500501F94 /* DummyProjectTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 0BC86CE52BF4DC2500501F94 /* DummyProjectUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0BC86CF52BF4DC2500501F94 /* Build configuration list for PBXNativeTarget "DummyProjectUITests" */; + buildPhases = ( + 0BC86CE22BF4DC2500501F94 /* Sources */, + 0BC86CE32BF4DC2500501F94 /* Frameworks */, + 0BC86CE42BF4DC2500501F94 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 0BC86CE82BF4DC2500501F94 /* PBXTargetDependency */, + ); + name = DummyProjectUITests; + productName = DummyProjectUITests; + productReference = 0BC86CE62BF4DC2500501F94 /* DummyProjectUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; + /* End PBXNativeTarget section */ + + /* Begin PBXProject section */ + 0BC86CBD2BF4DC2300501F94 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1130; + LastUpgradeCheck = 1130; + ORGANIZATIONNAME = "Dorian Percic"; + TargetAttributes = { + 0BC86CC42BF4DC2300501F94 = { + CreatedOnToolsVersion = 11.3.1; + }; + 0BC86CDA2BF4DC2500501F94 = { + CreatedOnToolsVersion = 11.3.1; + TestTargetID = 0BC86CC42BF4DC2300501F94; + }; + 0BC86CE52BF4DC2500501F94 = { + CreatedOnToolsVersion = 11.3.1; + TestTargetID = 0BC86CC42BF4DC2300501F94; + }; + }; + }; + buildConfigurationList = 0BC86CC02BF4DC2300501F94 /* Build configuration list for PBXProject "DummyProject" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 0BC86CBC2BF4DC2300501F94; + productRefGroup = 0BC86CC62BF4DC2300501F94 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 0BC86CC42BF4DC2300501F94 /* DummyProject */, + 0BC86CDA2BF4DC2500501F94 /* DummyProjectTests */, + 0BC86CE52BF4DC2500501F94 /* DummyProjectUITests */, + ); + }; + /* End PBXProject section */ + + /* Begin PBXResourcesBuildPhase section */ + 0BC86CC32BF4DC2300501F94 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0BC86CD52BF4DC2500501F94 /* LaunchScreen.storyboard in Resources */, + 0BC86CD22BF4DC2500501F94 /* Preview Assets.xcassets in Resources */, + 0BC86CCF2BF4DC2500501F94 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0BC86CD92BF4DC2500501F94 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0BC86CE42BF4DC2500501F94 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + /* End PBXResourcesBuildPhase section */ + + /* Begin PBXSourcesBuildPhase section */ + 0BC86CC12BF4DC2300501F94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0BC86CC92BF4DC2300501F94 /* AppDelegate.swift in Sources */, + 0BC86CCB2BF4DC2300501F94 /* SceneDelegate.swift in Sources */, + 0BC86CCD2BF4DC2300501F94 /* ContentView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0BC86CD72BF4DC2500501F94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0BC86CE02BF4DC2500501F94 /* DummyProjectTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0BC86CE22BF4DC2500501F94 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0BC86CEB2BF4DC2500501F94 /* DummyProjectUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + /* End PBXSourcesBuildPhase section */ + + /* Begin PBXTargetDependency section */ + 0BC86CDD2BF4DC2500501F94 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0BC86CC42BF4DC2300501F94 /* DummyProject */; + targetProxy = 0BC86CDC2BF4DC2500501F94 /* PBXContainerItemProxy */; + }; + 0BC86CE82BF4DC2500501F94 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0BC86CC42BF4DC2300501F94 /* DummyProject */; + targetProxy = 0BC86CE72BF4DC2500501F94 /* PBXContainerItemProxy */; + }; + /* End PBXTargetDependency section */ + + /* Begin PBXVariantGroup section */ + 0BC86CD32BF4DC2500501F94 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 0BC86CD42BF4DC2500501F94 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; + /* End PBXVariantGroup section */ + + /* Begin XCBuildConfiguration section */ + 0BC86CED2BF4DC2500501F94 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.2; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 0BC86CEE2BF4DC2500501F94 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.2; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 0BC86CF02BF4DC2500501F94 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"DummyProject/Preview Content\""; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = DummyProject/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = godot.spike.DummyProject; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 0BC86CF12BF4DC2500501F94 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"DummyProject/Preview Content\""; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = DummyProject/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = godot.spike.DummyProject; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 0BC86CF32BF4DC2500501F94 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = DummyProjectTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.2; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = godot.spike.DummyProjectTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DummyProject.app/DummyProject"; + }; + name = Debug; + }; + 0BC86CF42BF4DC2500501F94 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = DummyProjectTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.2; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = godot.spike.DummyProjectTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DummyProject.app/DummyProject"; + }; + name = Release; + }; + 0BC86CF62BF4DC2500501F94 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = DummyProjectUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = godot.spike.DummyProjectUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = DummyProject; + }; + name = Debug; + }; + 0BC86CF72BF4DC2500501F94 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = DummyProjectUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = godot.spike.DummyProjectUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = DummyProject; + }; + name = Release; + }; + /* End XCBuildConfiguration section */ + + /* Begin XCConfigurationList section */ + 0BC86CC02BF4DC2300501F94 /* Build configuration list for PBXProject "DummyProject" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0BC86CED2BF4DC2500501F94 /* Debug */, + 0BC86CEE2BF4DC2500501F94 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0BC86CEF2BF4DC2500501F94 /* Build configuration list for PBXNativeTarget "DummyProject" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0BC86CF02BF4DC2500501F94 /* Debug */, + 0BC86CF12BF4DC2500501F94 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0BC86CF22BF4DC2500501F94 /* Build configuration list for PBXNativeTarget "DummyProjectTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0BC86CF32BF4DC2500501F94 /* Debug */, + 0BC86CF42BF4DC2500501F94 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0BC86CF52BF4DC2500501F94 /* Build configuration list for PBXNativeTarget "DummyProjectUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0BC86CF62BF4DC2500501F94 /* Debug */, + 0BC86CF72BF4DC2500501F94 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + /* End XCConfigurationList section */ + }; + rootObject = 0BC86CBD2BF4DC2300501F94 /* Project object */; + }' > DummyProject.xcodeproj/project.pbxproj + + - name: Godot Export + run: | + set -x + touch godot/.godot/extension_list.cfg + echo "res://rust.gdextension" >> godot/.godot/extension_list.cfg + + # create variables + CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 + PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision + KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db + + # import certificate and provisioning profile from secrets + echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH + echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH + + # create temporary keychain + security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH + security set-keychain-settings -lut 21600 $KEYCHAIN_PATH + security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH + + # import certificate to keychain + security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH + security list-keychain -d user -s $KEYCHAIN_PATH + + # apply provisioning profile + mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles + cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles + ls + cat DummyProject.xcodeproj/project.pbxproj + xcrun xcodebuild -allowProvisioningUpdates -project DummyProject.xcodeproj \ + -scheme DummyProject -destination generic/platform=iOS \ + -authenticationKeyID ${{ secrets.IOS_APPLE_ID_USERNAME }} \ + -authenticationKeyIssuerID ${{ secrets.IOS_APPLE_ID_USERNAME }} + + just setup-ios + just ios-debug diff --git a/export/macos/.gitkeep b/export/macos/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/godot/rust.gdextension b/godot/rust.gdextension index bc7aa54..d78f2ae 100644 --- a/godot/rust.gdextension +++ b/godot/rust.gdextension @@ -12,3 +12,7 @@ android.debug.arm64 = "res://../rust/target/aarch64-linux-android/debug/libgo android.release.arm64 = "res://../rust/target/aarch64-linux-android/release/libgodot_plugin.so" windows.debug.x86_64 = "res://../rust/target/x86_64-pc-windows-msvc/debug/godot_plugin.dll" windows.release.x86_64 = "res://../rust/target/x86_64-pc-windows-msvc/release/godot_plugin.dll" +macos.debug.arm64 = "res://../rust/target/debug/libgodot_plugin.dylib" +macos.release.arm64 = "res://../rust/target/release/libgodot_plugin.dylib" +ios.debug.arm64 = "res://../rust/target/aarch64-apple-ios/debug/libgodot_plugin.dylib" +ios.release.arm64 = "res://../rust/target/aarch64-apple-ios/release/libgodot_plugin.dylib" diff --git a/justfile b/justfile index e30eb0a..d555037 100644 --- a/justfile +++ b/justfile @@ -56,19 +56,20 @@ windows-release: [macos] macos-debug: - {{rustdir}} cargo build + {{rustdir}} cargo build {{godotdir}} godot --headless --export-debug "macOS" "../export/macos/Godot Spike.dmg" [macos] macos-release: - {{rustdir}} cargo build --release - {{godotdir}} godot --headless --export-release "macOS" "../export/macos/Godot Spike.dmg" + {{rustdir}} cargo build + {{rustdir}} cargo build --release + {{godotdir}} godot --headless --export-release "macOS" "../export/macos/Godot Spike.dmg" [macos] ios-debug: - # NOTE: can only work on MacOS with xcode + {{rustdir}} cargo build {{rustdir}} cargo build --target aarch64-apple-ios - {{godotdir}} godot --headless --export-debug "iOS" "../export/ios/Godot Spike.ipa" + {{godotdir}} godot --headless --import --export-debug "iOS" "../export/ios/Godot Spike.ipa" [macos] ios-release: @@ -82,7 +83,6 @@ setup: just _setup-verify-dependencies _setup-precommit _setup-rust setup-{{os()}} # ------------------------------------------------- -# Execute to verify if all dependencies are installed _setup-verify-dependencies: @ {{message}} "Verifying all required programs are installed...\nAll programs need to be in \$PATH!" rustup --version @@ -106,7 +106,7 @@ setup-windows: rustup target add x86_64-pc-windows-gnu [macos] -setup-macos: +setup-ios: @ {{message}} "Installing Rust tools for iOS builds..." rustup target add aarch64-apple-ios cargo install cargo-lipo