Skip to content

Commit 76a6a66

Browse files
committed
[ ci ] Grep only the digits from the GHC version
1 parent 3f010e1 commit 76a6a66

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

.github/workflows/test-linux.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ jobs:
2121
- name: 🔍 Determine stack resolver & GHC
2222
run: |
2323
STACK_RESOLVER=$(yq .resolver stack.yaml)
24-
GHC_VERSION=$(yq .compiler stack.yaml)
24+
# GHC_VERSION=$(echo $(yq .compiler stack.yaml) | grep -oP '\d+\.\d+\.\d+')
25+
GHC_VERSION=$(echo $(yq .compiler stack.yaml) | cut -c 4-)
2526
echo STACK_RESOLVER="${STACK_RESOLVER}" >> "${GITHUB_ENV}"
2627
echo GHC_VERSION="${GHC_VERSION}" >> "${GITHUB_ENV}"
2728
@@ -48,15 +49,14 @@ jobs:
4849
4950
# actions:
5051

51-
- name: ⏬ Install stack
52-
run: |
53-
# mkdir -p ~/.local/bin
54-
# export PATH=~/.local/bin:$PATH
55-
## Stack is preinstalled on the GHA runners
56-
# curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack
57-
# if [[ ! -x ~/.local/bin/stack ]]; then curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
58-
stack --version
59-
52+
- name: ⏬ Setup Haskell
53+
uses: haskell-actions/setup@v2
54+
id: setup-haskell
55+
with:
56+
ghc-version: ${{ env.GHC_VERSION }}
57+
enable-stack: true
58+
stack-version: 'latest'
59+
6060
- name: ⏬ Install dependencies
6161
run: |
6262
stack build --only-dependencies

.github/workflows/test-mac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: 🔍 Determine stack resolver & GHC
2222
run: |
2323
STACK_RESOLVER=$(yq .resolver stack.yaml)
24-
GHC_VERSION=$(yq .compiler stack.yaml)
24+
GHC_VERSION=$(echo $(yq .compiler stack.yaml) | cut -c 4-)
2525
echo STACK_RESOLVER="${STACK_RESOLVER}" >> "${GITHUB_ENV}"
2626
echo GHC_VERSION="${GHC_VERSION}" >> "${GITHUB_ENV}"
2727

.github/workflows/test-windows.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: CI (Windows)
44

55
on:
66
push:
7-
branches: [master, ci-*]
7+
branches: [master, ci-*, ci]
88
tags:
99
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
1010
pull_request:
@@ -33,7 +33,7 @@ jobs:
3333
run: |
3434
STACK_ROOT="C:/Users/runneradmin/AppData/Local/Programs/stack/x86_64-windows"
3535
STACK_RESOLVER=$(yq .resolver stack.yaml)
36-
GHC_VERSION=$(yq .compiler stack.yaml)
36+
GHC_VERSION=$(echo $(yq .compiler stack.yaml) | cut -c 4-)
3737
echo STACK_ROOT="${STACK_ROOT}" >> "${GITHUB_ENV}"
3838
echo STACK_RESOLVER="${STACK_RESOLVER}" >> "${GITHUB_ENV}"
3939
echo GHC_VERSION="${GHC_VERSION}" >> "${GITHUB_ENV}"

0 commit comments

Comments
 (0)