Skip to content

Update readme

Update readme #88

Workflow file for this run

name: Build
on:
- push
- pull_request
defaults:
run:
shell: bash
jobs:
main:
name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc:
- "9.2"
- "9.4"
- "9.6"
- "9.8"
- "9.10"
include:
- os: macOS-latest
ghc: "9.10"
- os: windows-latest
ghc: "9.10"
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: "latest"
cabal-update: true
- uses: actions/cache@v4
name: Cache cabal store
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
- name: Cabal version
run: |
cabal --version
- name: Install doctest
run: |
mkdir -p "${{github.workspace}}/doctest-bin"
cabal install --install-method=symlink --installdir "${{github.workspace}}/doctest-bin" doctest
- name: Unpack
run: |
cabal sdist --ignore-project --output-directory ..
cd ..
cabal get vector-quicksort-*.tar.gz
- name: Build
run: |
cd ../vector-quicksort-*/
cabal build all --enable-tests --enable-benchmarks
- name: Test
run: |
project_file="$(pwd)/cabal.project.test"
test_file="$(pwd)/test.txt"
cd ../vector-quicksort-*/
cabal run --project-file "$project_file" test -- --quickcheck-tests=100000 --quickcheck-max-size=1000
cp -v "$test_file" .
cabal run --project-file "$project_file" bench -- --stdev 100 --timeout 600
- name: Doctest
run: |
cd ../vector-quicksort-*/
cabal repl --with-ghc "${{github.workspace}}/doctest-bin/doctest" --repl-options=-Wno-missing-export-lists 'lib:vector-quicksort'
- name: Haddock
run: |
cd ../vector-quicksort-*/
cabal haddock all
- name: Cabal check
run: |
cd ../vector-quicksort-*/
cabal check
emulated:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: ['armv7', 'aarch64']
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
name: Cache cabal store
with:
path: ~/.cabal/store
key: ${{ runner.os }}-arm-${{ matrix.arch }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-arm-${{ matrix.arch }}-
- uses: uraimo/run-on-arch-action@v2
with:
arch: ${{ matrix.arch }}
distro: ubuntu_rolling
githubToken: ${{ github.token }}
install: |
apt-get update -y
apt-get install -y curl ghc cabal-install libghc-tasty-quickcheck-dev libghc-tasty-hunit-dev g++
run: |
project_file="$(pwd)/cabal.project.test"
cabal update
cabal build --project-file "$project_file" --enable-tests --enable-benchmarks all
LANG="C" cabal run --project-file "$project_file" test -- --quickcheck-tests=10000 --quickcheck-max-size=256 --ansi-tricks=false
LANG="C" cabal run --project-file "$project_file" bench -- --stdev 100 --timeout 600 --ansi-tricks=false -p '/Sorting fuzzy matching scores vector/ || /Sorting 10 random arrays of length 100,000 with few duplicates/'