Skip to content

Commit

Permalink
CI: stack is preinstalled on GHA runners
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Nov 20, 2023
1 parent 4790dfc commit 78d1e72
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ jobs:
run: |
mkdir -p ~/.local/bin
export PATH=~/.local/bin:$PATH
## Stack is preinstalled on the GHA runners
# 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
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
# 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
stack --version
- name: ⏬ Install GHC
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ jobs:
run: |
mkdir -p ~/.local/bin
export PATH=~/.local/bin:$PATH
## Stack is preinstalled on the GHA runners
# brew install gnu-tar; curl -sL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | gtar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack
if [[ ! -x ~/.local/bin/stack ]]; then brew install gnu-tar; curl -sL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | gtar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
# if [[ ! -x ~/.local/bin/stack ]]; then brew install gnu-tar; curl -sL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | gtar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
stack --version
- name: ⏬ Install GHC
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/test-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,39 +50,37 @@ jobs:
# actions

- name: ⏬ Install stack
## Stack is preinstalled on GHA runners.
#
#if: steps.stack-programs-dir.outputs.cache-hit != 'true'
# this step is needed to get stack.exe into PATH, for now
# curl -sL https://get.haskellstack.org/stable/windows-x86_64.zip -o stack.zip
# 7z x stack.zip stack.exe
run: |
curl -sL https://get.haskellstack.org/stable/windows-x86_64.zip -o stack.zip
7z x stack.zip stack.exe
which stack
stack --version
which ./stack
./stack --version
# must avoid GHC versions broken on windows such as 8.8.3 with https://gitlab.haskell.org/ghc/ghc/issues/17926
# current default stack.yaml uses GHC 8.8.4 which hopefully is ok
- name: ⏬ Install GHC
# if: steps.stack-programs-dir.outputs.cache-hit != 'true'
# set PATH=C:\Users\runneradmin\AppData\Local\Programs\stack\local\bin;%PATH%
run: |
./stack --no-terminal setup --install-ghc
stack --no-terminal setup --install-ghc
- name: Install the icu library
run: |
./stack exec -- pacman -S --noconfirm mingw-w64-x86_64-icu mingw-w64-x86_64-pkgconf
stack exec -- pacman -S --noconfirm mingw-w64-x86_64-icu mingw-w64-x86_64-pkgconf
- name: 📸 Build Snapshot
run: |
./stack build --no-terminal --only-snapshot -j1
stack build --no-terminal --only-snapshot -j1
- name: 🧰 Build Dependencies
run: |
./stack build --no-terminal --only-dependencies
stack build --no-terminal --only-dependencies
- name: 🔨 Build and run tests
run: |
./stack test
stack test
# things to be cached

Expand Down

0 comments on commit 78d1e72

Please sign in to comment.