Skip to content

Commit

Permalink
chore: ci configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
imfuxiao committed Dec 2, 2023
1 parent 4a733dd commit 43e4320
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 28 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build:
runs-on: macos-latest
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ xcuserdata/
*.xcscmblueprint
*.xccheckout
.history
Frameworks/
.HamsterInputSchemas/
.tmp
package/
*.xcframework

# VueJS
/Packages/HamsterFileServer/Front/node_modules
Expand Down
Empty file added Frameworks/.gitkeep
Empty file.
14 changes: 7 additions & 7 deletions Hamster.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */,
Expand Down Expand Up @@ -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 = "<group>";
Expand Down Expand Up @@ -754,15 +754,15 @@
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\"";
DEVELOPMENT_TEAM = M4N6995A28;
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;
Expand Down Expand Up @@ -798,15 +798,15 @@
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\"";
DEVELOPMENT_TEAM = M4N6995A28;
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;
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions Hamster/Assets/Info.plist → Hamster/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,5 @@
<true/>
<key>rimeVersion</key>
<string>1.9.0</string>
<key>com.apple.developer.icloud-container-environment</key>
<string>Production</string>
</dict>
</plist>
20 changes: 4 additions & 16 deletions ci_scripts/ci_post_clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
set -e

OUTPUT="${CI_PRIMARY_REPOSITORY_PATH}/Packages/RimeKit/Frameworks"
OUTPUT="${CI_PRIMARY_REPOSITORY_PATH}/Frameworks"

# 如果存在就不再执行
if [[ -d ${OUTPUT} ]]
Expand All @@ -16,26 +16,14 @@ 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
tar -zxf Frameworks.tgz -C ${OUTPUT}/..
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

0 comments on commit 43e4320

Please sign in to comment.