Use simpler ‘\r’ instead of cursor manipulation escape sequences #176
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
# Mostly copied from the haskell/bytestring repo | |
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'] | |
include: | |
- os: macOS-latest | |
ghc: 'latest' | |
- os: windows-latest | |
ghc: 'latest' | |
steps: | |
- uses: actions/checkout@v3 | |
- 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-cabal | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
- name: Update cabal package database | |
run: cabal update | |
- name: Build plan | |
run: cabal freeze --enable-tests --enable-benchmarks | |
# Cache logic see https://github.com/haskell/actions/issues/7#issuecomment-745697160 | |
- uses: actions/cache@v3 | |
name: Cache cabal stuff | |
with: | |
path: | | |
${{ steps.setup-haskell-cabal.outputs.cabal-store }} | |
dist-newstyle | |
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}-$${ github.sha } | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}- | |
${{ runner.os }}-${{ matrix.ghc }}- | |
- 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 | |
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@v3 | |
- uses: actions/cache@v3 | |
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 |