diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index edcf01c5..17a69633 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 - 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@v3 - - - 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 diff --git a/.gitmodules b/.gitmodules index 3c101b85..61399613 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 @@ -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 @@ -54,6 +53,7 @@ [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