Skip to content

Commit

Permalink
Merge branch 'master' into feat/ndk-new-toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
rocka committed Jan 18, 2025
2 parents d6049c8 + 023caf0 commit 953aadd
Show file tree
Hide file tree
Showing 53 changed files with 2,465 additions and 226 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,31 @@ jobs:
run: |
pacman -Syu --needed --noconfirm \
git unzip ghc cabal-install haskell-shake haskell-aeson-pretty \
cmake extra-cmake-modules ninja fmt fcitx5 boost python opencc jdk17-openjdk check
cmake extra-cmake-modules ninja fmt fcitx5 boost python opencc jre-openjdk gperf
- name: Fetch source code
uses: actions/checkout@v4
with:
submodules: recursive
# this only sync submodules specified in .gitmodules,
# because we don't want recursive submodules in glog, librime, etc.
submodules: true

- name: Setup Android SDK
uses: android-actions/setup-android@v2

- name: Install NDK and CMake
- name: Fetch submodules
run: |
sdkmanager --install "ndk;${{ env.NDK_VERSION }}"
sdkmanager --install "cmake;${{ env.CMAKE_VERSION }}"
# it appears to be a bug when building in containers: https://github.com/actions/checkout/issues/915
git config --global --add safe.directory '*'
# fetch libime submodule kenlm since it's not in .gitmodules
git submodule update --init --recursive libime
- name: Setup Android NDK
uses: android-actions/setup-android@v3
with:
packages: "ndk;${{ env.NDK_VERSION }} cmake;${{ env.CMAKE_VERSION }}"

- name: Build everything
env:
LANG: "C.UTF-8"
ANDROID_NDK_ROOT: ${{ env.ANDROID_HOME }}/ndk/${{ env.NDK_VERSION }}
run: |
git config --global --add safe.directory '*'
# use archlinux's dynamic only ghc
cabal configure --disable-library-vanilla --enable-shared --enable-executable-dynamic --ghc-options=-dynamic
./build-cabal -j everything
Expand All @@ -58,7 +62,7 @@ jobs:
- name: Upload prebuilt to artifact
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: build/prebuilt.tar.zst

