From ba1bd845b1d47bd3b7525302bd43b3bca470c449 Mon Sep 17 00:00:00 2001 From: Rocka Date: Sat, 1 Jun 2024 15:54:37 +0800 Subject: [PATCH 1/3] Cleanup actions --- .github/workflows/ci.yml | 9 ++++++--- .gitmodules | 9 ++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index edcf01c5..34eed486 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,15 +20,17 @@ 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 + submodules: true - name: Setup Android SDK uses: android-actions/setup-android@v3 + with: + packages: "" - name: Install NDK and CMake run: | @@ -37,10 +39,11 @@ jobs: - 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 '*' + # fetch libime submodule kenlm + git submodule update --init --recursive libime # 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..bba6eeed 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 From d3d79eb008a1198cbe099561a101d7503de0d1d3 Mon Sep 17 00:00:00 2001 From: Rocka Date: Sat, 1 Jun 2024 16:49:12 +0800 Subject: [PATCH 2/3] cleanup --- .github/workflows/ci.yml | 19 +++++++++---------- .gitmodules | 1 + 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34eed486..b836ed53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,25 +25,24 @@ jobs: - name: Fetch source code uses: actions/checkout@v4 with: + # this only sync submodules specified in .gitmodules, + # because we don't want recursive submodules in glog, librime, etc. submodules: true - - name: Setup Android SDK + - name: Fetch submodules + run: | + # 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: "" - - - name: Install NDK and CMake - run: | - sdkmanager --install "ndk;${{ env.NDK_VERSION }}" - sdkmanager --install "cmake;${{ env.CMAKE_VERSION }}" + packages: "ndk;${{ env.NDK_VERSION }} cmake;${{ env.CMAKE_VERSION }}" - name: Build everything env: ANDROID_NDK_ROOT: ${{ env.ANDROID_HOME }}/ndk/${{ env.NDK_VERSION }} run: | - git config --global --add safe.directory '*' - # fetch libime submodule kenlm - git submodule update --init --recursive libime # 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 bba6eeed..61399613 100644 --- a/.gitmodules +++ b/.gitmodules @@ -53,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 From 17ad9a84cf9ea1f0a6b6fa9630a55116975a011f Mon Sep 17 00:00:00 2001 From: Rocka Date: Sat, 1 Jun 2024 16:56:25 +0800 Subject: [PATCH 3/3] fixup --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b836ed53..17a69633 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,8 @@ jobs: - name: Fetch submodules run: | + # 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