From f6d0fdb1d213e5acb1bed88e9a1abd86311884bb Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 16:40:27 +0200 Subject: [PATCH] Simplify Stack CI (#2579) (#2580) For Stack CI, GHC doesn't need to be installed globally; only the version installed by Stack is actually used. Also bump to the latest LTS'es Fix running of bash snippets/scripts in GitHub Stack CI Co-authored-by: Peter Lebbing --- .ci/{stack-8.10.7.yaml => stack-8.10.yaml} | 3 +-- .ci/{stack-8.6.5.yaml => stack-8.6.yaml} | 0 .ci/{stack-8.8.4.yaml => stack-8.8.yaml} | 0 .ci/{stack-9.0.2.yaml => stack-9.0.yaml} | 3 +-- .github/workflows/ci.yml | 17 +++++++++++++---- 5 files changed, 15 insertions(+), 8 deletions(-) rename .ci/{stack-8.10.7.yaml => stack-8.10.yaml} (95%) rename .ci/{stack-8.6.5.yaml => stack-8.6.yaml} (100%) rename .ci/{stack-8.8.4.yaml => stack-8.8.yaml} (100%) rename .ci/{stack-9.0.2.yaml => stack-9.0.yaml} (88%) diff --git a/.ci/stack-8.10.7.yaml b/.ci/stack-8.10.yaml similarity index 95% rename from .ci/stack-8.10.7.yaml rename to .ci/stack-8.10.yaml index 1a29410870..2d7b102a02 100644 --- a/.ci/stack-8.10.7.yaml +++ b/.ci/stack-8.10.yaml @@ -1,4 +1,4 @@ -resolver: lts-18.24 +resolver: lts-18.28 packages: - clash-prelude @@ -13,4 +13,3 @@ extra-deps: - doctest-parallel-0.2.1@sha256:c6c0d095dd6e0b8ce1bd9f6f5fc4e0cf5cf50b6895b557356ac41b8aa2947399,5631 - fakedata-1.0.2@sha256:37c93be9a81acbc9109e2c0b300a793d9c1f5ead1d34330d869d76568191f428,24593 - tasty-1.2.3@sha256:bba67074e5326d57e8f53fc1dabcb6841daa4dc51b053506eb7f40a6f49a0497,2517 - diff --git a/.ci/stack-8.6.5.yaml b/.ci/stack-8.6.yaml similarity index 100% rename from .ci/stack-8.6.5.yaml rename to .ci/stack-8.6.yaml diff --git a/.ci/stack-8.8.4.yaml b/.ci/stack-8.8.yaml similarity index 100% rename from .ci/stack-8.8.4.yaml rename to .ci/stack-8.8.yaml diff --git a/.ci/stack-9.0.2.yaml b/.ci/stack-9.0.yaml similarity index 88% rename from .ci/stack-9.0.2.yaml rename to .ci/stack-9.0.yaml index 8873f0a5a2..03b540a182 100644 --- a/.ci/stack-9.0.2.yaml +++ b/.ci/stack-9.0.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2022-02-19 +resolver: lts-19.33 packages: - clash-prelude @@ -11,4 +11,3 @@ packages: extra-deps: - tasty-1.2.3@sha256:bba67074e5326d57e8f53fc1dabcb6841daa4dc51b053506eb7f40a6f49a0497,2517 - diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 088d8fc7ce..8e2d5ea7ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,24 +22,29 @@ jobs: fail-fast: false matrix: os: ["macOS", "windows"] - ghc: ["8.6.5", "8.8.4", "8.10.7", "9.0.2"] + ghc: ["8.6", "8.8", "8.10", "9.0"] exclude: # Some tests fail with a mysterious -11 error code. - os: macOS - ghc: 8.10.7 + ghc: 8.10 # Windows gets non-deterministically gets stuck in infinite loops # or segfaults while running the testcase. - os: windows - ghc: 8.8.4 + ghc: 8.8 + + # GHC 9.0 fails to compile clash-cores due to a template haskell + # failure + - os: windows + ghc: 9.0 steps: - uses: actions/checkout@v3 - uses: haskell/actions/setup@v2 id: setup-haskell with: - ghc-version: ${{ matrix.ghc }} enable-stack: true + stack-no-global: true - name: Install IVerilog (macOS) if: matrix.os == 'macOS' @@ -50,8 +55,11 @@ jobs: run: choco install --no-progress iverilog - name: General Setup + shell: bash run: | cp .ci/stack-${{ matrix.ghc }}.yaml stack.yaml + # Print out stack.yaml for debugging purposes + cat stack.yaml - name: Cache (Windows) if: ${{ runner.os == 'Windows' }} @@ -79,6 +87,7 @@ jobs: # Retry Stack initialization, see: # https://github.com/commercialhaskell/stack/issues/5770 - name: Initialize Stack + shell: bash run: ./.ci/initialize_stack.sh - name: Build with Stack