From e2c3bfbee9fec257678ac44294c9bcc8faf17626 Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Sun, 24 Jan 2021 16:37:28 +0300 Subject: [PATCH 01/14] Simplify CI and update for 9.0 --- .github/workflows/ci.yml | 49 ++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5b1bae23a..df3c008968 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,46 +4,31 @@ name: CI on: pull_request: push: - branches: ["ghc-8.10"] + branches: ["ghc-9.0"] jobs: cabal: - name: ${{ matrix.os }} / ghc ${{ matrix.ghc }} + name: ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] - cabal: ["3.2"] - ghc: - - "8.10.1" - - "8.10.2" - + os: [ubuntu-latest] # TODO: add macOS/Windows steps: - uses: actions/checkout@v2 - if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/ghc-8.10' - - - uses: actions/setup-haskell@v1.1.4 - id: setup-haskell-cabal - name: Setup Haskell + - uses: actions/setup-haskell@v1 with: - ghc-version: ${{ matrix.ghc }} - cabal-version: ${{ matrix.cabal }} - - - name: Freeze - run: | - cabal freeze - - - uses: actions/cache@v1 - name: Cache ~/.cabal/store + cabal-version: "3.2" + ghc-version: "9.0.0.20201227" + - name: Cache + uses: actions/cache@v1 with: - path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} - key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} - - - name: Build + path: ~/.cabal + key: ${{ runner.os }} + - name: Install dependencies run: | - cabal configure --enable-tests --enable-benchmarks --test-show-details=direct - cabal build all - - - name: Test - run: | - cabal test all + cabal update + cabal build --only-dependencies --enable-tests --enable-benchmarks --allow-newer="Cabal" + - name: Build + run: cabal build --enable-tests --enable-benchmarks all + - name: Run tests + run: cabal test all From f8a6a070f3941832461904127df6dacd71e97c4e Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Sun, 24 Jan 2021 16:43:01 +0300 Subject: [PATCH 02/14] try manual ghcup install --- .github/workflows/ci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df3c008968..14eb84e090 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,11 +14,13 @@ jobs: matrix: os: [ubuntu-latest] # TODO: add macOS/Windows steps: - - uses: actions/checkout@v2 - - uses: actions/setup-haskell@v1 - with: - cabal-version: "3.2" - ghc-version: "9.0.0.20201227" + - name: Install GHC/Cabal + run: | + curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh + ghcup install ghc 9.0.0.20201227 + ghcup install cabal 3.4.0.0-rc4 + ghcup set ghc 9.0.0.20201227 + ghcup set cabal 3.4.0.0-rc4 - name: Cache uses: actions/cache@v1 with: From 159e697b7ed72f9d7da127ed400b29a899e91d9c Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Sun, 24 Jan 2021 16:51:29 +0300 Subject: [PATCH 03/14] manual ghcup install --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14eb84e090..19bdb61a5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,9 @@ jobs: steps: - name: Install GHC/Cabal run: | - curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh + mkdir -p $HOME/.ghcup/bin + curl -Lf "https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup" > $HOME/.ghcup/bin/ghcup + export PATH="$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH" ghcup install ghc 9.0.0.20201227 ghcup install cabal 3.4.0.0-rc4 ghcup set ghc 9.0.0.20201227 From 14545f18b02173f4bc9cc5e7f65435164ce901c4 Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Sun, 24 Jan 2021 16:53:02 +0300 Subject: [PATCH 04/14] chmod --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19bdb61a5d..202d0e366b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,7 @@ jobs: run: | mkdir -p $HOME/.ghcup/bin curl -Lf "https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup" > $HOME/.ghcup/bin/ghcup + chmod u+x $HOME/.ghcup/bin/ghcup export PATH="$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH" ghcup install ghc 9.0.0.20201227 ghcup install cabal 3.4.0.0-rc4 From 31cc58ffb22972991305a396c4f3ed292472fd66 Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Sun, 24 Jan 2021 17:00:00 +0300 Subject: [PATCH 05/14] debug --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 202d0e366b..3cc9e1def4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,8 @@ jobs: key: ${{ runner.os }} - name: Install dependencies run: | + echo $(pwd) + cabal --version cabal update cabal build --only-dependencies --enable-tests --enable-benchmarks --allow-newer="Cabal" - name: Build From 73fe450609ec2c534a8e766388e4242a4bf02603 Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Sun, 24 Jan 2021 17:11:41 +0300 Subject: [PATCH 06/14] Fix path?.. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3cc9e1def4..073f3a6522 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,7 @@ jobs: key: ${{ runner.os }} - name: Install dependencies run: | + cd "$GITHUB_WORKSPACE" # wtf? echo $(pwd) cabal --version cabal update From 07006b45bd4e50dbb7e363de33ca3a92c0a29ae8 Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Sun, 24 Jan 2021 17:14:43 +0300 Subject: [PATCH 07/14] no idea what I'm doing --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 073f3a6522..07f9d868d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,8 +31,10 @@ jobs: key: ${{ runner.os }} - name: Install dependencies run: | - cd "$GITHUB_WORKSPACE" # wtf? echo $(pwd) + ls + cd .. + ls cabal --version cabal update cabal build --only-dependencies --enable-tests --enable-benchmarks --allow-newer="Cabal" From 48bd08de719e62a0529c5eec605a50d51a1d5276 Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Sun, 24 Jan 2021 17:18:01 +0300 Subject: [PATCH 08/14] *facepalm* --- .github/workflows/ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07f9d868d0..345d7ed46b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,7 @@ jobs: matrix: os: [ubuntu-latest] # TODO: add macOS/Windows steps: + - uses: actions/checkout@v2 - name: Install GHC/Cabal run: | mkdir -p $HOME/.ghcup/bin @@ -31,11 +32,6 @@ jobs: key: ${{ runner.os }} - name: Install dependencies run: | - echo $(pwd) - ls - cd .. - ls - cabal --version cabal update cabal build --only-dependencies --enable-tests --enable-benchmarks --allow-newer="Cabal" - name: Build From 8f6b86b676e7b14ae1e698b1551469241f5cd2ee Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Sun, 24 Jan 2021 17:22:46 +0300 Subject: [PATCH 09/14] Fix allow-newer --- .github/workflows/ci.yml | 2 +- cabal.project | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 345d7ed46b..13b7c35347 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: - name: Install dependencies run: | cabal update - cabal build --only-dependencies --enable-tests --enable-benchmarks --allow-newer="Cabal" + cabal build --only-dependencies --enable-tests --enable-benchmarks - name: Build run: cabal build --enable-tests --enable-benchmarks all - name: Run tests diff --git a/cabal.project b/cabal.project index 7330a775e9..013a7dbcf5 100644 --- a/cabal.project +++ b/cabal.project @@ -3,5 +3,7 @@ packages: ./ ./haddock-library ./haddock-test +allow-newer: Cabal # workaround until https://github.com/simonmar/ghc-paths/pull/24 is merged + -- Pinning the index-state helps to make reasonably CI deterministic index-state: 2020-12-08T20:13:44Z From 3666596f368586f745b888da60317c03aa70834f Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Sun, 24 Jan 2021 17:24:44 +0300 Subject: [PATCH 10/14] more specific allow-newer --- cabal.project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal.project b/cabal.project index 013a7dbcf5..b2c82126bf 100644 --- a/cabal.project +++ b/cabal.project @@ -3,7 +3,7 @@ packages: ./ ./haddock-library ./haddock-test -allow-newer: Cabal # workaround until https://github.com/simonmar/ghc-paths/pull/24 is merged +allow-newer: ghc-paths:Cabal # workaround until https://github.com/simonmar/ghc-paths/pull/24 is merged -- Pinning the index-state helps to make reasonably CI deterministic index-state: 2020-12-08T20:13:44Z From 668a024f74e34eddaa3dfec8e7a024b537c4ed25 Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Sun, 24 Jan 2021 17:37:53 +0300 Subject: [PATCH 11/14] fix allow-newer --- cabal.project | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cabal.project b/cabal.project index b2c82126bf..f357fd728d 100644 --- a/cabal.project +++ b/cabal.project @@ -3,7 +3,10 @@ packages: ./ ./haddock-library ./haddock-test -allow-newer: ghc-paths:Cabal # workaround until https://github.com/simonmar/ghc-paths/pull/24 is merged +allow-newer: + ghc-paths:Cabal, + *:base, + *:ghc-prim -- Pinning the index-state helps to make reasonably CI deterministic -index-state: 2020-12-08T20:13:44Z +index-state: 2021-01-24T12:09:34Z From d9c0e8eccad64e21b72d34d3f48ed4839a110b6f Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Sun, 24 Jan 2021 17:58:24 +0300 Subject: [PATCH 12/14] haskell-actions --- .github/workflows/ci.yml | 20 ++++++++------------ cabal.project | 2 ++ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13b7c35347..ae463653f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,16 +15,12 @@ jobs: os: [ubuntu-latest] # TODO: add macOS/Windows steps: - uses: actions/checkout@v2 - - name: Install GHC/Cabal - run: | - mkdir -p $HOME/.ghcup/bin - curl -Lf "https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup" > $HOME/.ghcup/bin/ghcup - chmod u+x $HOME/.ghcup/bin/ghcup - export PATH="$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH" - ghcup install ghc 9.0.0.20201227 - ghcup install cabal 3.4.0.0-rc4 - ghcup set ghc 9.0.0.20201227 - ghcup set cabal 3.4.0.0-rc4 + - uses: haskell/actions/setup@v1 + id: setup-haskell-cabal + name: Setup Haskell + with: + ghc-version: "9.0.0.20201227" + cabal-version: "3.4" - name: Cache uses: actions/cache@v1 with: @@ -33,8 +29,8 @@ jobs: - name: Install dependencies run: | cabal update - cabal build --only-dependencies --enable-tests --enable-benchmarks + cabal build all --only-dependencies --enable-tests --enable-benchmarks - name: Build - run: cabal build --enable-tests --enable-benchmarks all + run: cabal build all --enable-tests --enable-benchmarks - name: Run tests run: cabal test all diff --git a/cabal.project b/cabal.project index f357fd728d..2525070aa8 100644 --- a/cabal.project +++ b/cabal.project @@ -3,6 +3,8 @@ packages: ./ ./haddock-library ./haddock-test +with-compiler: ghc-9.0 + allow-newer: ghc-paths:Cabal, *:base, From 3c92a9ea67e4ba46c6ab3b51ab237aa07619dbaf Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Sun, 24 Jan 2021 18:03:56 +0300 Subject: [PATCH 13/14] set GITHUB_PATH --- .github/workflows/ci.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae463653f5..81456ae17c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,12 +15,18 @@ jobs: os: [ubuntu-latest] # TODO: add macOS/Windows steps: - uses: actions/checkout@v2 - - uses: haskell/actions/setup@v1 - id: setup-haskell-cabal - name: Setup Haskell - with: - ghc-version: "9.0.0.20201227" - cabal-version: "3.4" + - name: Install GHC/Cabal + run: | + mkdir -p $HOME/.ghcup/bin + curl -Lf "https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup" > $HOME/.ghcup/bin/ghcup + chmod u+x $HOME/.ghcup/bin/ghcup + export PATH="$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH" + echo "$HOME/.cabal/bin" >> $GITHUB_PATH + echo "$HOME/.ghcup/bin" >> $GITHUB_PATH + ghcup install ghc 9.0.0.20201227 + ghcup install cabal 3.4.0.0-rc4 + ghcup set ghc 9.0.0.20201227 + ghcup set cabal 3.4.0.0-rc4 - name: Cache uses: actions/cache@v1 with: From 4db3a3b57944aa8a3aab4492626cb489c8c7d89c Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Sun, 24 Jan 2021 18:16:53 +0300 Subject: [PATCH 14/14] missing dep --- haddock-api/haddock-api.cabal | 1 + 1 file changed, 1 insertion(+) diff --git a/haddock-api/haddock-api.cabal b/haddock-api/haddock-api.cabal index 93f59c1f32..f3dbe2e2c4 100644 --- a/haddock-api/haddock-api.cabal +++ b/haddock-api/haddock-api.cabal @@ -189,6 +189,7 @@ test-suite spec , containers , deepseq , directory + , exceptions , filepath , ghc-boot , transformers