Skip to content

Avoid running earlier successes with --quickcheck-replay #193

Avoid running earlier successes with --quickcheck-replay

Avoid running earlier successes with --quickcheck-replay #193

Workflow file for this run

name: ci
on:
pull_request:
push:
branches: [master]
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-22.04]
ghc: ['8.0', '8.2', '8.4', '8.6', '8.8', '8.10', '9.0', '9.2', '9.4', '9.6', '9.8']
include:
- os: macOS-latest
ghc: 'latest'
- os: windows-latest
ghc: 'latest'
steps:
- uses: actions/checkout@v4
- name: Install prerequisites for GHC <= 8.2 on ubuntu-22.04
if: runner.os == 'Linux' && matrix.ghc <= '8.2'
run: |
sudo apt-get install libncurses5 libtinfo5
- uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-update: true
- uses: actions/cache/restore@v4
name: Restore cabal cache
id: cache
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-ghc-${{ steps.setup-haskell.outputs.ghc-version }}-commit-${{ github.sha }}
restore-keys: |
${{ runner.os }}-ghc-${{ steps.setup-haskell.outputs.ghc-version }}-
- name: Test
run: |
set -e
cabal build all
cabal install ./core-tests
export PATH="${HOME}/.cabal/bin:${PATH}"
(cd core-tests && tasty-core-tests +RTS -N2)
core-tests/exit-status-tests.sh
# Prevent Git for Windows from replacing slashes with backslashes in patterns
MSYS_NO_PATHCONV=1 core-tests/failing-pattern-test.sh
core-tests/multiple-pattern-test.sh
- name: Test resource-release-test.sh
if: runner.os != 'Windows'
run: |
export PATH="${HOME}/.cabal/bin:${PATH}"
core-tests/resource-release-test.sh
- name: Haddock
if: matrix.ghc != '8.0' && matrix.ghc != '8.2' && matrix.ghc != '8.4'
run: cabal haddock all
- name: Save cache
if: always()
uses: actions/cache/save@v4
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-newstyle
key: ${{ steps.cache.outputs.cache-primary-key }}
build-wasi:
runs-on: ubuntu-latest
env:
GHC_WASM_META_REV: 895f7067e1d4c918a45559da9d2d6a403a690703
FLAVOUR: '9.6'
steps:
- name: Setup ghc-wasm32-wasi
run: |
cd "$(mktemp -d)"
curl -L "https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/archive/${GHC_WASM_META_REV}/ghc-wasm-meta-master.tar.gz" | tar xz --strip-components=1
./setup.sh
~/.ghc-wasm/add_to_github_path.sh
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
id: cache
with:
path: |
~/.ghc-wasm/.cabal/store
dist-newstyle
key: build-wasi-${{ runner.os }}-wasm-meta-${{ env.GHC_WASM_META_REV }}-flavour-${{ env.FLAVOUR }}-${{ github.sha }}
restore-keys: |
build-wasi-${{ runner.os }}-wasm-meta-${{ env.GHC_WASM_META_REV }}-flavour-${{ env.FLAVOUR }}-
- name: Build
run: |
wasm32-wasi-cabal build all
TEST_WRAPPERS="$(mktemp -d)"
echo "${TEST_WRAPPERS}" >> "${GITHUB_PATH}"
wasm32-wasi-cabal install ./core-tests
for test in tasty-core-tests exit-status-test resource-release-test failing-pattern-test; do
echo '#!/usr/bin/env bash' > "${TEST_WRAPPERS}/${test}"
echo "wasmtime --mapdir /::/ --env PWD=\"\$PWD\" ~/.ghc-wasm/.cabal/bin/$test.wasm -- \"\$@\"" \
>> "${TEST_WRAPPERS}/${test}"
chmod +x "${TEST_WRAPPERS}/${test}"
done
- name: Test
run: |
(cd core-tests && tasty-core-tests)
core-tests/exit-status-tests.sh
core-tests/failing-pattern-test.sh
- uses: actions/cache/save@v4
if: always()
with:
path: |
~/.ghc-wasm/.cabal/store
dist-newstyle
key: ${{ steps.cache.outputs.cache-primary-key }}