Skip to content

Hackage, Cabal, macOS #2311

Hackage, Cabal, macOS

Hackage, Cabal, macOS #2311

Workflow file for this run

name: "Hackage, Cabal, macOS"
on:
pull_request:
push:
branches:
- master
schedule:
- cron: "30 04 * * *"
env:
cabalConfig: --enable-tests --disable-optimization --enable-deterministic
jobs:
build10:
name: "GHC"
runs-on: macos-latest
strategy:
matrix:
# It is dev env, so trying to stick to last GHC.
ghc: [ "9.6" ]
steps:
- name: "Git checkout"
uses: actions/checkout@v4
with:
submodules: recursive
- name: "Haskell env setup"
id: HaskEnvSetup
uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
- name: "Repository update"
run: cabal v2-update
# Still required for Remote and some builtins
- name: "Install Nix"
uses: cachix/install-nix-action@v25
# NOTE: Freeze is for the caching
- name: "Configuration freeze"
run: cabal v2-freeze $cabalConfig
- name: "Configuring GitHub cache"
uses: actions/cache@v3
with:
path: |
${{ steps.HaskEnvSetup.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-Cabal-${{ hashFiles( 'cabal.project.freeze' ) }}
restore-keys: ${{ runner.os }}-Cabal-
- name: "Build"
run: cabal v2-build $cabalConfig
- name: "Tests"
run: cabal v2-test $cabalConfig