Skip to content

CI: Try matrix build #177

CI: Try matrix build

CI: Try matrix build #177

Workflow file for this run

name: CI
on: [push]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- if: matrix.os == 'ubuntu-latest'
uses: actions/cache@v3
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-stack-${{ hashFiles('**/stack.yaml.lock') }}-${{ hashFiles('**/package.yaml') }}
restore-keys: |
${{ runner.os }}-stack-${{ hashFiles('**/stack.yaml.lock') }}-
${{ runner.os }}-stack-
- uses: haskell/actions/setup@v2
with:
ghc-version: "9.2.7"
enable-stack: true
stack-version: "latest"
- name: Build
run: stack build
- name: Run tests
run: stack test
- name: Run with --version
run: stack run -- --version
- name: Build statically linked
run: stack build --flag git-brunch:static
cabal:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
name: Cache cabal
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-cabal-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.freeze') }}
restore-keys: ${{ runner.os }}-cabal-
- uses: haskell/actions/setup@v2
with:
ghc-version: "9.2.7"
enable-stack: false
cabal-version: "latest"
- run: cabal update
- name: Build
run: cabal build
- name: Run tests
run: cabal test