Skip to content

stack is removed from the hlint steps #388

stack is removed from the hlint steps

stack is removed from the hlint steps #388

name: hlint-from-scratch
on:
push:
pull_request:
workflow_dispatch:
workflow_call:
schedule:
- cron: '0 0 * * *' # every day
jobs:
hlint-from-scratch-ubuntu:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos] #, windows]
steps:
- uses: actions/checkout@v4
- name: Install build tools (macOS)
run: brew install automake
if: matrix.os == 'macos'
- name: Configure msys2 (windows)
shell: bash
run: |-
echo "MSYSTEM=CLANG64" >> $GITHUB_ENV
echo "/c/mingw64/usr/bin" >> $GITHUB_PATH
echo "/c/msys64/usr/bin" >> $GITHUB_PATH
if: matrix.os == 'windows'
- name: Install stack
shell: bash
run: curl -sSL https://get.haskellstack.org/ | sh -s - -f
- name: Install ghcup (windows)
shell: bash
run: |-
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_GHC_VERSION=9.8.2 BOOTSTRAP_HASKELL_CABAL_VERSION=latest BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK_HOOK=1 BOOTSTRAP_HASKELL_ADJUST_BASHRC=N sh
echo "/c/ghcup/bin" >> $GITHUB_PATH
echo "/c/ghcup/ghc/9.8.2/bin" >> $GITHUB_PATH
if: matrix.os == 'windows'
- name: Install ghcup (unix)
shell: bash
run: |-
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_GHC_VERSION=9.8.2 BOOTSTRAP_HASKELL_CABAL_VERSION=latest BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK_HOOK=1 BOOTSTRAP_HASKELL_ADJUST_BASHRC=N sh
echo "$HOME/.ghcup/bin" >> $GITHUB_PATH
echo "$HOME/.ghcup/ghc/9.8.2/bin" >> $GITHUB_PATH
if: matrix.os == 'ubuntu' || matrix.os == 'macos'
- name: Run hlint-from-scratch (unix)
shell: bash
run: |-
GHCLIB_AZURE=1; export GHCLIB_AZURE
./hlint-from-scratch.sh --init="$HOME/project"
./hlint-from-scratch.sh --ghc-flavor="" --stack-yaml=stack-exact.yaml --resolver=ghc-9.8.2 --no-checkout
if: matrix.os == 'ubuntu' || matrix.os == 'macos'
- name: Run hlint-from-scratch (windows)
shell: C:\msys64\usr\bin\bash.exe --noprofile --norc -e -o pipefail '{0}'
run: |-
GHCLIB_AZURE=1; export GHCLIB_AZURE
pacman -S autoconf automake-wrapper make patch python tar mintty --noconfirm
./hlint-from-scratch.sh --init="$HOME/project"
./hlint-from-scratch.sh --ghc-flavor="" --stack-yaml=stack-exact.yaml --resolver=ghc-9.8.2 --no-checkout
if: matrix.os == 'windows'