Skip to content

Commit a9fa348

Browse files
committed
[ ci ] Remove hardcoded Stack root on Unix
1 parent aaaad2f commit a9fa348

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

.github/workflows/test-unix.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
name: CI (Unix)
44

5+
defaults:
6+
run:
7+
shell: bash
8+
59
on:
610
push:
711
branches: [master, ci-*, ci]
@@ -30,8 +34,9 @@ jobs:
3034
STACK_ROOT="$(stack path --stack-root)"
3135
STACK_RESOLVER=$(yq .resolver stack.yaml)
3236
GHC_VERSION=$(echo $(yq .compiler stack.yaml) | cut -c 5-)
37+
echo STACK_ROOT="${STACK_ROOT}" >> "${GITHUB_ENV}"
3338
echo STACK_RESOLVER="${STACK_RESOLVER}" >> "${GITHUB_ENV}"
34-
echo GHC_VERSION="${GHC_VERSION}" >> "${GITHUB_ENV}"
39+
echo GHC_VERSION="${GHC_VERSION}" >> "${GITHUB_ENV}"
3540
3641
# things to be restored:
3742
# Include STACK_RESOLVER in cache key, otherwise caches accumulate build products for different resolvers.

.github/workflows/test-windows.yaml

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,7 @@ jobs:
3232
GHC_VERSION=$(echo $(yq .compiler stack.yaml) | cut -c 5-)
3333
echo STACK_ROOT="${STACK_ROOT}" >> "${GITHUB_ENV}"
3434
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 ?
35+
echo GHC_VERSION="${GHC_VERSION}" >> "${GITHUB_ENV}"
4136
4237
# things to be restored:
4338
# Include STACK_RESOLVER in cache key, otherwise caches accumulate build products for different resolvers.
@@ -65,23 +60,23 @@ jobs:
6560
run: |
6661
stack exec -- pacman -S --noconfirm mingw-w64-x86_64-icu mingw-w64-x86_64-pkgconf
6762
68-
# - name: 📸 Build Snapshot
69-
# run: |
70-
# stack build --no-terminal --only-snapshot -j1
63+
- name: 📸 Build Snapshot
64+
run: |
65+
stack build --no-terminal --only-snapshot -j1
7166
72-
# - name: 🧰 Build Dependencies
73-
# run: |
74-
# stack build --no-terminal --only-dependencies
67+
- name: 🧰 Build Dependencies
68+
run: |
69+
stack build --no-terminal --only-dependencies
7570
76-
# - name: 🔨 Build and run tests
77-
# run: |
78-
# stack test
71+
- name: 🧪 Run tests
72+
run: |
73+
stack test
7974
80-
- name: 🔨 Build
81-
run: stack build
75+
# - name: 🔨 Build
76+
# run: stack build
8277

83-
- name: 🧪 Run tests
84-
run: stack test
78+
# - name: 🧪 Run tests
79+
# run: stack test
8580

8681
# things to be cached
8782

0 commit comments

Comments
 (0)