Skip to content

Commit

Permalink
Merge pull request #169 from haskell-works/newhoggy/update-ci
Browse files Browse the repository at this point in the history
Update CI
  • Loading branch information
newhoggy authored Jan 7, 2024
2 parents 4ffda37 + 796a90c commit c9761c0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 25 deletions.
38 changes: 18 additions & 20 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,30 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["9.2.2", "9.0.2", "8.10.7", "8.8.4", "8.6.5"]
os: [ubuntu-latest, macOS-latest, windows-latest]
ghc: ["9.8.1", "9.6.3", "9.4.8", "9.2.8", "9.0.2", "8.10.7"]
os: [ubuntu-latest, macOS-latest]

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

steps:
- uses: actions/checkout@v2

- uses: haskell/actions/setup@v1
- uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: 3.6.2.0

- name: Default build directory
run: echo "CABAL_BUILDDIR=dist-newstyle" >> $GITHUB_ENV
cabal-version: '3.10.2.1'

- name: Set some window specific things
if: matrix.os == 'windows-latest'
run: |
echo 'EXE_EXT=.exe' >> $GITHUB_ENV
echo "CABAL_BUILDDIR=D:\\a\\dist" >> $GITHUB_ENV
run: echo 'EXE_EXT=.exe' >> $GITHUB_ENV

- name: Configure project
run: cabal configure --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+ --builddir="$CABAL_BUILDDIR"
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 @@ -48,29 +49,26 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
region: us-west-2
dist-dir: ${{ env.CABAL_BUILDDIR }}
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
uses: action-works/cabal-cache-s3@v1
with:
dist-dir: ${{ env.CABAL_BUILDDIR }}
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
# Try building it twice in case of flakey builds on Windows
run: |
cabal build all --enable-tests --enable-benchmarks --builddir="$CABAL_BUILDDIR"
run: cabal build all --enable-tests --enable-benchmarks

- name: Test
run: |
cabal test all --enable-tests --enable-benchmarks --builddir="$CABAL_BUILDDIR"
run: cabal test all --enable-tests --enable-benchmarks

check:
needs: build
Expand Down
10 changes: 5 additions & 5 deletions hw-balancedparens.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ source-repository head

common base { build-depends: base >= 4.11 && < 5 }

common bytestring { build-depends: bytestring >= 0.9 && < 0.12 }
common bytestring { build-depends: bytestring >= 0.9 && < 0.13 }
common criterion { build-depends: criterion >= 1.2 && < 1.7 }
common deepseq { build-depends: deepseq >= 1.4.2.0 && < 1.5 }
common deepseq { build-depends: deepseq >= 1.4.2.0 && < 1.6 }
common directory { build-depends: directory >= 1.2.2 && < 1.4 }
common doctest { build-depends: doctest >= 0.16.2 && < 0.21 }
common doctest { build-depends: doctest >= 0.16.2 && < 0.23 }
common doctest-discover { build-depends: doctest-discover >= 0.2 && < 0.3 }
common generic-lens { build-depends: generic-lens >= 1.2.0.0 && < 2.3 }
common hedgehog { build-depends: hedgehog >= 1.0 && < 1.3 }
common hedgehog { build-depends: hedgehog >= 1.0 && < 1.5 }
common hspec { build-depends: hspec >= 2.2 && < 3 }
common hw-hspec-hedgehog { build-depends: hw-hspec-hedgehog >= 0.1 && < 0.2 }
common hw-bits { build-depends: hw-bits >= 0.7.2.1 && < 0.8 }
Expand All @@ -40,7 +40,7 @@ common hw-prim { build-depends: hw-prim >=
common hw-rankselect-base { build-depends: hw-rankselect-base >= 0.3.2.1 && < 0.4 }
common lens { build-depends: lens >= 4 && < 6 }
common mmap { build-depends: mmap >= 0.5.9 && < 0.6 }
common optparse-applicative { build-depends: optparse-applicative >= 0.14 && < 0.18 }
common optparse-applicative { build-depends: optparse-applicative >= 0.14 && < 0.19 }
common transformers { build-depends: transformers >= 0.5.6.2 && < 0.7 }
common vector { build-depends: vector >= 0.12 && < 0.14 }

Expand Down

0 comments on commit c9761c0

Please sign in to comment.