Skip to content

Test setup action

Test setup action #2

Workflow file for this run

name: Test setup action
on:
push:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
runs-on:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- uses: ./setup
with:
version: "0.1.30.0"
- run: ghcup list
- shell: bash
run: |
echo "$BASH_VERSION"
installed=( $(ghcup list -t ghc -c installed -r | cut -d' ' -f2) )
typeset -p installed
if [[ ${#installed[@]} == 0 ]]; then
echo "no version of GHC is currently installed."
elif [[ ${#installed[@]} == 1 ]]; then
echo "GHC version ${installed[0]} is currently installed."
else
echo "${#installed[*]} versions of GHCs are installed."
for v in "${installed[@]}"; do
ghcup whereis ghc "$v"
echo
done
fi
- run: ghcup install ghc latest --set
- run: ghc --version
- run: ghcup install cabal latest --set
- run: cabal --version
- run: ghcup install stack latest --set
- run: stack --version
- run: ghcup install hls latest --set
- run: hls --version