@@ -25,19 +25,26 @@ jobs:
2525 - name : 🏗 Install yq
2626 uses : frenck/action-setup-yq@v1
2727
28- - name : 🔍 Determine stack root and resolver and GHC
28+ - name : 🔍 Determine Stack resolver & GHC version
2929 run : |
30- STACK_ROOT="$(stack path --stack-root)"
3130 STACK_RESOLVER=$(yq .resolver stack.yaml)
3231 GHC_VERSION=$(echo $(yq .compiler stack.yaml) | cut -c 5-)
33- echo STACK_ROOT="${STACK_ROOT}" >> "${GITHUB_ENV}"
3432 echo STACK_RESOLVER="${STACK_RESOLVER}" >> "${GITHUB_ENV}"
35- echo GHC_VERSION="${GHC_VERSION}" >> "${GITHUB_ENV}"
36- # run: |
37- # STACK_ROOT="$(stack --system-ghc --no-install-ghc path --stack-root || echo "C:/Users/runneradmin/AppData/Local/Programs/stack/x86_64-windows")"
38- # echo "STACK_ROOT = ${STACK_ROOT}"
39- # echo STACK_ROOT="${STACK_ROOT}" >> "${GITHUB_ENV}"
40- # What about C:/Users/runneradmin/AppData/Roaming/stack ?
33+ echo GHC_VERSION="${GHC_VERSION}" >> "${GITHUB_ENV}"
34+
35+ - name : 🏗 Setup Haskell
36+ if : runner.os == 'macOS'
37+ uses : haskell-actions/setup@v2
38+ id : setup-haskell
39+ with :
40+ ghc-version : ${{ env.GHC_VERSION }}
41+ enable-stack : true
42+ stack-version : ' latest'
43+
44+ - name : 🔍 Determine Stack root
45+ run : |
46+ STACK_ROOT="$(stack path --stack-root)"
47+ echo STACK_ROOT="${STACK_ROOT}" >> "${GITHUB_ENV}"
4148
4249 # things to be restored:
4350 # Include STACK_RESOLVER in cache key, otherwise caches accumulate build products for different resolvers.
@@ -65,23 +72,23 @@ jobs:
6572 run : |
6673 stack exec -- pacman -S --noconfirm mingw-w64-x86_64-icu mingw-w64-x86_64-pkgconf
6774
68- # - name: 📸 Build Snapshot
69- # run: |
70- # stack build --no-terminal --only-snapshot -j1
75+ - name : 📸 Build Snapshot
76+ run : |
77+ stack build --no-terminal --only-snapshot -j1
7178
72- # - name: 🧰 Build Dependencies
73- # run: |
74- # stack build --no-terminal --only-dependencies
79+ - name : 🧰 Build Dependencies
80+ run : |
81+ stack build --no-terminal --only-dependencies
7582
76- # - name: 🔨 Build and run tests
77- # run: |
78- # stack test
83+ - name : 🧪 Run tests
84+ run : |
85+ stack test
7986
80- - name : 🔨 Build
81- run : stack build
87+ # - name: 🔨 Build
88+ # run: stack build
8289
83- - name : 🧪 Run tests
84- run : stack test
90+ # - name: 🧪 Run tests
91+ # run: stack test
8592
8693 # things to be cached
8794
0 commit comments