Merge pull request #152 from Haskell-Things/more_debugging #1212
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 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: "actions/checkout@v3" | |
- id: setup-haskell-cabal | |
uses: "haskell-actions/setup@v2" | |
with: | |
cabal-version: "${{ matrix.cabal }}" | |
enable-stack: false | |
ghc-version: "${{ matrix.ghc }}" | |
- name: Update Hackage repository | |
run: cabal update | |
- name: cabal.project.local.ci | |
run: | | |
if [ -e cabal.project.local.ci ]; then | |
cp cabal.project.local.ci cabal.project.local | |
fi | |
- name: freeze | |
run: cabal freeze | |
- name: Restore build artifacts | |
id: build-hslice-restore | |
uses: "actions/cache/restore@v4" | |
with: | |
key: "${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('cabal.project.freeze') }}" | |
path: | | |
"${{ steps.setup-haskell-cabal.outputs.cabal-store }}" | |
~/.cabal/packages | |
~/.cabal/store | |
~/.cabal/bin | |
dist-newstyle | |
~/.local/bin | |
- name: Install dependencies | |
run: cabal build all --enable-tests --enable-benchmarks --only-dependencies | |
- name: build all | |
run: cabal build all --enable-tests --enable-benchmarks | |
- name: Save build artifacts | |
uses: "actions/cache/save@v4" | |
with: | |
key: "${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('cabal.project.freeze') }}" | |
path: | | |
"${{ steps.setup-haskell-cabal.outputs.cabal-store }}" | |
~/.cabal/packages | |
~/.cabal/store | |
~/.cabal/bin | |
dist-newstyle | |
~/.local/bin | |
strategy: | |
matrix: | |
cabal: | |
- '3.10' | |
ghc: | |
- '9.4.6' | |
- '9.2.8' | |
- '9.0.2' | |
- '8.10.7' | |
test: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: "actions/checkout@v3" | |
- id: setup-haskell-cabal | |
uses: "haskell-actions/setup@v2" | |
with: | |
cabal-version: "${{ matrix.cabal }}" | |
enable-stack: false | |
ghc-version: "${{ matrix.ghc }}" | |
- name: Update Hackage repository | |
run: cabal update | |
- name: cabal.project.local.ci | |
run: | | |
if [ -e cabal.project.local.ci ]; then | |
cp cabal.project.local.ci cabal.project.local | |
fi | |
- name: freeze | |
run: cabal freeze | |
- name: Restore build artifacts | |
uses: "actions/cache/restore@v4" | |
id: build-hslice-restore | |
with: | |
key: "${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('cabal.project.freeze') }}" | |
path: | | |
"${{ steps.setup-haskell-cabal.outputs.cabal-store }}" | |
~/.cabal/packages | |
~/.cabal/store | |
~/.cabal/bin | |
dist-newstyle | |
~/.local/bin | |
- name: Install dependencies | |
run: cabal build all --enable-tests --enable-benchmarks --only-dependencies | |
- name: build all | |
run: cabal build all --enable-tests --enable-benchmarks | |
- name: Save build artifacts | |
uses: "actions/cache/save@v4" | |
with: | |
key: "${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('cabal.project.freeze') }}" | |
path: | | |
"${{ steps.setup-haskell-cabal.outputs.cabal-store }}" | |
~/.cabal/packages | |
~/.cabal/store | |
~/.cabal/bin | |
dist-newstyle | |
~/.local/bin | |
- name: test all | |
run: cabal test test-hslice --enable-tests | |
strategy: | |
matrix: | |
cabal: | |
- '3.10' | |
ghc: | |
- '9.4.6' | |
- '9.2.8' | |
- '9.0.2' | |
- '8.10.7' | |
haddock: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: "actions/checkout@v3" | |
- id: setup-haskell-cabal | |
uses: "haskell-actions/setup@v2" | |
with: | |
cabal-version: "${{ matrix.cabal }}" | |
enable-stack: false | |
ghc-version: "${{ matrix.ghc }}" | |
- name: Update Hackage repository | |
run: cabal update | |
- name: cabal.project.local.ci | |
run: | | |
if [ -e cabal.project.local.ci ]; then | |
cp cabal.project.local.ci cabal.project.local | |
fi | |
- name: freeze | |
run: cabal freeze | |
- name: Restore build artifacts | |
uses: "actions/cache/restore@v4" | |
id: build-hslice-restore | |
with: | |
key: "${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('cabal.project.freeze') }}" | |
path: | | |
"${{ steps.setup-haskell-cabal.outputs.cabal-store }}" | |
~/.cabal/packages | |
~/.cabal/store | |
~/.cabal/bin | |
dist-newstyle | |
~/.local/bin | |
- name: Install dependencies | |
run: cabal build all --enable-tests --enable-benchmarks --only-dependencies | |
- name: build all | |
run: cabal build all --enable-tests --enable-benchmarks | |
- name: Save build artifacts | |
uses: "actions/cache/save@v4" | |
with: | |
key: "${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('cabal.project.freeze') }}" | |
path: | | |
"${{ steps.setup-haskell-cabal.outputs.cabal-store }}" | |
~/.cabal/packages | |
~/.cabal/store | |
~/.cabal/bin | |
dist-newstyle | |
~/.local/bin | |
- name: haddock all | |
run: cabal haddock all | |
strategy: | |
matrix: | |
cabal: | |
- '3.10' | |
ghc: | |
- '9.4.6' | |
- '9.2.8' | |
- '9.0.2' | |
- '8.10.7' |