Skip to content

Commit

Permalink
Miscellaneous Updates
Browse files Browse the repository at this point in the history
* Update to macOS 14 & Xcode 15.2
* Copy `rime_api.h` from librime
* Update Boost to 1.84.0, Build `regex` Only (Per TypeDuck-HK/librime@1a25326)
* Change `marisa` CMake Path
* Reuse `marisa` on building `opencc`
* Update `@actions/upload-artifact` to v4
  • Loading branch information
graphemecluster committed Mar 31, 2024
1 parent 3c37d5c commit 0448762
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 649 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
build:
runs-on: macos-13
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -21,7 +21,7 @@ jobs:
submodules: recursive

- name: Select Xcode version
run: sudo xcode-select -s /Applications/Xcode_15.1.app/Contents/Developer
run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer

- name: Build
run: |
Expand All @@ -32,7 +32,7 @@ jobs:
./build-ios.sh ../librime all
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: |
librime-ios-build/output/Rime.xcframework
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
src/Headers
build
output
.DS_Store
7 changes: 5 additions & 2 deletions build-ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

export SCRIPT_DIR=$(dirname $(realpath $0))

export BOOST_VERSION=1.83.0
export BOOST_VERSION=1.84.0
export THREADS="-j$(sysctl -n hw.ncpu)"

export BUILD_DIR="$PWD/build"
Expand Down Expand Up @@ -44,7 +44,7 @@ build_boost() {
fi

echo "Building Boost..."
export BOOST_LIBS="filesystem regex system"
export BOOST_LIBS="regex"

rm -rf $BUILD_BOOST_DIR || true
mkdir -p $BUILD_BOOST_DIR
Expand Down Expand Up @@ -212,6 +212,9 @@ build_xcframework() {
fi
}

mkdir -p src/Headers
cp $RIME_ROOT/src/rime_api.h src/Headers

mkdir -p "$OUTPUT_DIR"

if [ "$2" == "all" ]; then
Expand Down
8 changes: 5 additions & 3 deletions ios-thirdparty.mk
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,20 @@ leveldb:

marisa:
cd $(SRC_DIR)/marisa-trie; \
$(XC_FLAGS) cmake $(SRC_DIR) -B$(BUILD_DIR)/marisa-trie \
$(XC_FLAGS) cmake . -B$(BUILD_DIR)/marisa-trie \
-DCMAKE_OSX_SYSROOT=$(SDKROOT) \
-DCMAKE_BUILD_TYPE:STRING="Release" \
-DCMAKE_INSTALL_PREFIX:PATH="$(INSTALL_DIR)" \
&& cmake --build $(BUILD_DIR)/marisa-trie --target install

opencc:
echo UFO $(OPENCC_DICT_BIN)
opencc: marisa
cd $(SRC_DIR)/opencc; \
$(XC_FLAGS) cmake . -B$(BUILD_DIR)/opencc \
-DCMAKE_OSX_SYSROOT=$(SDKROOT) \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DBUILD_TESTING:BOOL=OFF \
-DUSE_SYSTEM_MARISA:BOOL=ON \
-Dmarisa_DIR="$(SRC_DIR)/marisa-trie/include" \
-DCMAKE_BUILD_TYPE:STRING="Release" \
-DCMAKE_INSTALL_PREFIX:PATH="$(INSTALL_DIR)" \
&& cmake --build $(BUILD_DIR)/opencc --target install
Expand Down
Loading

0 comments on commit 0448762

Please sign in to comment.