Skip to content

Commit a1dfbc9

Browse files
committed
Convert to get-tested
1 parent 894fac2 commit a1dfbc9

File tree

2 files changed

+31
-29
lines changed

2 files changed

+31
-29
lines changed

.github/workflows/ci.yml

+30-28
Original file line numberDiff line numberDiff line change
@@ -7,46 +7,48 @@ on:
77
branches: ["main"]
88

99
jobs:
10-
native:
11-
name: "Native: GHC ${{ matrix.ghc }} on ${{ matrix.os }}"
10+
generate-matrix:
11+
name: "Generate matrix from cabal"
12+
outputs:
13+
matrix: ${{ steps.set-matrix.outputs.matrix }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Extract the tested GHC versions
17+
id: set-matrix
18+
uses: kleidukos/get-tested@v0.1.7.0
19+
with:
20+
cabal-file: plutus-integer-bytestring.cabal
21+
ubuntu-version: "latest"
22+
macos-version: "latest"
23+
windows-version: "latest"
24+
version: 0.1.7.0
25+
tests:
26+
name: ${{ matrix.ghc }} on ${{ matrix.os }}
27+
needs: generate-matrix
1228
runs-on: ${{ matrix.os }}
1329
strategy:
14-
fail-fast: false
15-
matrix:
16-
os: [ubuntu-latest, macos-latest, windows-latest]
17-
ghc: ['8.10', '9.2', '9.6']
30+
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
1831
steps:
1932
- name: Checkout base repo
2033
uses: actions/checkout@v4
21-
- name: Set up Haskell
22-
id: setup
34+
- name: Setup Haskell
35+
id: haskell-setup
2336
uses: haskell-actions/setup@v2
2437
with:
2538
ghc-version: ${{ matrix.ghc }}
26-
cabal-version: 'latest'
39+
cabal-version: "latest"
2740
- name: Configure
2841
run: |
2942
cabal configure --enable-tests
30-
cabal build --dry-run
31-
- name: Restore cached dependencies
32-
uses: actions/cache/restore@v3
33-
id: cache
34-
env:
35-
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}
36-
with:
37-
path: ${{ steps.setup.outputs.cabal-store }}
38-
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}
39-
restore-keys: ${{ env.key }}-
40-
- name: Install dependencies
41-
if: steps.cache.outputs.cache-hit != 'true'
42-
run: cabal build all --only-dependencies
43-
- name: Save cached dependencies
44-
uses: actions/cache/save@v3
45-
if: steps.cache.outputs.cache-hit != 'true'
43+
cabal freeze
44+
- name: Cache
45+
uses: actions/cache@v4.0.0
4646
with:
47-
path: ${{ steps.setup.outputs.cabal-store }}
48-
key: ${{ steps.cache.outputs.cache-primary-key }}
47+
path: ${{ steps.haskell-setup.outputs.cabal-store }}
48+
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-cabal-${{ hashFiles('**/plan.json') }}
49+
restore-keys: ${{ runner.os }}-ghc-${{ matrix.ghc }}-
4950
- name: Build
5051
run: cabal build
51-
- name: Test
52+
- name: Run tests
5253
run: cabal test
54+

plutus-integer-bytestring.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ maintainer: koz@mlabs.city
1111
bug-reports: https://github.com/mlabs-haskell/plutus-integer-bytestring
1212
copyright: (C) MLabs 2023
1313
category: Plutus
14-
tested-with: GHC ==9.6.3
14+
tested-with: GHC ==8.10.7 || ==9.6.3
1515
build-type: Simple
1616
extra-source-files:
1717
CHANGELOG.md

0 commit comments

Comments
 (0)