Skip to content

Release 1.2

Release 1.2 #496

Workflow file for this run

on:
workflow_dispatch:
pull_request:
push:
branches:
- master
schedule:
- cron: '23 14 * * 2'
release:
name: build
jobs:
lint:
name: "Run hlint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up HLint
uses: haskell/actions/hlint-setup@v2
- name: Run HLint
uses: haskell/actions/hlint-run@v2
with:
fail-on: warning
fourmolu:
name: "Run fourmolu"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/run-fourmolu@v9
with:
version: "0.11.0.0"
generateMatrix:
name: "Generate matrix from cabal"
runs-on: ubuntu-latest
steps:
- uses: kleidukos/get-tested@v0.1.6.0
with:
cabal-file: "rhine/rhine.cabal"
ubuntu: true
build-cabal:
runs-on: ubuntu-latest
needs: generateMatrix
strategy:
matrix: ${{ fromJSON(needs.generateMatrix.outputs.matrix) }}
name: Haskell GHC ${{ matrix.ghc }} cabal
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc }}
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev
- name: Cache Cabal build artifacts
uses: actions/cache@v3
with:
path: |
${{ steps.setup-haskell-build.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-cabal-${{ matrix.ghc }}
restore-keys: |
${{ runner.os }}-cabal-${{ matrix.ghc }}
- name: Cabal build dependencies
run: cabal build all --enable-tests --only-dependencies
- name: Cabal build packages
run: cabal build all --enable-tests -fdev
- name: Cabal test
run: cabal test all --enable-tests --test-show-details=Always
build-stack:
runs-on: ubuntu-latest
needs: generateMatrix
strategy:
matrix: ${{ fromJSON(needs.generateMatrix.outputs.matrix) }}
name: Haskell GHC ${{ matrix.ghc }} stack
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev
- name: Cache stack build artifacts
uses: freckle/stack-cache-action@v2
with:
stack-yaml: stack.${{ matrix.ghc }}.yaml
- name: Stack build and test
run: |
stack build --system-ghc --test --stack-yaml stack.${{ matrix.ghc }}.yaml
build-flake:
name: Nix Flake
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v24
- name: Build all packages
run: nix build
- name: Run tests
run: nix develop -c cabal test all
# nix flake check breaks on IFD in multi-platform flake https://github.com/NixOS/nix/issues/4265
# - run: nix flake check
cabal-check:
name: Check all cabal files
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: ./cabal_check.sh
success:
name: Success
needs:
- build-cabal
- build-flake
- build-stack
runs-on:
- ubuntu-latest
steps:
- run: echo "Success"