Skip to content

Commit

Permalink
add windows back to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
shayne-fletcher committed Jul 28, 2024
1 parent dd2262a commit 80e7ee9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 26 deletions.
38 changes: 13 additions & 25 deletions .github/workflows/hlint-from-scratch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos] #, windows]
os: [ubuntu, macos, windows]
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: 9.10.1
cabal-version: 'latest'
- name: Install build tools (macOS)
run: brew install automake
if: matrix.os == 'macos'
Expand All @@ -26,35 +31,18 @@ jobs:
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
- name: Run hlint-from-scratch (windows)
shell: C:\msys64\usr\bin\bash.exe --noprofile --norc -e -o pipefail '{0}'
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
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.10.1 --no-checkout
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
./hlint-from-scratch.sh --ghc-flavor="" --stack-yaml=stack-exact.yaml --resolver=ghc-9.10.1 --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'
2 changes: 1 addition & 1 deletion hlint-from-scratch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ fi

# ghc-lib

cmd="cabal run exe:ghc-lib-build-tool -- $no_checkout_flag $no_builds --ghc-flavor "
cmd="cabal run exe:ghc-lib-build-tool -- --ghc-flavor "

if [ -z "$GHC_FLAVOR" ]; then
eval "$cmd" "$HEAD"
Expand Down

0 comments on commit 80e7ee9

Please sign in to comment.