Skip to content

Update devx.yml

Update devx.yml #34

Workflow file for this run

name: DevX/Haskell
on:
push:
workflow_dispatch:
defaults:
run:
shell: devx {0}
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [ x86_64-linux, x86_64-darwin ]
compiler-nix-name: [ ghc810, ghc96 ]
target-platform: [ "", "-windows" ]
env:
# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "2023-04-18"
runs-on: ${{ matrix.platform == 'x86_64-linux' && 'ubuntu-latest' || 'macos-latest' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install GHC and Cabal
uses: input-output-hk/actions/devx@latest
with:
platform: ${{ matrix.platform }}
target-platform: ${{ matrix.target-platform }}
compiler-nix-name: ${{ matrix.compiler-nix-name }}
# for now we'll set minimal to false, as minimal-iog images don't exist.
minimal: false
iog: true
- name: cabal update
run: cabal update
- name: Cache Cabal store
uses: actions/cache@v4
with:
path: |
/home/runner/.cabal${{ matrix.target-platform }}/store
dist-newstyle
key: cache-devx-${{ env.CABAL_CACHE_VERSION }}-${{ matrix.platform }}.${{ matrix.compiler-nix-name }}${{ matrix.target-platform }}-${{ hashFiles('dependencies.txt') }}
- name: cabal build dependencies
run: cabal build all -j --enable-tests --only-dependencies
- name: cabal build
run: cabal build all -j --enable-tests
- name: cabal test
run: cabal test all -j --enable-tests --test-show-details=direct