From 46f7ef70e28d0c6f0169d5effd2bef838c975db9 Mon Sep 17 00:00:00 2001 From: Igor Ranieri Date: Fri, 26 Sep 2025 23:39:34 +0200 Subject: [PATCH] Fixed ci.yml --- .forgejo/workflows/test.yaml | 60 ++++++++++-------------------------- 1 file changed, 16 insertions(+), 44 deletions(-) diff --git a/.forgejo/workflows/test.yaml b/.forgejo/workflows/test.yaml index 22f314d..b1b3a9d 100644 --- a/.forgejo/workflows/test.yaml +++ b/.forgejo/workflows/test.yaml @@ -12,64 +12,36 @@ jobs: build: runs-on: docker container: - image: ubuntu:22.04 # Use Ubuntu base and install via ghcup like your local setup + image: haskell:9.10 # Official Haskell image with GHC 9.10 + Cabal preinstalled steps: - name: Checkout code - uses: https://github.com/actions/checkout@v4 + uses: actions/checkout@v4 - - name: Install dependencies + - name: Check versions run: | - apt-get update - apt-get install -y curl build-essential libffi-dev libgmp-dev zlib1g-dev + ghc --version + cabal --version - - name: Install GHCup + # Manual caching with volumes (act-friendly) + - name: Cache Cabal store run: | - curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh - echo "source ~/.ghcup/env" >> ~/.bashrc - - - name: Install GHC and Cabal (matching local versions) - run: | - source ~/.ghcup/env - ghcup install ghc 9.10.2 --set - ghcup install cabal 3.14.2.0 --set - - - name: Cache Cabal packages - uses: https://github.com/actions/cache@v4 - with: - path: | - ~/.cabal/packages - ~/.cabal/store - dist-newstyle - key: ${{ runner.os }}-ghc-9.10.2-cabal-${{ hashFiles('**/*.cabal', '**/cabal.project') }} - restore-keys: | - ${{ runner.os }}-ghc-9.10.2-cabal- - - - name: Update Cabal package index - run: | - source ~/.ghcup/env + mkdir -p ~/.cabal/packages ~/.cabal/store cabal update + - name: Update Cabal package index + run: cabal update + - name: Configure project - run: | - source ~/.ghcup/env - cabal configure --enable-tests --enable-benchmarks + run: cabal configure --enable-tests --enable-benchmarks - name: Build dependencies - run: | - source ~/.ghcup/env - cabal build --only-dependencies --enable-tests --enable-benchmarks + run: cabal build --only-dependencies --enable-tests --enable-benchmarks - name: Build project - run: | - source ~/.ghcup/env - cabal build --enable-tests --enable-benchmarks + run: cabal build --enable-tests --enable-benchmarks - name: Run tests - run: | - source ~/.ghcup/env - cabal test --test-show-details=direct + run: cabal test --test-show-details=direct - name: Run documentation build - run: | - source ~/.ghcup/env - cabal haddock + run: cabal haddock