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), Fix Boost Path
* Change `marisa` CMake Path
* Update `@actions/upload-artifact` to v4
  • Loading branch information
graphemecluster committed Mar 31, 2024
1 parent 3c37d5c commit a3b4c6b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 648 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
9 changes: 6 additions & 3 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 @@ -154,7 +154,7 @@ build_librime() {
-DCMAKE_FIND_ROOT_PATH="$OUTPUT_THIRDPARTY_DIR/$PLAT_ARCH" \
-DCMAKE_INSTALL_PREFIX="$OUTPUT_LIBRIME_DIR/$PLAT_ARCH" \
-DBoost_NO_BOOST_CMAKE=TRUE \
-DBOOST_ROOT="$OUTPUT_BOOST_DIR/$PLAT_ARCH" \
-DBoost_ROOT="$OUTPUT_BOOST_DIR/$PLAT_ARCH" \
-DCMAKE_TOOLCHAIN_FILE=$CMAKE_IOS_TOOLCHAIN_ROOT/ios.toolchain.cmake \
-DPLATFORM=$PLATFORM \
-DDEPLOYMENT_TARGET=$DEPLOYMENT_TARGET \
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
2 changes: 1 addition & 1 deletion ios-thirdparty.mk
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ 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)" \
Expand Down
Loading

0 comments on commit a3b4c6b

Please sign in to comment.