Skip to content

Add make test

Add make test #124

Workflow file for this run

name: Test ghcup action
on:
push:
workflow_dispatch:
jobs:
simple:
strategy:
matrix:
runs-on:
- ubuntu-latest
- macos-latest
- windows-latest
- [self-hosted, FreeBSD, X64]
version:
- latest
- "0.1.30.0"
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- run: which ghcup || true
- run: ghcup --numeric-version || true
- uses: ./
with:
version: ${{ matrix.version }}
- run: which ghcup
- run: ghcup --numeric-version
- run: ghcup config
- run: ghcup debug-info
- run: ghcup tool-requirements
- run: ghcup list
- run: ghcup install ghc latest --set
- run: ghcup whereis ghc latest
- run: which ghc
- run: ghc --version
- run: ghcup install cabal latest --set
- run: ghcup whereis cabal latest
- run: which cabal
- run: cabal --version
- run: ghcup install stack latest --set
- run: ghcup whereis stack latest
- run: which stack
- run: stack --version
- run: ghcup install hls latest --set
- run: ghcup whereis hls latest
- run: which haskell-language-server-wrapper
- run: haskell-language-server-wrapper --version
- if: runner.os == 'Windows'
run: ghcup run -m sh -- -c 'pacman --version'
container:
runs-on: ubuntu-20.04
container:
image: debian:12
env:
DEBIAN_FRONTEND: noninteractive
TZ: Asia/Singapore
steps:
- run: |
apt-get update
apt-get install -y libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf bash
- uses: actions/checkout@v4
- uses: ./
- run: which ghcup
- run: ghcup config
- run: ghcup debug-info
- run: ghcup tool-requirements
- run: ghcup list
- run: ghcup install ghc latest --set
- run: ghcup whereis ghc latest
- run: which ghc
- run: ghc --version
- run: ghcup install cabal latest --set
- run: ghcup whereis cabal latest
- run: which cabal
- run: cabal --version
vanilla-channel:
strategy:
matrix:
runs-on:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- uses: ./
with:
ghc: latest
cabal: 3.12.1.0
release-channels: |
https://raw.githubusercontent.com/haskell/ghcup-metadata/refs/heads/master/ghcup-vanilla-0.0.9.yaml
https://raw.githubusercontent.com/haskell/ghcup-metadata/refs/heads/master/ghcup-prereleases-0.0.9.yaml
- run: ghcup whereis ghc latest
- run: which ghc
- run: ghc --version
- run: ghcup whereis cabal 3.12.1.0
- run: which cabal
- run: cabal --version
- run: ghcup config
- run: ghcup debug-info
- run: ghcup tool-requirements
- run: ghcup list
- run: ghcup install ghc latest-prerelease --set
- run: ghcup whereis ghc latest-prerelease
- run: which ghc
- run: ghc --version
- if: runner.os == 'Windows'
run: ghcup run -m sh -- -c 'pacman --version'
config:
strategy:
matrix:
runs-on:
- ubuntu-latest
version:
- latest
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- uses: ./
with:
stack-hook: true
version: ${{ matrix.version }}
config: |
# see https://github.com/haskell/ghcup-hs/blob/master/data/config.yaml
# for full documentation
url-source:
- StackSetupURL
verbose: true
- run: ghcup config
- run: ghcup debug-info
- run: ghcup list
- run: ghcup -s GHCupURL install stack latest --set
- run: ghcup -s GHCupURL whereis stack latest
- run: which stack
- run: stack --version
- name: Stack hook test
run: |
cat $(stack path --stack-root)/hooks/ghc-install.sh
shell: bash
make:
runs-on: ubuntu-latest
container:
image: rockylinux:9
steps:
- run: |
dnf install -y git nodejs make
- uses: actions/checkout@v4
- run: |
set -eux
pushd ghcup
npx bun install
BUN="npx bun" make
popd
ls -lah
git status
git diff --exit-code