Prepare release 1.6 (#456) #724
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: Haskell CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
ghc: ['9.2.4', '9.0.2', '8.10.7', '8.8.4', '8.6.5'] | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
ospath: [true, false] | |
exclude: | |
# newer 'entropy' doesn't work with old 'unix', and it doesn't have a correct version bound. | |
- ospath: true | |
ghc: 8.6.5 | |
# "cabal build" always timeout | |
- ospath: true | |
ghc: 8.8.4 | |
os: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: haskell/actions/setup@v1 | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: '3.6' | |
- name: Cabal cache | |
uses: actions/cache@v1 | |
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 }}- | |
- name: Stack cache | |
uses: actions/cache@v1 | |
env: | |
cache-name: cache-stack | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/stack.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
- name: Cabal update | |
run: cabal update | |
- name: Cabal configure | |
shell: bash | |
run: | | |
if [ ${{ matrix.ospath }} = "true" ]; then | |
cabal configure --flags="force-ospath" | |
fi | |
- name: Build using cabal | |
run: cabal build all | |
- name: Test | |
run: cabal test all | |
# stack build uses stack.yaml which actually uses ghc-8.10.7 | |
- if: matrix.ghc == '8.10.7' && runner.os == 'Linux' | |
name: Build using stack | |
run: stack build | |
haskell_post_job: | |
runs-on: ubuntu-latest | |
needs: [ build ] | |
steps: | |
- run: | | |
echo "jobs info: ${{ toJSON(needs) }}" | |
- if: contains(needs.*.result, 'failure') | |
run: exit 1 | |
- if: contains(needs.*.result, 'cancelled') && needs.pre_job.outputs.should_skip != 'true' | |
run: exit 1 |