diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc951df1..ec71318d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: jobs: build: - runs-on: macos-latest + runs-on: macos-13 steps: - name: Checkout uses: actions/checkout@v3 @@ -25,12 +25,15 @@ jobs: - name: Un-tar Frameworks run: | - tar -xzf Frameworks.tgz -C Packages/LibrimeKit + tar -xzf Frameworks.tgz -C Frameworks/.. - name: Build Schemas run: | make schema + - name: Select Xcode + run: sudo xcode-select -s "/Applications/Xcode_15.0.1.app" + - name: Compile run: | xcodebuild archive -archivePath "Hamster" -scheme "Hamster" -sdk "iphoneos" -arch arm64 -configuration Release CODE_SIGNING_ALLOWED=NO diff --git a/.gitignore b/.gitignore index 31e61b4b..861a2c0f 100644 --- a/.gitignore +++ b/.gitignore @@ -20,10 +20,10 @@ xcuserdata/ *.xcscmblueprint *.xccheckout .history -Frameworks/ .HamsterInputSchemas/ .tmp package/ +*.xcframework # VueJS /Packages/HamsterFileServer/Front/node_modules diff --git a/Frameworks/.gitkeep b/Frameworks/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/Hamster.xcodeproj/project.pbxproj b/Hamster.xcodeproj/project.pbxproj index c78d6fe7..ff749c67 100644 --- a/Hamster.xcodeproj/project.pbxproj +++ b/Hamster.xcodeproj/project.pbxproj @@ -272,6 +272,9 @@ C02435722A0490220080CFB4 /* Hamster */ = { isa = PBXGroup; children = ( + C02435972A0490220080CFB4 /* Info.plist */, + C02435962A0490220080CFB4 /* Hamster.entitlements */, + C0D856C92B0213E5003DB275 /* HamsterDebug.entitlements */, C01396F62AB499CA0043674A /* Shortcuts */, C08387EE2A55467900EA8082 /* Assets */, C03319D92A2DFEBB00CE4950 /* AppDelegete.swift */, @@ -359,12 +362,9 @@ C08387EE2A55467900EA8082 /* Assets */ = { isa = PBXGroup; children = ( - C02435972A0490220080CFB4 /* Info.plist */, C03319E12A2E1BEA00CE4950 /* LaunchScreen.storyboard */, C02435932A0490220080CFB4 /* Assets.xcassets */, C02435942A0490220080CFB4 /* Preview Content */, - C02435962A0490220080CFB4 /* Hamster.entitlements */, - C0D856C92B0213E5003DB275 /* HamsterDebug.entitlements */, ); path = Assets; sourceTree = ""; @@ -754,7 +754,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = Hamster/assets/HamsterDebug.entitlements; + CODE_SIGN_ENTITLEMENTS = Hamster/HamsterDebug.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Hamster/Assets/Preview Content\""; @@ -762,7 +762,7 @@ ENABLE_BITCODE = NO; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = Hamster/Assets/Info.plist; + INFOPLIST_FILE = Hamster/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = Hamster; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES; @@ -798,7 +798,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = Hamster/assets/Hamster.entitlements; + CODE_SIGN_ENTITLEMENTS = Hamster/Hamster.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Hamster/Assets/Preview Content\""; @@ -806,7 +806,7 @@ ENABLE_BITCODE = NO; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = Hamster/Assets/Info.plist; + INFOPLIST_FILE = Hamster/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = Hamster; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES; diff --git a/Hamster/Assets/Hamster.entitlements b/Hamster/Hamster.entitlements similarity index 100% rename from Hamster/Assets/Hamster.entitlements rename to Hamster/Hamster.entitlements diff --git a/Hamster/Assets/HamsterDebug.entitlements b/Hamster/HamsterDebug.entitlements similarity index 100% rename from Hamster/Assets/HamsterDebug.entitlements rename to Hamster/HamsterDebug.entitlements diff --git a/Hamster/Assets/Info.plist b/Hamster/Info.plist similarity index 95% rename from Hamster/Assets/Info.plist rename to Hamster/Info.plist index eea3da92..bb44d30a 100644 --- a/Hamster/Assets/Info.plist +++ b/Hamster/Info.plist @@ -68,7 +68,5 @@ rimeVersion 1.9.0 - com.apple.developer.icloud-container-environment - Production diff --git a/ci_scripts/ci_post_clone.sh b/ci_scripts/ci_post_clone.sh index fbfa0981..721cbaa5 100755 --- a/ci_scripts/ci_post_clone.sh +++ b/ci_scripts/ci_post_clone.sh @@ -7,7 +7,7 @@ # set -e -OUTPUT="${CI_PRIMARY_REPOSITORY_PATH}/Packages/RimeKit/Frameworks" +OUTPUT="${CI_PRIMARY_REPOSITORY_PATH}/Frameworks" # 如果存在就不再执行 if [[ -d ${OUTPUT} ]] @@ -16,7 +16,7 @@ then fi # 下载依赖的 librime framework -LibrimeKitVersion="2.0.0" +LibrimeKitVersion="2.3.0" mkdir -p $OUTPUT rm -rf $OUTPUT/*.xcframwork && ( curl -OL https://github.com/imfuxiao/LibrimeKit/releases/download/${LibrimeKitVersion}/Frameworks.tgz @@ -24,18 +24,6 @@ rm -rf $OUTPUT/*.xcframwork && ( rm -rf Frameworks.tgz ) -# debug show framework -ls -la ${OUTPUT} - -# 如果方案存在就不再执行 -OUTPUT="${CI_PRIMARY_REPOSITORY_PATH}/.HamsterInputSchemas" +# 生成 SharedSupport.zip 与 mkdir -p ${CI_PRIMARY_REPOSITORY_PATH}/Resources/SharedSupport -rm -rf $OUTPUT && ( - git clone --depth 1 https://github.com/imfuxiao/HamsterInputSchemas.git -b v2.0 $OUTPUT - cp ${CI_PRIMARY_REPOSITORY_PATH}/Resources/SharedSupport/hamster.yaml $OUTPUT/SharedSupport/ - cd $OUTPUT - make -) && cp $OUTPUT/SharedSupport.zip ${CI_PRIMARY_REPOSITORY_PATH}/Resources/SharedSupport/ - -# debug show Schema -ls -la ${CI_PRIMARY_REPOSITORY_PATH}/Resources/SharedSupport/ +bash ${CI_PRIMARY_REPOSITORY_PATH}/InputSchemaBuild.sh \ No newline at end of file