Support GHC 9.14 #388
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: github-action | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ghc: ['8.4', '8.6', '8.8', '8.10', '9.0', '9.2', '9.4', '9.6', '9.8', '9.10', '9.12', '9.14'] | |
| os: ['ubuntu-latest', 'macos-13'] | |
| exclude: | |
| - os: 'macos-13' | |
| ghc: '8.4' | |
| - os: 'macos-13' | |
| ghc: '8.6' | |
| - os: 'macos-13' | |
| ghc: '8.8' | |
| runs-on: ${{ matrix.os }} | |
| name: GHC ${{ matrix.ghc }} on ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: haskell-actions/setup@v2 | |
| with: | |
| ghc-version: ${{ matrix.ghc }} | |
| cabal-version: '3.10.3.0' | |
| - name: Cache | |
| uses: actions/cache@v3 | |
| env: | |
| cache-name: cache-cabal | |
| with: | |
| path: ~/.cabal | |
| key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}- | |
| ${{ runner.os }}-${{ matrix.ghc }}-build- | |
| ${{ runner.os }}-${{ matrix.ghc }}- | |
| ${{ runner.os }} | |
| - name: macos sdk seup | |
| if: runner.os == 'macOS' | |
| run: | | |
| sudo xcode-select -s /Applications/Xcode.app | |
| echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> "$GITHUB_ENV" | |
| echo "MAC_LD_OPTS=-optl-Wl,-syslibroot,${SDKROOT} -optl-F${SDKROOT}/System/Library/Frameworks" >> "$GITHUB_ENV" | |
| - name: Install dependencies | |
| run: | | |
| cabal update | |
| if [[ "$RUNNER_OS" == "macOS" ]]; then | |
| cabal build --only-dependencies --enable-tests --enable-benchmarks --ghc-options="${MAC_LD_OPTS}" | |
| else | |
| cabal build --only-dependencies --enable-tests --enable-benchmarks | |
| fi | |
| - name: Build | |
| run: | | |
| if [[ "$RUNNER_OS" == "macOS" ]]; then | |
| cabal build --enable-tests --enable-benchmarks all --ghc-options="${MAC_LD_OPTS}" | |
| else | |
| cabal build --enable-tests --enable-benchmarks all | |
| fi | |
| - name: Run tests | |
| run: | | |
| if [[ "$RUNNER_OS" == "macOS" ]]; then | |
| cabal test --enable-tests all --ghc-options="${MAC_LD_OPTS}" | |
| else | |
| cabal test --enable-tests all | |
| fi | |
| - if: matrix.ghc != '8.4' | |
| # docs aren't built on ghc 8.4.4 because some dependency docs don't build on older GHCs | |
| name: Build Docs | |
| run: | | |
| if [[ "$RUNNER_OS" == "macOS" ]]; then | |
| cabal haddock --ghc-options="${MAC_LD_OPTS}" | |
| else | |
| cabal haddock | |
| fi |