Skip to content

bump tar

bump tar #111

Workflow file for this run

name: Build with Stack
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
check:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc-ver: [9.6.3, 9.4.8, 9.2.8, 9.0.2, 8.10.7]
# On ubuntu-22.04 the old versions 8.8.4, 8.6.5, 8.4.4, 8.2.2 fail due to HsOpenSSL linking errors.
# They used to work under ubuntu-20.04, but it is not worth the trouble maintaining them.
# Apparently, HsOpenSSL-0.11.6 and older are too old for ubuntu-22.04.
include:
- os: macos-latest
ghc-ver: 9.6.3
- os: windows-latest
ghc-ver: 9.6.3
env:
ARGS: "--stack-yaml=stack-${{ matrix.ghc-ver }}.yaml --no-terminal --system-ghc"
# Needed for Windows to make piping (... >> ...) and evaluation ( $(...) ) work.
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
id: haskell-setup
with:
ghc-version: ${{ matrix.ghc-ver }}
enable-stack: true
- name: Install the brotli library (Windows)
if: ${{ runner.os == 'Windows' }}
# Andreas Abel, 2022-02-15:
# Stack is packing an old version of MSYS2.
# To work around certification problems, we need to update msys2-keyring.
run: |
stack exec ${{ env.ARGS }} -- pacman --noconfirm -Sy msys2-keyring
stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-pkg-config
stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-brotli
stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-openssl
- name: Install the brotli library (Ubuntu)
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install libbrotli-dev -qq
- name: Set environment variables based on Haskell setup
run: |
STACK_VER=$(stack --numeric-version)
echo "STACK_VER=${STACK_VER}" >> "${GITHUB_ENV}"
- name: Cache dependencies (restore)
uses: actions/cache/restore@v3
id: cache
with:
path: ${{ steps.haskell-setup.outputs.stack-root }}
key: ${{ runner.os }}-stack-${{ env.STACK_VER }}-ghc-${{ matrix.ghc-ver }}-${{ hashFiles(format('stack-{0}.yaml', matrix.ghc-ver)) }}
restore-keys: ${{ runner.os }}-stack-${{ env.STACK_VER }}-ghc-${{ matrix.ghc-ver }}-
- name: Install dependencies
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: |
stack build ${{ env.ARGS }} --test --only-dependencies
- name: Cache dependencies (save)
uses: actions/cache/save@v3
# Will fail if we already have a cache with this key (in this case, cache-hit is true).
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
with:
path: ${{ steps.haskell-setup.outputs.stack-root }}
key: ${{ steps.cache.outputs.cache-primary-key }}
- name: Build hackage-cli
run: |
stack build ${{ env.ARGS }}
- name: Test hackage-cli
run: |
stack test ${{ env.ARGS }}