From fb024d24476bf73a58824ddf8e41bf9c90ce5e35 Mon Sep 17 00:00:00 2001 From: Alexey Kuleshevich Date: Sat, 14 Dec 2024 09:26:32 -0700 Subject: [PATCH] Use stack for testing ghc-8.0 and ghc-8.2 GithubAction `haskell-actions/setup` is having trouble installing ghc-8.0 and 8.2 from hvr/ppa. This poses a problem for testing compatiblity with those ghc versions. Luckily stack is still capable of installing ghc, which means we can rely on testing with lts-9 and lts-11 --- .github/workflows/ci.yaml | 11 ++++++----- stack-custom.yaml | 19 +++++++++++++++++++ stack-old.yaml | 1 + stack-oldish.yaml | 1 + stack.yaml | 1 + 5 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 stack-custom.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d78c83fd..9a7a3453 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -102,11 +102,12 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - resolver: [nightly, lts-22, lts-21, lts-20, lts-19, lts-18, lts-16, lts-14, lts-12, lts-11] + resolver: [nightly, lts-22, lts-21, lts-20, lts-19, lts-18, lts-16, lts-14, lts-12, lts-11, lts-9] include: + - resolver: lts-9 + stack-yaml: stack-custom.yaml - resolver: lts-11 - ghc: '8.2.2' - stack-yaml: stack-old.yaml + stack-yaml: stack-custom.yaml - resolver: lts-12 ghc: '8.4.4' stack-yaml: stack-old.yaml @@ -165,7 +166,7 @@ jobs: stack-yaml: stack.yaml env: STACK_YAML: '${{ matrix.stack-yaml }}' - STACK_ARGS: '--resolver ${{ matrix.resolver }} --system-ghc' + STACK_ARGS: '--resolver ${{ matrix.resolver }}' cache-version: v5 # bump up this version to invalidate currently stored cache steps: - uses: actions/checkout@v4 @@ -176,7 +177,7 @@ jobs: with: ghc-version: ${{ matrix.ghc }} enable-stack: true - stack-version: ${{ matrix.resolver == 'lts-11' && '2.15.5' || 'latest' }} + stack-version: ${{ (matrix.resolver == 'lts-9' || matrix.resolver == 'lts-11') && '2.15.5' || 'latest' }} - name: Cache id: cache diff --git a/stack-custom.yaml b/stack-custom.yaml new file mode 100644 index 00000000..37e69f0d --- /dev/null +++ b/stack-custom.yaml @@ -0,0 +1,19 @@ +resolver: lts-11.22 +packages: +- . +extra-deps: +- splitmix-0.1@sha256:d50c4d0801a35be7875a040470c09863342514930c82a7d25780a6c2efc4fda9,5249 +- rdtsc-1.3.0.1@sha256:0a6e8dc715ba82ad72c7e2b1c2f468999559bec059d50540719a80b00dcc4e66,1557 +- smallcheck-1.2.0@sha256:8b431572e6a0503223e0e52014d41084c1b01f2aeea3bd499f6f529b3f6dfa89,1482 +- tasty-1.3.1@sha256:01e35c97f7ee5ccbc28f21debea02a38cd010d53b4c3087f5677c5d06617a507,2520 +- tasty-hunit-0.10.2@sha256:22bc1122e8256664d7cb1e44c6bcace95676c523179947bf2403db71af43dc6d,1473 +- ansi-wl-pprint-0.6.8.2@sha256:a890b713942c1aa0109fb632e9fee581ceb5b0763fd936ae8cae22e5f91a0877,2178 +- ansi-terminal-0.9.1@sha256:48f53532d0f365ffa568c8cf0adc84c66f800a7d80d3329e4f04fa75392f4af1,3225 +- wcwidth-0.0.2@sha256:77531eb6683c505c22ab3fa11bbc43d3ce1e7dac21401d4d5a19677d348bb5f3,1998 +- tasty-bench-0.2.3@sha256:daa2221a1b1c65990633a51236f1cb4a52cba8ef0f0731f653e712a8bab07616,1319 +- inspection-testing-0.4.5.0@sha256:938e7ce2ef42033071a5e60198c6e19ab61c411f5879b85821247a504f131768,8058 +- tasty-inspection-testing-0.1@sha256:9c5e76345168fd3a59b43d305eebf8df3c792ce324c66bbdee45b54aa7d2c0ad,1214 +- primitive-0.7.4.0@sha256:89b88a3e08493b7727fa4089b0692bfbdf7e1e666ef54635f458644eb8358764,2857 +- vector-0.12.3.1@sha256:fffbd00912d69ed7be9bc7eeb09f4f475e0d243ec43f916a9fd5bbd219ce7f3e,8238 +- data-array-byte-0.1.0.1@sha256:ad89e28b2b046175698fbf542af2ce43e5d2af50aae9f48d12566b1bb3de1d3c,1989 +- optparse-applicative-0.14.2.0@sha256:cfbc2df0d9e144d343ccea6d25ab27543c15ea17d2abcbabcdf76030a2236383,4359 diff --git a/stack-old.yaml b/stack-old.yaml index 8b10ec6e..e8422b15 100644 --- a/stack-old.yaml +++ b/stack-old.yaml @@ -1,4 +1,5 @@ resolver: lts-12.26 +system-ghc: true packages: - . extra-deps: diff --git a/stack-oldish.yaml b/stack-oldish.yaml index 06ec8886..d8e16bae 100644 --- a/stack-oldish.yaml +++ b/stack-oldish.yaml @@ -1,4 +1,5 @@ resolver: lts-18.28 +system-ghc: true packages: - . extra-deps: diff --git a/stack.yaml b/stack.yaml index 6eda0f02..6036e063 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,5 @@ resolver: lts-21.25 +system-ghc: true packages: - . extra-deps: []