diff --git a/.github/workflows/cabal.yml b/.github/workflows/cabal.yml index 1eedef0..fca6fe3 100644 --- a/.github/workflows/cabal.yml +++ b/.github/workflows/cabal.yml @@ -15,7 +15,12 @@ jobs: - "9.2.8" - "9.4.7" - "9.6.3" - - "9.8.1" + include: + - repo: "hackage" + - ghc: "9.8.1" + repo: "github" + - ghc: "9.8.1" + repo: "hackage" steps: - uses: actions/checkout@v3 @@ -33,6 +38,16 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} + - name: Configure the build + run: | + if [ ${{ matrix.repo }} == "github" ] + then + cp cabal.project.github cabal.project + fi + cabal configure --enable-tests --enable-benchmarks --disable-documentation + # generate dist-newstyle/cache/plan.json + cabal build all --dry-run + - name: Cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle uses: actions/cache@v3 with: @@ -40,7 +55,7 @@ jobs: ~/.cabal/packages ~/.cabal/store dist-newstyle - key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('**/*.cabal') }} + key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('**/*.cabal', './dist-newstyle/cache/plan.json') }} - name: Update package list run: cabal update diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml index 6f5aeb8..4309057 100644 --- a/.github/workflows/stack.yml +++ b/.github/workflows/stack.yml @@ -6,7 +6,7 @@ on: jobs: build: - name: ghc ${{ matrix.ghc }} + name: ghc ${{ matrix.ghc }} - ${{ matrix.repo }} runs-on: ubuntu-latest strategy: matrix: @@ -15,7 +15,12 @@ jobs: - "9.2.8" - "9.4.7" - "9.6.3" - - "9.8.1" + include: + - repo: "hackage" + - ghc: "9.8.1" + repo: "github" + - ghc: "9.8.1" + repo: "hackage" steps: - uses: actions/checkout@v3 @@ -35,13 +40,22 @@ jobs: enable-stack: true stack-version: "latest" + - name: Configure the build + run: | + if [ ${{ matrix.repo }} == "hackage" ] + then + sed "s/\.\././g" ./stack/stack-${{ matrix.ghc }}.yaml > stack.yaml + fi + # generate stack.yaml.lock + stack build --no-terminal --dry-run + - name: Cache ~/.stack and .stack-work uses: actions/cache@v3 with: path: | ~/.stack .stack-work - key: ${{ runner.os }}-${{ matrix.ghc }}-stack-${{ hashFiles('**/*.cabal', './stack/stack-${{ matrix.ghc }}.yaml') }} + key: ${{ runner.os }}-${{ matrix.ghc }}-stack-${{ hashFiles('**/*.cabal', './stack.yaml', './stack.yaml.lock') }} - name: Build - run: stack build --no-terminal --stack-yaml=./stack/stack-${{ matrix.ghc }}.yaml + run: stack build --no-terminal diff --git a/stack/stack-9.8.1.yaml b/stack/stack-9.8.1.yaml index bf068ae..68ecc4e 100644 --- a/stack/stack-9.8.1.yaml +++ b/stack/stack-9.8.1.yaml @@ -10,7 +10,7 @@ extra-deps: - liquidhaskell-0.9.8.1 - liquidhaskell-boot-0.9.8.1 - liquid-fixpoint-0.9.6.3 - - liquid-prelude-0.9.2.8.1 + - liquid-prelude-0.9.2.8.1@rev:1 - liquid-vector-0.13.1.0.1 nix: