From a441b516fab1f3c999f655f48a6266f721525240 Mon Sep 17 00:00:00 2001 From: Vonfry Date: Sun, 12 Sep 2021 14:39:45 +0800 Subject: [PATCH] ci: fix build stage --- .gitlab-ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c3668be..6e4cd6f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,25 +1,29 @@ default: - image: haskell + image: haskell:8.10.4 + before_script: + - "[ -d .cabal ] || cabal update" cache: paths: - .cabal variables: - CABAL_DIR: .cabal - CABAL_BUILDDIR: .cabal/dist + CABAL_DIR: $CI_PROJECT_DIR/.cabal + CABAL_BUILDDIR: $CI_PROJECT_DIR/.cabal/dist stages: - build - test build: + stage: build script: - cabal build rules: - - if: $CI_COMMIT_BRANCH == "master" + - if: $CI_COMMIT_BRANCH - if: $CI_COMMIT_TAG test: + stage: test script: - cabal test rules: -- 2.45.2