Work around a bug in mergeWithKey #5
This file contains 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: CI | |
on: | |
push: | |
branches: | |
- "*" | |
pull_request: | |
branches: | |
- "*" | |
release: | |
types: | |
- prereleased | |
jobs: | |
build: | |
strategy: | |
matrix: | |
platform: | |
- ubuntu-latest | |
ghc_version: | |
- "8.6.5" | |
- "8.8.4" | |
- "8.10.7" | |
- "9.0.2" | |
- "9.2.8" | |
- "9.4.8" | |
- "9.6.3" | |
fail-fast: false | |
name: Build on Linux, GHC ${{ matrix.ghc_version }} | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: haskell/actions/setup@v2 | |
id: setup-haskell | |
with: | |
ghc-version: ${{ matrix.ghc_version }} | |
cabal-version: "3.10.1.0" | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
key: ${{ runner.os }}-stack-${{ matrix.ghc_version }} | |
- name: cabal configure | |
run: cabal configure --with-ghc=ghc-${{ matrix.ghc_version }} | |
- name: Install dependencies | |
run: cabal build --dependencies-only --enable-tests --haddock-all | |
- name: cabal build | |
run: cabal build --ghc-options=-Werror | |
- run: cabal check | |
- run: cabal haddock | |
dist: | |
needs: build | |
runs-on: ubuntu-latest | |
name: Build source tarball | |
if: github.event_name == 'release' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: haskell/actions/setup@v2 | |
with: | |
cabal-version: "3.10.1.0" | |
- name: cabal sdist | |
run: | | |
cabal sdist --output-dir "$GITHUB_WORKSPACE/sdist" | |
echo "dist=$(find "$GITHUB_WORKSPACE/sdist" -maxdepth 1 -type f -name '*.tar.gz')" >> "$GITHUB_ENV" | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: Source tarball | |
path: ${{ env.dist }} | |
- uses: svenstaro/[email protected] | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ env.dist }} | |
tag: ${{ github.ref }} | |
- name: Upload tarball to hackage | |
run: | | |
curl -X POST 'https://hackage.haskell.org/packages/candidates/' -H "Authorization: X-ApiKey ${{ secrets.HACKAGE_KEY }}" -F "package=@$dist" -w '%{url_effective}\n' |