From 3b5404c2ea7cff8e518a35e8bf5af922e5d64346 Mon Sep 17 00:00:00 2001 From: p-goulart Date: Tue, 6 Feb 2024 12:02:54 +0100 Subject: [PATCH] Cache hunspell compilation --- .github/workflows/build.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 449bc87..0e30340 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,15 +67,20 @@ jobs: - name: Install Perl dependencies run: cpan install "Switch" "Text::Unaccent::PurePerl" - - name: Checkout Hunspell - uses: actions/checkout@v3 + # We must compile Hunspell from source, but the only thing we care about is `unmunch` + - name: Checkout and Compile Hunspell (with cache) + uses: actions/cache@v2 with: - repository: hunspell/hunspell - path: ${{ env.HUNSPELL_DIR }} + path: /usr/local/bin/unmunch + key: hunspell-${{ hashFiles("${{ env.HUNSPELL_DIR }}/**") }} + id: hunspell-cache - - name: Compile Hunspell - working-directory: ${{ env.HUNSPELL_DIR }} + - if: steps.hunspell-cache.outputs.cache-hit != 'true' run: | + # Checkout Hunspell code + git clone https://github.com/hunspell/hunspell ${HUNSPELL_DIR} + # Compilation steps + cd ${HUNSPELL_DIR} sudo apt-get install autoconf automake autopoint libtool autoreconf -vfi ./configure