Skip to content

Commit 6f15558

Browse files
committed
ci: try to refactor; use preinstalled stack, ghc 9.12
1 parent 5423cf6 commit 6f15558

1 file changed

Lines changed: 16 additions & 13 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
fail-fast: false
3737
matrix:
3838
plan:
39-
- { ghc: "910", stackyaml: "stack.yaml", stack: "stack --stack-yaml=stack.yaml" }
39+
- { ghc: "912", stackyaml: "stack$ghc.yaml", stack: "stack --stack-yaml=$stackyaml" }
4040

4141
steps:
4242

@@ -69,19 +69,22 @@ jobs:
6969
restore-keys: |
7070
${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}
7171
72-
- name: Install stack
73-
run: |
74-
mkdir -p ~/.local/bin
75-
export PATH=~/.local/bin:$PATH
76-
# 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
77-
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
78-
stack --version
72+
# - name: Install stack
73+
# run: |
74+
# mkdir -p ~/.local/bin
75+
# export PATH=~/.local/bin:$PATH
76+
# # 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
77+
# 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
78+
# stack --version
7979

80-
- name: Install GHC
81-
env:
82-
stack: ${{ matrix.plan.stack }}
83-
run: |
84-
$stack setup --install-ghc
80+
# - name: Install GHC
81+
# env:
82+
# stack: ${{ matrix.plan.stack }}
83+
# run: |
84+
# $stack setup --install-ghc
85+
86+
# Use preinstalled stack and ghc. This risks breaking when github updates these,
87+
# but saves a lot of wasteful carbon emissions. As of 2024-04 they are 3.5.1 and 9.12.2.
8588

8689
- name: Install haskell deps
8790
env:

0 commit comments

Comments
 (0)