Fix ghcup-gen build with 0.1.40.0 #1178
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: [ master, develop ] | |
pull_request: | |
branches: [ master, develop ] | |
jobs: | |
test: | |
name: Test metadata | |
runs-on: [self-hosted, Linux, X64] | |
env: | |
YAML_VER: 0.0.9 | |
GHC_VER: 9.8.4 | |
CABAL_VER: 3.12.1.0 | |
container: | |
image: debian:12 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Disable cabal XDG | |
run: | | |
echo "CABAL_DIR=${GITHUB_WORKSPACE}/.cabal" >> "$GITHUB_ENV" | |
- name: Prerequisites | |
run: | | |
export DEBIAN_FRONTEND=noninteractive | |
export TZ=Asia/Singapore | |
apt update -y | |
apt install -y libarchive-dev build-essential curl libffi-dev libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 libnuma-dev curl bash git pip python3 nodejs pkg-config zstd | |
mkdir -p "$HOME/.local/bin" | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
pip install --break-system-packages yamllint | |
shell: bash | |
- uses: haskell/ghcup-setup@v1 | |
with: | |
ghc: ${{ env.GHC_VER }} | |
cabal: ${{ env.CABAL_VER }} | |
- name: Cache Cabal | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-cabal | |
with: | |
path: | | |
.cabal/store | |
.cabal/packages | |
key: v2-${{ runner.os }}-${{ env.GHC_VER }}-${{ env.CABAL_VER }}-build-${{ hashFiles('cabal.project') }} | |
restore-keys: | | |
v2-${{ runner.os }}-${{ env.GHC_VER }}-${{ env.CABAL_VER }}-build-${{ hashFiles('cabal.project') }} | |
v2-${{ runner.os }}-${{ env.GHC_VER }}-${{ env.CABAL_VER }}-build- | |
v2-${{ runner.os }}-${{ env.GHC_VER }} | |
- name: Install ghcup-gen | |
run: | | |
cabal update | |
cabal install --installdir="$HOME/.local/bin" --overwrite-policy=always --install-method=copy ghcup-gen | |
shell: bash | |
- name: Check yaml | |
run: | | |
ghcup-gen -- check -f ghcup-${{ env.YAML_VER }}.yaml | |
yamllint ghcup-${{ env.YAML_VER }}.yaml | |
python3 -c "import yaml ; stream = open('ghcup-${{ env.YAML_VER }}.yaml', 'r') ; yaml.safe_load(stream)" | |
shell: bash | |
- name: Check tarballs | |
run: | | |
ghcup-gen -- check-tarballs -f ghcup-${{ env.YAML_VER }}.yaml -u 'ghcup-.*' | |
shell: bash |