Expand All @@ -75,14 +79,14 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
working-directory: prebuilt
run: |
rm -r ./*
for TARGET in $(<../build/artifacts.txt)
do
rm -r "./$TARGET"
cp -a "../build/$TARGET" ./
done
git remote set-url origin "https://${{ secrets.BOT_TOKEN }}@github.com/fcitx5-android/prebuilt.git"
git config user.name "Fcitx5 Android Bot"
git config user.email "102923727+android-fcitx5@users.noreply.github.com"
git config user.email "102923727+fcitx5-android-bot@users.noreply.github.com"
git add .
git diff-index --quiet HEAD || git commit -m "Auto update"
git push --set-upstream origin "HEAD:master" --follow-tags --atomic
19 changes: 14 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
[submodule "fmt"]
path = fmt
url = https://github.com/fmtlib/fmt
ignore = untracked
[submodule "libuv"]
path = libuv
url = https://github.com/libuv/libuv
ignore = untracked
[submodule "libintl-lite"]
path = libintl-lite
url = https://github.com/j-jorge/libintl-lite
ignore = untracked
[submodule "Lua"]
path = Lua
url = https://github.com/walterschell/Lua
ignore = untracked
[submodule "OpenCC"]
path = OpenCC
url = https://github.com/BYVoid/OpenCC
ignore = untracked
fetchRecurseSubmodules = false
[submodule "anthy-unicode"]
path = anthy-unicode
url = https://github.com/fujiwarat/anthy-unicode
Expand All @@ -27,15 +23,18 @@
[submodule "yaml-cpp"]
path = yaml-cpp
url = https://github.com/jbeder/yaml-cpp
fetchRecurseSubmodules = false
[submodule "leveldb"]
path = leveldb
url = https://github.com/google/leveldb
fetchRecurseSubmodules = false
[submodule "marisa-trie"]
path = marisa-trie
url = https://github.com/rime/marisa-trie
[submodule "librime"]
path = librime
url = https://github.com/rime/librime
fetchRecurseSubmodules = false
[submodule "librime-lua"]
path = librime-lua
url = https://github.com/hchunhui/librime-lua
Expand All @@ -54,6 +53,16 @@
[submodule "libime"]
path = libime
url = https://github.com/fcitx/libime
fetchRecurseSubmodules = true
[submodule "libime-jyutping"]
path = libime-jyutping
url = https://github.com/fcitx/libime-jyutping
[submodule "librime-predict"]
path = librime-predict
url = https://github.com/rime/librime-predict
[submodule "libthai"]
path = libthai
url = https://github.com/tlwg/libthai
[submodule "libiconv"]
path = libiconv
url = https://git.savannah.gnu.org/git/libiconv
2 changes: 1 addition & 1 deletion Lua
Submodule Lua updated 123 files
2 changes: 1 addition & 1 deletion OpenCC
Submodule OpenCC updated 641 files
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ Cabal is required to build this project.
* librime-octagram: [rime/librime-octagram](https://github.com/lotem/librime-octagram)
* libhangul: [libhangul/libhangul](https://github.com/libhangul/libhangul)
* libchewing: [chewing/libchewing](https://github.com/chewing/libchewing)
* libthai: [tlwg/libthai](https://github.com/tlwg/libthai)
* libiconv: [GNU/libiconv](https://savannah.gnu.org/projects/libiconv)
2 changes: 1 addition & 1 deletion anthy-unicode
23 changes: 14 additions & 9 deletions build.cfg
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
## https://github.com/fcitx/fcitx5/blob/master/src/modules/spell/CMakeLists.txt#L31
# en dict
en_dict = en_dict-20121020.tar.gz
en_dict_sha256 = c44a5d7847925eea9e4d2d04748d442cd28dd9299a0b572ef7d91eac4f5a6ceb

## https://github.com/fcitx/libime/blob/master/data/CMakeLists.txt
# lm
lm_sc = lm_sc.arpa-20230712.tar.xz
lm_sc_sha256 = badd62c16c6373787a0fda8f09cd452d12f60d5868856f651ceecf1a07baba32
lm_sc = lm_sc.arpa-20250113.tar.zst
lm_sc_sha256 = ee83ecf20d52e8bccdba4cf6cd57183d53c257713a5eb77ee3a63d50fc3796dd

# pinyin dict
pinyin_dict = dict-20220810.tar.xz
pinyin_dict_sha256 = 971752f413188007e8d19158c11b85c955e25d7b321ec2275c4b3af6d8a85d26
pinyin_dict = dict-20241001.tar.zst
pinyin_dict_sha256 = d3313b88a68620a23bc8d5f9564cf1b678848dc7af541c4f5f02198e5a3686bf

# table dict
table = table.tar.gz
table_sha256 = 6196053c724125e3ae3d8bd6b2f9172d0c83b65b0d410d3cde63b7a8d6ab87b7
table = table-20240108.tar.gz
table_sha256 = 729c596d86907de727c74d0fc3fd241c406c5debd2b4cb74eefe022387ee9dae

## https://github.com/fcitx/fcitx5-chinese-addons/blob/master/im/pinyin/chaizi.txt
# extra pinyin dict
chinese_addon_repo = https://raw.githubusercontent.com/fcitx/fcitx5-chinese-addons/5.1.2/im/pinyin/
chaizi_sha256 = cd659605360120f7390fda1a278eea12c4df6d763a95c8099068ab09cfafd058
emoji_sha256 = c2bf27f4b49df5fda87076cdb3e8091da25ec4536910e062aa70a832fda685d3

## https://github.com/fcitx/fcitx5-chinese-addons/blob/master/modules/pinyinhelper/CMakeLists.txt
# py stroke
py_stroke = py_stroke-20121124.tar.gz
py_stroke_sha256 = 8eb128a9bfa43952e67cf2fcee1fd134c6f4cfd317bc2f6c38a615f5eb64e248
Expand All @@ -27,10 +30,12 @@ py_stroke_sha256 = 8eb128a9bfa43952e67cf2fcee1fd134c6f4cfd317bc2f6c38a615f5eb64e
py_table = py_table-20121124.tar.gz
py_table_sha256 = 42146ac97de6c13d55f9e99ed873915f4c66739e9c11532a34556badf9792c04

## https://github.com/boostorg/boost/releases
# boost
boost_version = 1.83.0
boost_sha256 = c5a0688e1f0c05f354bbd0b32244d36085d9ffc9f932e8a18983a9908096f614
boost_version = 1.86.0
boost_sha256 = 2c5ec5edcdff47ff55e27ed9560b0a0b94b07bd07ed9928b476150e16b0efc57

## https://github.com/fcitx/libime-jyutping/blob/master/data/CMakeLists.txt
# jyutping dict
jyutping_dict = jyutping-dict-20180104.tar.xz
jyutping_dict_sha256 = e3a5b13edb8efa2f764245a3232f99ba7e7670e22b8cbe666a4fffa84b35f35b
Expand Down
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion fmt
Submodule fmt updated 197 files
2 changes: 1 addition & 1 deletion glog
Submodule glog updated 92 files
+6 −2 .bazelci/presubmit.yml
+3 −3 .clang-format
+1 −1 .clang-tidy
+10 −0 .github/dependabot.yml
+31 −13 .github/workflows/android.yml
+26 −0 .github/workflows/cifuzz.yml
+57 −0 .github/workflows/emscripten.yml
+22 −30 .github/workflows/linux.yml
+22 −29 .github/workflows/macos.yml
+47 −36 .github/workflows/windows.yml
+1 −0 AUTHORS
+485 −512 CMakeLists.txt
+2 −0 CONTRIBUTORS
+1 −38 COPYING
+10 −0 ChangeLog
+6 −0 MODULE.bazel
+320 −188 README.rst
+7 −0 WORKSPACE
+130 −118 bazel/glog.bzl
+1 −1 cmake/GetCacheVariables.cmake
+12 −8 cmake/RunCleanerTest1.cmake
+12 −8 cmake/RunCleanerTest2.cmake
+12 −8 cmake/RunCleanerTest3.cmake
+4 −14 cmake/TestPackageConfig.cmake
+11 −0 codecov.yml
+8 −0 gcovr.cfg
+2 −0 glog-config.cmake.in
+55 −53 src/base/commandlineflags.h
+10 −12 src/base/googleinit.h
+0 −333 src/base/mutex.h
+14 −14 src/cleanup_immediately_unittest.cc
+14 −14 src/cleanup_with_absolute_prefix_unittest.cc
+14 −14 src/cleanup_with_relative_prefix_unittest.cc
+39 −128 src/config.h.cmake.in
+7 −0 src/dcheck_unittest/CMakeLists.txt
+53 −0 src/dcheck_unittest/glog_dcheck.cc
+342 −343 src/demangle.cc
+17 −8 src/demangle.h
+26 −28 src/demangle_unittest.cc
+7 −0 src/demangle_unittest.txt
+158 −0 src/flags.cc
+32 −0 src/fuzz_demangle.cc
+191 −0 src/glog/flags.h
+42 −14 src/glog/log_severity.h
+1,744 −0 src/glog/logging.h
+0 −2,002 src/glog/logging.h.in
+14 −11 src/glog/platform.h
+75 −78 src/glog/raw_logging.h
+44 −96 src/glog/stl_logging.h
+81 −0 src/glog/types.h
+38 −20 src/glog/vlog_is_on.h
+220 −274 src/googletest.h
+16 −0 src/includes_unittest/CMakeLists.txt
+39 −0 src/includes_unittest/glog_includes_logging.cc
+39 −0 src/includes_unittest/glog_includes_raw_logging.cc
+4 −5 src/includes_unittest/glog_includes_stl_logging.cc
+4 −5 src/includes_unittest/glog_includes_vlog_is_on.cc
+10 −0 src/log_severity_unittest/CMakeLists.txt
+40 −0 src/log_severity_unittest/glog_log_severity_constants.cc
+42 −0 src/log_severity_unittest/glog_log_severity_conversion.cc
+1,132 −988 src/logging.cc
+0 −1,384 src/logging_custom_prefix_unittest.cc
+0 −308 src/logging_custom_prefix_unittest.err
+11 −10 src/logging_striplog_test.sh
+477 −366 src/logging_unittest.cc
+17 −19 src/mock-log.h
+11 −16 src/mock-log_unittest.cc
+2 −5 src/package_config_unittest/working_config/glog_package_config.cc
+85 −53 src/raw_logging.cc
+106 −113 src/signalhandler.cc
+33 −37 src/signalhandler_unittest.cc
+38 −0 src/stacktrace.cc
+45 −9 src/stacktrace.h
+8 −4 src/stacktrace_generic-inl.h
+9 −7 src/stacktrace_libunwind-inl.h
+28 −22 src/stacktrace_powerpc-inl.h
+73 −61 src/stacktrace_unittest.cc
+20 −20 src/stacktrace_unwind-inl.h
+9 −6 src/stacktrace_windows-inl.h
+44 −31 src/stacktrace_x86-inl.h
+8 −101 src/stl_logging_unittest.cc
+23 −9 src/striplog_unittest.cc
+285 −277 src/symbolize.cc
+102 −55 src/symbolize.h
+159 −121 src/symbolize_unittest.cc
+138 −211 src/utilities.cc
+175 −109 src/utilities.h
+6 −12 src/utilities_unittest.cc
+46 −61 src/vlog_is_on.cc
+625 −744 src/windows/dirent.h
+17 −26 src/windows/port.cc
+63 −102 src/windows/port.h
2 changes: 1 addition & 1 deletion libchewing
Submodule libchewing updated 207 files
1 change: 1 addition & 0 deletions libiconv
Submodule libiconv added at 4b9c27
2 changes: 1 addition & 1 deletion libime
Submodule libime updated 100 files
2 changes: 1 addition & 1 deletion libintl-lite
2 changes: 1 addition & 1 deletion librime
Submodule librime updated 186 files
2 changes: 1 addition & 1 deletion librime-octagram
1 change: 1 addition & 0 deletions librime-predict
Submodule librime-predict added at 920bd4
1 change: 1 addition & 0 deletions libthai
Submodule libthai added at 618e44
2 changes: 1 addition & 1 deletion libuv
Submodule libuv updated 115 files
2 changes: 1 addition & 1 deletion marisa-trie
12 changes: 12 additions & 0 deletions patches/glog.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b787631..1fc8cf4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -402,6 +402,7 @@ add_custom_command (
COMMAND ${CMAKE_COMMAND} -E touch ${_glog_EMPTY_SOURCE}
)

+target_compile_options(glog_internal PRIVATE "-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.")
add_library (glog
$<TARGET_OBJECTS:glog_internal>
${_glog_EMPTY_SOURCE}
Loading

0 comments on commit 953aadd

Please sign in to comment.