Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Jan 7, 2024
1 parent 16c38ab commit 486b6e3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 31 deletions.
55 changes: 25 additions & 30 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: Build
name: Binaries

defaults:
run:
shell: bash

on:
push:
merge_group:
branches:
- main
pull_request:

jobs:
build:
Expand All @@ -15,35 +17,33 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["9.4.4", "9.2.5", "9.0.2", "8.10.7"]
cabal: ["3.8.1.0"]
os: [ubuntu-latest]

concurrency:
group: >
a+${{ github.event_name }}
b+${{ github.workflow_ref }}
c+${{ github.job }}
d+${{ matrix.ghc }}
e+${{ matrix.cabal }}
f+${{ matrix.os }}
g+${{ (startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.run_id) || github.event.pull_request.number || github.ref }}
cancel-in-progress: true
ghc: ["9.8.1", "9.6.3", "9.4.8", "9.2.8", "9.0.2", "8.10.7"]
os: [ubuntu-latest, macOS-latest, windows-latest]
exclude:
- os: windows-latest
ghc: "9.4.2"

env:
# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "2024-01-05"

steps:
- uses: actions/checkout@v2

- uses: input-output-hk/setup-haskell@v1
- uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
cabal-version: '3.10.2.1'

- name: Set some window specific things
if: matrix.os == 'windows-latest'
run: echo 'EXE_EXT=.exe' >> $GITHUB_ENV

- name: Configure project
run: |
cabal update
cabal configure --enable-tests --enable-benchmarks --write-ghc-environment-files=always
cabal build all --dry-run
cabal configure --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+
cabal build all --enable-tests --enable-benchmarks --dry-run
- name: Cabal cache over S3
uses: action-works/cabal-cache-s3@v1
Expand All @@ -55,7 +55,7 @@ jobs:
dist-dir: dist-newstyle
store-path: ${{ steps.setup-haskell.outputs.cabal-store }}
threads: 16
archive-uri: ${{ secrets.BINARY_CACHE_URI }}
archive-uri: ${{ secrets.BINARY_CACHE_URI }}/${{ env.CABAL_CACHE_VERSION }}/${{ runner.os }}/${{ matrix.cabal }}/${{ matrix.ghc }}
skip: "${{ secrets.BINARY_CACHE_URI == '' }}"

- name: Cabal cache over HTTPS
Expand All @@ -64,14 +64,14 @@ jobs:
dist-dir: dist-newstyle
store-path: ${{ steps.setup-haskell.outputs.cabal-store }}
threads: 16
archive-uri: https://cache.haskellworks.io/archive
archive-uri: https://cache.haskellworks.io/${{ env.CABAL_CACHE_VERSION }}/${{ runner.os }}/${{ matrix.cabal }}/${{ matrix.ghc }}
skip: "${{ secrets.BINARY_CACHE_URI != '' }}"

- name: Build
run: cabal build all
run: cabal build all --enable-tests --enable-benchmarks

- name: Test
run: cabal test all
run: cabal test all --enable-tests --enable-benchmarks

check:
needs: build
Expand All @@ -82,11 +82,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: input-output-hk/setup-haskell@v1
id: setup-haskell
with:
cabal-version: 3.8.1.0

- name: Check if cabal project is sane
run: |
PROJECT_DIR=$PWD
Expand Down
2 changes: 1 addition & 1 deletion oops.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ common base { build-depends: base

common base-compat { build-depends: base-compat >= 0.10.5 && < 0.14 }
common Glob { build-depends: Glob >= 0.10.2 && < 0.11 }
common doctest { build-depends: doctest >= 0.16.2 && < 0.22 }
common doctest { build-depends: doctest >= 0.16.2 && < 0.23 }
common doctest-discover { build-depends: doctest-discover >= 0.2 && < 0.3 }
common doctest-prop { build-depends: doctest-prop >= 0.2.0.1 && < 0.3 }
common exceptions { build-depends: exceptions }
Expand Down

0 comments on commit 486b6e3

Please sign in to comment.