From a9d5d06f99c6844c95462c2e326cc35b3619c5f1 Mon Sep 17 00:00:00 2001 From: Kevin Hoffman Date: Tue, 5 Dec 2023 18:19:14 -0500 Subject: [PATCH 1/3] Create haskell.yml --- .github/workflows/haskell.yml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/haskell.yml diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml new file mode 100644 index 0000000..797dd39 --- /dev/null +++ b/.github/workflows/haskell.yml @@ -0,0 +1,43 @@ +name: Haskell CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-haskell@v1 + with: + ghc-version: '8.10.3' + cabal-version: '3.2' + + - name: Cache + uses: actions/cache@v3 + env: + cache-name: cache-cabal + with: + path: ~/.cabal + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Install dependencies + run: | + cabal update + cabal build --only-dependencies --enable-tests --enable-benchmarks + - name: Build + run: cabal build --enable-tests --enable-benchmarks all + - name: Run tests + run: cabal test all From 179051d26b8e95992a16f8a5346caf19274af951 Mon Sep 17 00:00:00 2001 From: Kevin Hoffman Date: Tue, 5 Dec 2023 18:23:23 -0500 Subject: [PATCH 2/3] Update haskell.yml --- .github/workflows/haskell.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 797dd39..2a1f18d 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -18,8 +18,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-haskell@v1 with: - ghc-version: '8.10.3' - cabal-version: '3.2' + ghc-version: '9.4.7' + cabal-version: '3.10.2.0' - name: Cache uses: actions/cache@v3 From b08e58dc690c433fba7886d8b9a849658a6cb3e7 Mon Sep 17 00:00:00 2001 From: Kevin Hoffman Date: Tue, 5 Dec 2023 18:25:05 -0500 Subject: [PATCH 3/3] Update haskell.yml --- .github/workflows/haskell.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 2a1f18d..845ee87 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -17,10 +17,6 @@ jobs: steps: - uses: actions/checkout@v3 - uses: actions/setup-haskell@v1 - with: - ghc-version: '9.4.7' - cabal-version: '3.10.2.0' - - name: Cache uses: actions/cache@v3 env: