Fix CI using macOS-15-intel #1467
This file contains hidden or 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 | |
| CACHE_BUST: 1 | |
| container: | |
| image: rockylinux:9 | |
| 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 TZ=Asia/Singapore | |
| dnf install -y --allowerasing which findutils gcc gcc-c++ gmp gmp-devel make ncurses xz perl curl bash git nodejs zstd pkg-config pip libarchive-devel zlib-devel | |
| mkdir -p "$HOME/.local/bin" | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| pip install yamllint | |
| dnf -y install https://extras.getpagespeed.com/release-latest.rpm | |
| dnf install -y --allowerasing yq | |
| 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: v${{ env.CACHE_BUST }}-${{ runner.os }}-${{ env.GHC_VER }}-${{ env.CABAL_VER }}-build-${{ hashFiles('cabal.project') }} | |
| restore-keys: | | |
| v${{ env.CACHE_BUST }}-${{ runner.os }}-${{ env.GHC_VER }}-${{ env.CABAL_VER }}-build-${{ hashFiles('cabal.project') }} | |
| v${{ env.CACHE_BUST }}-${{ runner.os }}-${{ env.GHC_VER }}-${{ env.CABAL_VER }}-build- | |
| v${{ env.CACHE_BUST }}-${{ 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 | |
| for yaml in ghcup ghcup-cross ghcup-prereleases ghcup-vanilla ; do | |
| yamllint ${yaml}-${{ env.YAML_VER }}.yaml | |
| yq '.' ${yaml}-${{ env.YAML_VER }}.yaml | |
| python3 -c "import yaml ; stream = open('${yaml}-${{ env.YAML_VER }}.yaml', 'r') ; yaml.safe_load(stream)" | |
| done | |
| shell: bash | |
| - name: Check tarballs | |
| run: | | |
| ghcup-gen -- check-tarballs -f ghcup-${{ env.YAML_VER }}.yaml -u 'ghcup-.*' | |
| shell: bash |