Skip to content

Global object matching #128

Global object matching

Global object matching #128

Workflow file for this run

name: GHC (build, test, haddock)
# Controls when the workflow will run
on:
push:
branches: [master]
tags: [v*]
pull_request:
branches: [master]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: write # to submit Haddock documentation to GitHub Pages
jobs:
build:
name: "Build and test with GHC"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4
- uses: haskell-actions/run-fourmolu@v10
if: matrix.os == 'ubuntu-latest'
with:
version: "0.14.0.0"
pattern: |
eo-phi-normalizer/**/*.hs
!eo-phi-normalizer/src/Language/EO/Phi/Syntax/**/*.hs
!eo-phi-normalizer/Setup.hs
- name: 🧰 Setup Stack
uses: freckle/stack-action@v5
with:
stack-build-arguments: --${{ github.ref_name != 'master' && 'fast' || '' }} --pedantic
pipeline:
name: "Run pipeline"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
program: [1]
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4
- name: 🧰 Setup Stack
uses: freckle/stack-action@v5
with:
stack-build-arguments: --${{ github.ref_name != 'master' && 'fast' || '' }} --pedantic
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: 21
- name: Install EO
run: npm install -g [email protected]
- name: Run pipeline
run: ./pipeline.sh
env:
PROGRAM: ${{ matrix.program }}
haddock:
needs: [build]
if: ${{ github.ref_name == 'master' }}
name: "Build and upload Haddock documentation (master)"
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4
- name: 🧰 Setup Stack
uses: freckle/stack-action@v4
with:
test: false
- name: 🔨 Build Haddock Documentation (with Stack)
run: |
stack haddock
mkdir -p dist/haddock
mv $(stack path --local-doc-root)/* dist/haddock
- name: 🚀 Publish Haddock Documentation
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
folder: dist/haddock
target-folder: haddock
single-commit: true