From 3b1e0ab50702674490c59f236021df0f39782aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Sun, 27 Dec 2020 16:49:32 -0500 Subject: [PATCH 01/35] GitHub Actions --- .github/workflows/ci.yml | 119 ++++++++++++++++++ ...rted-lts.yaml => oldest-supported-lts.yaml | 0 2 files changed, 119 insertions(+) create mode 100644 .github/workflows/ci.yml rename stack-oldest-supported-lts.yaml => oldest-supported-lts.yaml (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..06a92f8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,119 @@ +name: CI + +on: + # Build every pull request, to check for regressions. + pull_request: + + # Build when a PR is merged, to update the README's CI badge. + push: + branches: [main] + + # Build once a month, to detect missing upper bounds. + schedule: + - cron: '0 0 1 * *' + +jobs: + stack: + name: ${{ matrix.name }} + runs-on: ubuntu-latest + strategy: + matrix: + include: + # Check that the build passes with the recommended snapshot on every + # platform. + - name: stable + stack_yaml: "stack.yaml" + os: ubuntu-latest + - name: stable + stack_yaml: "stack.yaml" + os: macos-latest + - name: stable + stack_yaml: "stack.yaml" + os: windows-latest + + # Check that the lower bounds are still correct by building with the + # lowest-supported version of everything, including our dependencies. + - name: oldest + stack_yaml: "oldest-supported-lts.yaml" + os: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' + + - uses: actions/cache@v2 + name: Cache Stack Artifacts + with: + path: | + ~/.stack + .stack-work + key: ${{ runner.os }}-stack-${{ hashFiles(matrix.stack_yaml) }} + + - uses: haskell/actions/setup@v1 + id: setup-haskell-stack + name: Setup Stack + with: + enable-stack: true + stack-setup-ghc: true + stack-no-global: true + ghc-version: ${{ matrix.ghc }} + + - name: Build + run: | + stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks + + - name: Test + run: | + stack --stack-yaml=${{ matrix.stack_yaml }} test + + cabal: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + # Check that our upper bounds are correct by building with the latest + # version of everything. We use cabal because it uses the latest + # versions of our dependencies allowed by our upper bounds. + - name: newest + ghc: latest + os: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' + + - uses: haskell/actions/setup@v1 + id: setup-haskell-cabal + name: Setup Cabal + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + # This freeze file is regenerated on every build, so we will always test + # with the most recent version of our dependencies allowed by our upper + # bounds. + - name: Freeze + run: | + cabal configure --enable-tests --enable-benchmarks --test-show-details=direct + cabal freeze + cabal v1-sandbox init + cabal v1-install happy + + # Only reuse the cached copy of our dependencies if our freeze file matches + # the cache's copy. + - uses: actions/cache@v2 + name: Cache Cabal Artifacts + with: + path: | + ${{ steps.setup-haskell-cabal.outputs.cabal-store }} + .cabal-sandbox + key: ${{ runner.os }}-cabal-${{ hashFiles('cabal.project.freeze') }} + + - name: Build + run: | + cabal v1-install --enable-tests + + - name: Test + run: | + cabal v1-test diff --git a/stack-oldest-supported-lts.yaml b/oldest-supported-lts.yaml similarity index 100% rename from stack-oldest-supported-lts.yaml rename to oldest-supported-lts.yaml From 5e445de394c41dd09c66ab04fe83e7a1ab092c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Sun, 27 Dec 2020 17:48:01 -0500 Subject: [PATCH 02/35] use the right version of ghc --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06a92f8..7df22db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,6 @@ jobs: enable-stack: true stack-setup-ghc: true stack-no-global: true - ghc-version: ${{ matrix.ghc }} - name: Build run: | @@ -76,7 +75,7 @@ jobs: # version of everything. We use cabal because it uses the latest # versions of our dependencies allowed by our upper bounds. - name: newest - ghc: latest + ghc: 8.4.4 os: ubuntu-latest steps: From d742a3248c4db9a25a79fba7180a16e2b7b459c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Sun, 27 Dec 2020 18:07:20 -0500 Subject: [PATCH 03/35] use the designated OS --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7df22db..5620467 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,19 +15,19 @@ on: jobs: stack: name: ${{ matrix.name }} - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: include: # Check that the build passes with the recommended snapshot on every # platform. - - name: stable + - name: stable (Linux) stack_yaml: "stack.yaml" os: ubuntu-latest - - name: stable + - name: stable (MacOS) stack_yaml: "stack.yaml" os: macos-latest - - name: stable + - name: stable (Windows) stack_yaml: "stack.yaml" os: windows-latest From b01caf4664e87f0bd11e4eda1123c5aa45f07a45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Sun, 27 Dec 2020 18:32:37 -0500 Subject: [PATCH 04/35] focus on the happy failure --- .github/workflows/ci.yml | 64 ---------------------------------------- 1 file changed, 64 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5620467..ce3ad90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,18 +24,6 @@ jobs: - name: stable (Linux) stack_yaml: "stack.yaml" os: ubuntu-latest - - name: stable (MacOS) - stack_yaml: "stack.yaml" - os: macos-latest - - name: stable (Windows) - stack_yaml: "stack.yaml" - os: windows-latest - - # Check that the lower bounds are still correct by building with the - # lowest-supported version of everything, including our dependencies. - - name: oldest - stack_yaml: "oldest-supported-lts.yaml" - os: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -64,55 +52,3 @@ jobs: - name: Test run: | stack --stack-yaml=${{ matrix.stack_yaml }} test - - cabal: - name: ${{ matrix.name }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - # Check that our upper bounds are correct by building with the latest - # version of everything. We use cabal because it uses the latest - # versions of our dependencies allowed by our upper bounds. - - name: newest - ghc: 8.4.4 - os: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' - - - uses: haskell/actions/setup@v1 - id: setup-haskell-cabal - name: Setup Cabal - with: - ghc-version: ${{ matrix.ghc }} - cabal-version: ${{ matrix.cabal }} - - # This freeze file is regenerated on every build, so we will always test - # with the most recent version of our dependencies allowed by our upper - # bounds. - - name: Freeze - run: | - cabal configure --enable-tests --enable-benchmarks --test-show-details=direct - cabal freeze - cabal v1-sandbox init - cabal v1-install happy - - # Only reuse the cached copy of our dependencies if our freeze file matches - # the cache's copy. - - uses: actions/cache@v2 - name: Cache Cabal Artifacts - with: - path: | - ${{ steps.setup-haskell-cabal.outputs.cabal-store }} - .cabal-sandbox - key: ${{ runner.os }}-cabal-${{ hashFiles('cabal.project.freeze') }} - - - name: Build - run: | - cabal v1-install --enable-tests - - - name: Test - run: | - cabal v1-test From b24e3a59fde705e122550c8440096626118f921e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Sun, 27 Dec 2020 18:57:13 -0500 Subject: [PATCH 05/35] Revert "focus on the happy failure" This reverts commit b01caf4664e87f0bd11e4eda1123c5aa45f07a45. --- .github/workflows/ci.yml | 64 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce3ad90..5620467 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,18 @@ jobs: - name: stable (Linux) stack_yaml: "stack.yaml" os: ubuntu-latest + - name: stable (MacOS) + stack_yaml: "stack.yaml" + os: macos-latest + - name: stable (Windows) + stack_yaml: "stack.yaml" + os: windows-latest + + # Check that the lower bounds are still correct by building with the + # lowest-supported version of everything, including our dependencies. + - name: oldest + stack_yaml: "oldest-supported-lts.yaml" + os: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -52,3 +64,55 @@ jobs: - name: Test run: | stack --stack-yaml=${{ matrix.stack_yaml }} test + + cabal: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + # Check that our upper bounds are correct by building with the latest + # version of everything. We use cabal because it uses the latest + # versions of our dependencies allowed by our upper bounds. + - name: newest + ghc: 8.4.4 + os: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' + + - uses: haskell/actions/setup@v1 + id: setup-haskell-cabal + name: Setup Cabal + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + # This freeze file is regenerated on every build, so we will always test + # with the most recent version of our dependencies allowed by our upper + # bounds. + - name: Freeze + run: | + cabal configure --enable-tests --enable-benchmarks --test-show-details=direct + cabal freeze + cabal v1-sandbox init + cabal v1-install happy + + # Only reuse the cached copy of our dependencies if our freeze file matches + # the cache's copy. + - uses: actions/cache@v2 + name: Cache Cabal Artifacts + with: + path: | + ${{ steps.setup-haskell-cabal.outputs.cabal-store }} + .cabal-sandbox + key: ${{ runner.os }}-cabal-${{ hashFiles('cabal.project.freeze') }} + + - name: Build + run: | + cabal v1-install --enable-tests + + - name: Test + run: | + cabal v1-test From 8a19e269de2e451b89d5fe16b3a41c9eca00863d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Sun, 27 Dec 2020 18:57:38 -0500 Subject: [PATCH 06/35] focus on the happy failure --- .github/workflows/ci.yml | 64 ---------------------------------------- 1 file changed, 64 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5620467..fdd78fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,18 +19,6 @@ jobs: strategy: matrix: include: - # Check that the build passes with the recommended snapshot on every - # platform. - - name: stable (Linux) - stack_yaml: "stack.yaml" - os: ubuntu-latest - - name: stable (MacOS) - stack_yaml: "stack.yaml" - os: macos-latest - - name: stable (Windows) - stack_yaml: "stack.yaml" - os: windows-latest - # Check that the lower bounds are still correct by building with the # lowest-supported version of everything, including our dependencies. - name: oldest @@ -64,55 +52,3 @@ jobs: - name: Test run: | stack --stack-yaml=${{ matrix.stack_yaml }} test - - cabal: - name: ${{ matrix.name }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - # Check that our upper bounds are correct by building with the latest - # version of everything. We use cabal because it uses the latest - # versions of our dependencies allowed by our upper bounds. - - name: newest - ghc: 8.4.4 - os: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' - - - uses: haskell/actions/setup@v1 - id: setup-haskell-cabal - name: Setup Cabal - with: - ghc-version: ${{ matrix.ghc }} - cabal-version: ${{ matrix.cabal }} - - # This freeze file is regenerated on every build, so we will always test - # with the most recent version of our dependencies allowed by our upper - # bounds. - - name: Freeze - run: | - cabal configure --enable-tests --enable-benchmarks --test-show-details=direct - cabal freeze - cabal v1-sandbox init - cabal v1-install happy - - # Only reuse the cached copy of our dependencies if our freeze file matches - # the cache's copy. - - uses: actions/cache@v2 - name: Cache Cabal Artifacts - with: - path: | - ${{ steps.setup-haskell-cabal.outputs.cabal-store }} - .cabal-sandbox - key: ${{ runner.os }}-cabal-${{ hashFiles('cabal.project.freeze') }} - - - name: Build - run: | - cabal v1-install --enable-tests - - - name: Test - run: | - cabal v1-test From cbd6e2658f72b27e02031293cd27ab8ff998d4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Sun, 27 Dec 2020 19:09:40 -0500 Subject: [PATCH 07/35] install happy from a different lts --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fdd78fb..71aa70e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,14 @@ jobs: stack-setup-ghc: true stack-no-global: true + # For some reason, installing happy from lts-8.0 fails unless some other + # version of happy is already in the PATH. So let's install a version of + # happy from an lts which does not have this problem. + - name: Install happy + if: matrix.stack_yaml == 'oldest-supported-lts.yaml' + run: | + stack --stack-yaml=stack.yaml install happy + - name: Build run: | stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks From c9f79d3ca81c7346d2414da8c6f97f5eb177496c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Sun, 27 Dec 2020 19:38:45 -0500 Subject: [PATCH 08/35] examine the build environment --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71aa70e..d23a084 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,11 @@ jobs: - name: Build run: | - stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks + which happy + echo $PATH + echo $HOME + ls ~/.local/bin + #stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks - name: Test run: | From 7d74d0e737decd1fe356c0702c265596370893f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Sun, 27 Dec 2020 19:44:42 -0500 Subject: [PATCH 09/35] maybe on multiple lines? --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d23a084..8563aad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,13 +53,18 @@ jobs: run: | stack --stack-yaml=stack.yaml install happy - - name: Build + - name: Build 1 run: | which happy + - name: Build 2 + run: | echo $PATH + - name: Build 3 + run: | echo $HOME + - name: Build 4 + run: | ls ~/.local/bin - #stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks - name: Test run: | From 832bcb806c3ebae04650e97b22a8dfcbd7b4769e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Sun, 27 Dec 2020 19:49:23 -0500 Subject: [PATCH 10/35] come on, GitHub. --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8563aad..996e702 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,9 +53,6 @@ jobs: run: | stack --stack-yaml=stack.yaml install happy - - name: Build 1 - run: | - which happy - name: Build 2 run: | echo $PATH From e47e6a99e3177ed95cb5ba62a8d13d786e8774a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Sun, 27 Dec 2020 20:51:54 -0500 Subject: [PATCH 11/35] Revert "come on, GitHub." This reverts commit 832bcb806c3ebae04650e97b22a8dfcbd7b4769e. --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 996e702..8563aad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,6 +53,9 @@ jobs: run: | stack --stack-yaml=stack.yaml install happy + - name: Build 1 + run: | + which happy - name: Build 2 run: | echo $PATH From c6a8144e0c7cdbd277067263a372d5f1ce8f9a18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Sun, 27 Dec 2020 20:52:08 -0500 Subject: [PATCH 12/35] Revert "maybe on multiple lines?" This reverts commit 7d74d0e737decd1fe356c0702c265596370893f5. --- .github/workflows/ci.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8563aad..d23a084 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,18 +53,13 @@ jobs: run: | stack --stack-yaml=stack.yaml install happy - - name: Build 1 + - name: Build run: | which happy - - name: Build 2 - run: | echo $PATH - - name: Build 3 - run: | echo $HOME - - name: Build 4 - run: | ls ~/.local/bin + #stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks - name: Test run: | From cb4ef885309659c1fc963194416ee3d8ef92f56a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Sun, 27 Dec 2020 20:52:23 -0500 Subject: [PATCH 13/35] Revert "examine the build environment" This reverts commit c9f79d3ca81c7346d2414da8c6f97f5eb177496c. --- .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 d23a084..71aa70e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,11 +55,7 @@ jobs: - name: Build run: | - which happy - echo $PATH - echo $HOME - ls ~/.local/bin - #stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks + stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks - name: Test run: | From 76287379df697728b9c4a9e932146d62f5661ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Sun, 27 Dec 2020 20:53:02 -0500 Subject: [PATCH 14/35] add ~/.local/bin to the path --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71aa70e..daa5378 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,7 @@ jobs: with: path: | ~/.stack + ~/.local/bin .stack-work key: ${{ runner.os }}-stack-${{ hashFiles(matrix.stack_yaml) }} @@ -55,7 +56,7 @@ jobs: - name: Build run: | - stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks + PATH="$HOME/.local/bin:$PATH" stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks - name: Test run: | From 4856f17ca0b5d21dfff378cae6669ec3edf458cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Sun, 27 Dec 2020 21:14:13 -0500 Subject: [PATCH 15/35] Revert "focus on the happy failure" This reverts commit 8a19e269de2e451b89d5fe16b3a41c9eca00863d. --- .github/workflows/ci.yml | 64 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index daa5378..45b2e68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,18 @@ jobs: strategy: matrix: include: + # Check that the build passes with the recommended snapshot on every + # platform. + - name: stable (Linux) + stack_yaml: "stack.yaml" + os: ubuntu-latest + - name: stable (MacOS) + stack_yaml: "stack.yaml" + os: macos-latest + - name: stable (Windows) + stack_yaml: "stack.yaml" + os: windows-latest + # Check that the lower bounds are still correct by building with the # lowest-supported version of everything, including our dependencies. - name: oldest @@ -61,3 +73,55 @@ jobs: - name: Test run: | stack --stack-yaml=${{ matrix.stack_yaml }} test + + cabal: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + # Check that our upper bounds are correct by building with the latest + # version of everything. We use cabal because it uses the latest + # versions of our dependencies allowed by our upper bounds. + - name: newest + ghc: 8.4.4 + os: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' + + - uses: haskell/actions/setup@v1 + id: setup-haskell-cabal + name: Setup Cabal + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + # This freeze file is regenerated on every build, so we will always test + # with the most recent version of our dependencies allowed by our upper + # bounds. + - name: Freeze + run: | + cabal configure --enable-tests --enable-benchmarks --test-show-details=direct + cabal freeze + cabal v1-sandbox init + cabal v1-install happy + + # Only reuse the cached copy of our dependencies if our freeze file matches + # the cache's copy. + - uses: actions/cache@v2 + name: Cache Cabal Artifacts + with: + path: | + ${{ steps.setup-haskell-cabal.outputs.cabal-store }} + .cabal-sandbox + key: ${{ runner.os }}-cabal-${{ hashFiles('cabal.project.freeze') }} + + - name: Build + run: | + cabal v1-install --enable-tests + + - name: Test + run: | + cabal v1-test From 68313bafedda7e1d7577b3a5f705952f1b6128e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Sun, 27 Dec 2020 21:25:36 -0500 Subject: [PATCH 16/35] only add to the PATH when needed --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45b2e68..1628a06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,9 +67,15 @@ jobs: stack --stack-yaml=stack.yaml install happy - name: Build + if: matrix.stack_yaml == 'oldest-supported-lts.yaml' run: | PATH="$HOME/.local/bin:$PATH" stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks + - name: Build + if: matrix.stack_yaml == 'stack.yaml' + run: | + stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks + - name: Test run: | stack --stack-yaml=${{ matrix.stack_yaml }} test From 4ea083a724cd75edafd94699283f0aad2acd2a9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 14:19:46 -0500 Subject: [PATCH 17/35] focus on the failing macOS test --- .github/workflows/ci.yml | 66 ---------------------------------------- 1 file changed, 66 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1628a06..119a3cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,23 +19,9 @@ jobs: strategy: matrix: include: - # Check that the build passes with the recommended snapshot on every - # platform. - - name: stable (Linux) - stack_yaml: "stack.yaml" - os: ubuntu-latest - name: stable (MacOS) stack_yaml: "stack.yaml" os: macos-latest - - name: stable (Windows) - stack_yaml: "stack.yaml" - os: windows-latest - - # Check that the lower bounds are still correct by building with the - # lowest-supported version of everything, including our dependencies. - - name: oldest - stack_yaml: "oldest-supported-lts.yaml" - os: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -79,55 +65,3 @@ jobs: - name: Test run: | stack --stack-yaml=${{ matrix.stack_yaml }} test - - cabal: - name: ${{ matrix.name }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - # Check that our upper bounds are correct by building with the latest - # version of everything. We use cabal because it uses the latest - # versions of our dependencies allowed by our upper bounds. - - name: newest - ghc: 8.4.4 - os: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' - - - uses: haskell/actions/setup@v1 - id: setup-haskell-cabal - name: Setup Cabal - with: - ghc-version: ${{ matrix.ghc }} - cabal-version: ${{ matrix.cabal }} - - # This freeze file is regenerated on every build, so we will always test - # with the most recent version of our dependencies allowed by our upper - # bounds. - - name: Freeze - run: | - cabal configure --enable-tests --enable-benchmarks --test-show-details=direct - cabal freeze - cabal v1-sandbox init - cabal v1-install happy - - # Only reuse the cached copy of our dependencies if our freeze file matches - # the cache's copy. - - uses: actions/cache@v2 - name: Cache Cabal Artifacts - with: - path: | - ${{ steps.setup-haskell-cabal.outputs.cabal-store }} - .cabal-sandbox - key: ${{ runner.os }}-cabal-${{ hashFiles('cabal.project.freeze') }} - - - name: Build - run: | - cabal v1-install --enable-tests - - - name: Test - run: | - cabal v1-test From 67696390eb10564c9cf4ec866c00a72a8b71a00c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 14:20:44 -0500 Subject: [PATCH 18/35] focus on the failure --- tests/RunTests.hs | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/RunTests.hs b/tests/RunTests.hs index 4995781..33c3aff 100644 --- a/tests/RunTests.hs +++ b/tests/RunTests.hs @@ -46,22 +46,22 @@ doctest' files = do main :: IO () main = do - doctest' ["src/System/Console/Hawk/Lock.hs", "tests/System/Console/Hawk/Lock/Test.hs"] - doctest' ["src/Data/Cache.hs"] - doctest' ["src/Data/HaskellSource.hs"] - doctest' ["src/Data/HaskellModule.hs"] + --doctest' ["src/System/Console/Hawk/Lock.hs", "tests/System/Console/Hawk/Lock/Test.hs"] + --doctest' ["src/Data/Cache.hs"] + --doctest' ["src/Data/HaskellSource.hs"] + --doctest' ["src/Data/HaskellModule.hs"] doctest' ["src/Data/HaskellModule/Parse.hs"] doctest' ["src/System/Console/Hawk.hs"] - doctest' ["tests/System/Console/Hawk/PreludeTests.hs"] - doctest' ["tests/Data/HaskellModule/Parse/Test.hs"] - doctest' ["src/System/Console/Hawk/Args/Option.hs"] - doctest' ["src/System/Console/Hawk/Args/Parse.hs"] - doctest' ["src/System/Console/Hawk/UserPrelude.hs"] - doctest' ["src/System/Console/Hawk/UserPrelude/Extend.hs"] - doctest' ["src/System/Directory/Extra.hs"] - doctest' ["src/Control/Monad/Trans/Uncertain.hs"] - doctest' ["src/Control/Monad/Trans/OptionParser.hs"] - hspec $ do - ReprTest.reprSpec' - ReprTest.reprSpec - HawkTest.run + --doctest' ["tests/System/Console/Hawk/PreludeTests.hs"] + --doctest' ["tests/Data/HaskellModule/Parse/Test.hs"] + --doctest' ["src/System/Console/Hawk/Args/Option.hs"] + --doctest' ["src/System/Console/Hawk/Args/Parse.hs"] + --doctest' ["src/System/Console/Hawk/UserPrelude.hs"] + --doctest' ["src/System/Console/Hawk/UserPrelude/Extend.hs"] + --doctest' ["src/System/Directory/Extra.hs"] + --doctest' ["src/Control/Monad/Trans/Uncertain.hs"] + --doctest' ["src/Control/Monad/Trans/OptionParser.hs"] + --hspec $ do + -- ReprTest.reprSpec' + -- ReprTest.reprSpec + --HawkTest.run From 3c66515f793fa82715e6484b7f11c76d3c6a910a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 14:46:38 -0500 Subject: [PATCH 19/35] delete corrupted HSinteger-gmp file --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 119a3cd..e3fe367 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,13 @@ jobs: stack-setup-ghc: true stack-no-global: true + # For some reason, the HSinteger-gmp-1.0.2.0.o file which comes with ghc is + # corrupted, and builds fail unless it is deleted. Apparently it is not needed? + - name: Fix HSinteger-gmp + if: matrix.os == 'macos-latest' + run: | + rm -f ~/.stack/programs/x86_64-osx/ghc-*/lib/ghc-*/integer-gmp-*/HSinteger-gmp-*.o + # For some reason, installing happy from lts-8.0 fails unless some other # version of happy is already in the PATH. So let's install a version of # happy from an lts which does not have this problem. From 2f091af952ec92418aa1fba4c63faabee4a3ffba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 15:07:45 -0500 Subject: [PATCH 20/35] examine the build environment --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3fe367..308ab3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,9 @@ jobs: - name: Fix HSinteger-gmp if: matrix.os == 'macos-latest' run: | + ls /Users/runner/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4/integer-gmp-1.0.2.0 rm -f ~/.stack/programs/x86_64-osx/ghc-*/lib/ghc-*/integer-gmp-*/HSinteger-gmp-*.o + ls /Users/runner/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4/integer-gmp-1.0.2.0 # For some reason, installing happy from lts-8.0 fails unless some other # version of happy is already in the PATH. So let's install a version of @@ -71,4 +73,7 @@ jobs: - name: Test run: | + ls /Users/runner/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4/integer-gmp-1.0.2.0 + rm -f ~/.stack/programs/x86_64-osx/ghc-*/lib/ghc-*/integer-gmp-*/HSinteger-gmp-*.o + ls /Users/runner/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4/integer-gmp-1.0.2.0 stack --stack-yaml=${{ matrix.stack_yaml }} test From 1b50726ddb7cd09af508c3e4e9062119fb6a1714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 15:20:48 -0500 Subject: [PATCH 21/35] delete corrupted file later after it has been created rather than before :) --- .github/workflows/ci.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 308ab3f..dc071c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,15 +44,6 @@ jobs: stack-setup-ghc: true stack-no-global: true - # For some reason, the HSinteger-gmp-1.0.2.0.o file which comes with ghc is - # corrupted, and builds fail unless it is deleted. Apparently it is not needed? - - name: Fix HSinteger-gmp - if: matrix.os == 'macos-latest' - run: | - ls /Users/runner/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4/integer-gmp-1.0.2.0 - rm -f ~/.stack/programs/x86_64-osx/ghc-*/lib/ghc-*/integer-gmp-*/HSinteger-gmp-*.o - ls /Users/runner/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4/integer-gmp-1.0.2.0 - # For some reason, installing happy from lts-8.0 fails unless some other # version of happy is already in the PATH. So let's install a version of # happy from an lts which does not have this problem. @@ -71,9 +62,18 @@ jobs: run: | stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks + # For some reason, the HSinteger-gmp-1.0.2.0.o file which comes with ghc is + # corrupted, and builds fail unless it is deleted. Apparently it is not needed? + - name: Fix HSinteger-gmp + if: matrix.os == 'macos-latest' + run: | + ls /Users/runner/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4 + rm -f ~/.stack/programs/x86_64-osx/ghc-*/lib/ghc-*/integer-gmp-*/HSinteger-gmp-*.o + ls /Users/runner/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4 + - name: Test run: | - ls /Users/runner/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4/integer-gmp-1.0.2.0 + ls /Users/runner/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4 rm -f ~/.stack/programs/x86_64-osx/ghc-*/lib/ghc-*/integer-gmp-*/HSinteger-gmp-*.o - ls /Users/runner/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4/integer-gmp-1.0.2.0 + ls /Users/runner/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4 stack --stack-yaml=${{ matrix.stack_yaml }} test From fffe5696cfeaa71150d44c9674ef2e2c82ed7ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 16:02:42 -0500 Subject: [PATCH 22/35] hand-revert 'examine the build environment' --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc071c7..0e655fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,13 +67,8 @@ jobs: - name: Fix HSinteger-gmp if: matrix.os == 'macos-latest' run: | - ls /Users/runner/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4 rm -f ~/.stack/programs/x86_64-osx/ghc-*/lib/ghc-*/integer-gmp-*/HSinteger-gmp-*.o - ls /Users/runner/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4 - name: Test run: | - ls /Users/runner/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4 - rm -f ~/.stack/programs/x86_64-osx/ghc-*/lib/ghc-*/integer-gmp-*/HSinteger-gmp-*.o - ls /Users/runner/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4 stack --stack-yaml=${{ matrix.stack_yaml }} test From 85ec26f47cbdd31aec862733279f61502c91de45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 16:03:21 -0500 Subject: [PATCH 23/35] Revert "focus on the failure" This reverts commit 67696390eb10564c9cf4ec866c00a72a8b71a00c. --- tests/RunTests.hs | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/RunTests.hs b/tests/RunTests.hs index 33c3aff..4995781 100644 --- a/tests/RunTests.hs +++ b/tests/RunTests.hs @@ -46,22 +46,22 @@ doctest' files = do main :: IO () main = do - --doctest' ["src/System/Console/Hawk/Lock.hs", "tests/System/Console/Hawk/Lock/Test.hs"] - --doctest' ["src/Data/Cache.hs"] - --doctest' ["src/Data/HaskellSource.hs"] - --doctest' ["src/Data/HaskellModule.hs"] + doctest' ["src/System/Console/Hawk/Lock.hs", "tests/System/Console/Hawk/Lock/Test.hs"] + doctest' ["src/Data/Cache.hs"] + doctest' ["src/Data/HaskellSource.hs"] + doctest' ["src/Data/HaskellModule.hs"] doctest' ["src/Data/HaskellModule/Parse.hs"] doctest' ["src/System/Console/Hawk.hs"] - --doctest' ["tests/System/Console/Hawk/PreludeTests.hs"] - --doctest' ["tests/Data/HaskellModule/Parse/Test.hs"] - --doctest' ["src/System/Console/Hawk/Args/Option.hs"] - --doctest' ["src/System/Console/Hawk/Args/Parse.hs"] - --doctest' ["src/System/Console/Hawk/UserPrelude.hs"] - --doctest' ["src/System/Console/Hawk/UserPrelude/Extend.hs"] - --doctest' ["src/System/Directory/Extra.hs"] - --doctest' ["src/Control/Monad/Trans/Uncertain.hs"] - --doctest' ["src/Control/Monad/Trans/OptionParser.hs"] - --hspec $ do - -- ReprTest.reprSpec' - -- ReprTest.reprSpec - --HawkTest.run + doctest' ["tests/System/Console/Hawk/PreludeTests.hs"] + doctest' ["tests/Data/HaskellModule/Parse/Test.hs"] + doctest' ["src/System/Console/Hawk/Args/Option.hs"] + doctest' ["src/System/Console/Hawk/Args/Parse.hs"] + doctest' ["src/System/Console/Hawk/UserPrelude.hs"] + doctest' ["src/System/Console/Hawk/UserPrelude/Extend.hs"] + doctest' ["src/System/Directory/Extra.hs"] + doctest' ["src/Control/Monad/Trans/Uncertain.hs"] + doctest' ["src/Control/Monad/Trans/OptionParser.hs"] + hspec $ do + ReprTest.reprSpec' + ReprTest.reprSpec + HawkTest.run From cfcebdd8a56062d2525613954933971c9c202b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 16:03:22 -0500 Subject: [PATCH 24/35] Revert "focus on the failing macOS test" This reverts commit 4ea083a724cd75edafd94699283f0aad2acd2a9f. --- .github/workflows/ci.yml | 66 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e655fb..9bd214e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,9 +19,23 @@ jobs: strategy: matrix: include: + # Check that the build passes with the recommended snapshot on every + # platform. + - name: stable (Linux) + stack_yaml: "stack.yaml" + os: ubuntu-latest - name: stable (MacOS) stack_yaml: "stack.yaml" os: macos-latest + - name: stable (Windows) + stack_yaml: "stack.yaml" + os: windows-latest + + # Check that the lower bounds are still correct by building with the + # lowest-supported version of everything, including our dependencies. + - name: oldest + stack_yaml: "oldest-supported-lts.yaml" + os: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -72,3 +86,55 @@ jobs: - name: Test run: | stack --stack-yaml=${{ matrix.stack_yaml }} test + + cabal: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + # Check that our upper bounds are correct by building with the latest + # version of everything. We use cabal because it uses the latest + # versions of our dependencies allowed by our upper bounds. + - name: newest + ghc: 8.4.4 + os: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' + + - uses: haskell/actions/setup@v1 + id: setup-haskell-cabal + name: Setup Cabal + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + # This freeze file is regenerated on every build, so we will always test + # with the most recent version of our dependencies allowed by our upper + # bounds. + - name: Freeze + run: | + cabal configure --enable-tests --enable-benchmarks --test-show-details=direct + cabal freeze + cabal v1-sandbox init + cabal v1-install happy + + # Only reuse the cached copy of our dependencies if our freeze file matches + # the cache's copy. + - uses: actions/cache@v2 + name: Cache Cabal Artifacts + with: + path: | + ${{ steps.setup-haskell-cabal.outputs.cabal-store }} + .cabal-sandbox + key: ${{ runner.os }}-cabal-${{ hashFiles('cabal.project.freeze') }} + + - name: Build + run: | + cabal v1-install --enable-tests + + - name: Test + run: | + cabal v1-test From d3d2fe52ce7e28bbac571d4766ff687c4c68c2c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 16:24:49 -0500 Subject: [PATCH 25/35] focus on the failing macOS test --- .github/workflows/ci.yml | 66 ---------------------------------------- 1 file changed, 66 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bd214e..0e655fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,23 +19,9 @@ jobs: strategy: matrix: include: - # Check that the build passes with the recommended snapshot on every - # platform. - - name: stable (Linux) - stack_yaml: "stack.yaml" - os: ubuntu-latest - name: stable (MacOS) stack_yaml: "stack.yaml" os: macos-latest - - name: stable (Windows) - stack_yaml: "stack.yaml" - os: windows-latest - - # Check that the lower bounds are still correct by building with the - # lowest-supported version of everything, including our dependencies. - - name: oldest - stack_yaml: "oldest-supported-lts.yaml" - os: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -86,55 +72,3 @@ jobs: - name: Test run: | stack --stack-yaml=${{ matrix.stack_yaml }} test - - cabal: - name: ${{ matrix.name }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - # Check that our upper bounds are correct by building with the latest - # version of everything. We use cabal because it uses the latest - # versions of our dependencies allowed by our upper bounds. - - name: newest - ghc: 8.4.4 - os: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' - - - uses: haskell/actions/setup@v1 - id: setup-haskell-cabal - name: Setup Cabal - with: - ghc-version: ${{ matrix.ghc }} - cabal-version: ${{ matrix.cabal }} - - # This freeze file is regenerated on every build, so we will always test - # with the most recent version of our dependencies allowed by our upper - # bounds. - - name: Freeze - run: | - cabal configure --enable-tests --enable-benchmarks --test-show-details=direct - cabal freeze - cabal v1-sandbox init - cabal v1-install happy - - # Only reuse the cached copy of our dependencies if our freeze file matches - # the cache's copy. - - uses: actions/cache@v2 - name: Cache Cabal Artifacts - with: - path: | - ${{ steps.setup-haskell-cabal.outputs.cabal-store }} - .cabal-sandbox - key: ${{ runner.os }}-cabal-${{ hashFiles('cabal.project.freeze') }} - - - name: Build - run: | - cabal v1-install --enable-tests - - - name: Test - run: | - cabal v1-test From 7e87dfd8f16790655fcb734c9379afb686469d37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 16:26:31 -0500 Subject: [PATCH 26/35] clarify that not all ghc versions have this problem --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e655fb..0b21576 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,7 @@ jobs: run: | stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks - # For some reason, the HSinteger-gmp-1.0.2.0.o file which comes with ghc is + # For some reason, the HSinteger-gmp-1.0.2.0.o file which comes with ghc-8.4.4 is # corrupted, and builds fail unless it is deleted. Apparently it is not needed? - name: Fix HSinteger-gmp if: matrix.os == 'macos-latest' From 8daaea23cfabe99771a00379766d71d10dbec66f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 16:27:50 -0500 Subject: [PATCH 27/35] clarify why there are two build steps --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b21576..b0f977f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: run: | stack --stack-yaml=stack.yaml install happy - - name: Build + - name: Build with happy hack if: matrix.stack_yaml == 'oldest-supported-lts.yaml' run: | PATH="$HOME/.local/bin:$PATH" stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks From ff38144fcc26e1c0a985113cfd2b012cb9cefc70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 16:28:53 -0500 Subject: [PATCH 28/35] examine the build environment --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0f977f..da25e23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,8 @@ jobs: - name: Build if: matrix.stack_yaml == 'stack.yaml' run: | + ls /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_*_ghc-8.4.4 || true + file /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_*_ghc-8.4.4 || true stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks # For some reason, the HSinteger-gmp-1.0.2.0.o file which comes with ghc-8.4.4 is From 74294c2d83dc2954f009f181624da8466444b6f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 16:35:17 -0500 Subject: [PATCH 29/35] examine more --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da25e23..5e6e87f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,8 @@ jobs: - name: Build if: matrix.stack_yaml == 'stack.yaml' run: | - ls /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_*_ghc-8.4.4 || true + ls -l /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_*_ghc-8.4.4 || true + du -sh /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_*_ghc-8.4.4 || true file /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_*_ghc-8.4.4 || true stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks From 7de7b68f7e03e5df19d49a6c0746d02f1593e973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 17:13:32 -0500 Subject: [PATCH 30/35] skip the cache --- .github/workflows/ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e6e87f..cee89a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,14 +27,14 @@ jobs: - uses: actions/checkout@v2 if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' - - uses: actions/cache@v2 - name: Cache Stack Artifacts - with: - path: | - ~/.stack - ~/.local/bin - .stack-work - key: ${{ runner.os }}-stack-${{ hashFiles(matrix.stack_yaml) }} + # - uses: actions/cache@v2 + # name: Cache Stack Artifacts + # with: + # path: | + # ~/.stack + # ~/.local/bin + # .stack-work + # key: ${{ runner.os }}-stack-${{ hashFiles(matrix.stack_yaml) }} - uses: haskell/actions/setup@v1 id: setup-haskell-stack From 1fd25a05cb7f3f3781fe99e822a6ae2d6a0e0137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 17:38:28 -0500 Subject: [PATCH 31/35] use a new cache --- .github/workflows/ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cee89a1..d47f5f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,14 +27,14 @@ jobs: - uses: actions/checkout@v2 if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' - # - uses: actions/cache@v2 - # name: Cache Stack Artifacts - # with: - # path: | - # ~/.stack - # ~/.local/bin - # .stack-work - # key: ${{ runner.os }}-stack-${{ hashFiles(matrix.stack_yaml) }} + - uses: actions/cache@v2 + name: Cache Stack Artifacts + with: + path: | + ~/.stack + ~/.local/bin + .stack-work + key: ${{ runner.os }}-stack-${{ hashFiles(matrix.stack_yaml) }}-2 - uses: haskell/actions/setup@v1 id: setup-haskell-stack From 74a5ae06d0910c662eb81774db186c419cd71daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 20:13:11 -0500 Subject: [PATCH 32/35] Revert "examine more" This reverts commit 74294c2d83dc2954f009f181624da8466444b6f5. --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d47f5f3..02a2f8f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,8 +60,7 @@ jobs: - name: Build if: matrix.stack_yaml == 'stack.yaml' run: | - ls -l /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_*_ghc-8.4.4 || true - du -sh /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_*_ghc-8.4.4 || true + ls /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_*_ghc-8.4.4 || true file /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_*_ghc-8.4.4 || true stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks From 9e1495e7754a24f954eec69a5f35c67fa5c8a9c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 20:13:12 -0500 Subject: [PATCH 33/35] Revert "examine the build environment" This reverts commit ff38144fcc26e1c0a985113cfd2b012cb9cefc70. --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02a2f8f..870e4f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,8 +60,6 @@ jobs: - name: Build if: matrix.stack_yaml == 'stack.yaml' run: | - ls /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_*_ghc-8.4.4 || true - file /Users/runner/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_*_ghc-8.4.4 || true stack --stack-yaml=${{ matrix.stack_yaml }} build --test --bench --no-run-tests --no-run-benchmarks # For some reason, the HSinteger-gmp-1.0.2.0.o file which comes with ghc-8.4.4 is From cb2a5474a19a48d1ccc95380c01bd8bbc13c2b0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 20:13:13 -0500 Subject: [PATCH 34/35] Revert "focus on the failing macOS test" This reverts commit d3d2fe52ce7e28bbac571d4766ff687c4c68c2c1. --- .github/workflows/ci.yml | 66 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 870e4f9..565ce74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,9 +19,23 @@ jobs: strategy: matrix: include: + # Check that the build passes with the recommended snapshot on every + # platform. + - name: stable (Linux) + stack_yaml: "stack.yaml" + os: ubuntu-latest - name: stable (MacOS) stack_yaml: "stack.yaml" os: macos-latest + - name: stable (Windows) + stack_yaml: "stack.yaml" + os: windows-latest + + # Check that the lower bounds are still correct by building with the + # lowest-supported version of everything, including our dependencies. + - name: oldest + stack_yaml: "oldest-supported-lts.yaml" + os: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -72,3 +86,55 @@ jobs: - name: Test run: | stack --stack-yaml=${{ matrix.stack_yaml }} test + + cabal: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + # Check that our upper bounds are correct by building with the latest + # version of everything. We use cabal because it uses the latest + # versions of our dependencies allowed by our upper bounds. + - name: newest + ghc: 8.4.4 + os: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' + + - uses: haskell/actions/setup@v1 + id: setup-haskell-cabal + name: Setup Cabal + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + # This freeze file is regenerated on every build, so we will always test + # with the most recent version of our dependencies allowed by our upper + # bounds. + - name: Freeze + run: | + cabal configure --enable-tests --enable-benchmarks --test-show-details=direct + cabal freeze + cabal v1-sandbox init + cabal v1-install happy + + # Only reuse the cached copy of our dependencies if our freeze file matches + # the cache's copy. + - uses: actions/cache@v2 + name: Cache Cabal Artifacts + with: + path: | + ${{ steps.setup-haskell-cabal.outputs.cabal-store }} + .cabal-sandbox + key: ${{ runner.os }}-cabal-${{ hashFiles('cabal.project.freeze') }} + + - name: Build + run: | + cabal v1-install --enable-tests + + - name: Test + run: | + cabal v1-test From 68a7b01a34f8ca9493e63130f1fad2f45a2dc631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Mon, 28 Dec 2020 22:12:05 -0500 Subject: [PATCH 35/35] don't run CI on Windows --- .github/workflows/ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 565ce74..1d23ea5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,9 +27,11 @@ jobs: - name: stable (MacOS) stack_yaml: "stack.yaml" os: macos-latest - - name: stable (Windows) - stack_yaml: "stack.yaml" - os: windows-latest + + # Not currently running CI on Windows, see #239 + #- name: stable (Windows) + # stack_yaml: "stack.yaml" + # os: windows-latest # Check that the lower bounds are still correct by building with the # lowest-supported version of everything, including our dependencies.