Skip to content

update cabal version (#12) #8

update cabal version (#12)

update cabal version (#12) #8

name: Build and test lh-array-sort in linear mode
# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
on:
push:
paths-ignore:
- "**/README.md"
branches:
- main
pull_request:
paths-ignore:
- "**/README.md"
workflow_dispatch:
jobs:
test-mutable-arrays:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Z3
uses: cda-tum/setup-z3@v1
- uses: haskell-actions/setup@v2
with:
ghc-version: 9.10.1
cabal-version: 3.14
# See the following link for a breakdown of the following step
# https://github.com/haskell/actions/issues/7#issuecomment-745697160
- uses: actions/cache@v4
with:
# validate.sh uses a special build dir
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-*
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
- name: Configure
run: cabal configure --enable-tests -f-liquid-checks
- name: Build in linear mode with mutable arrays
run: cabal build lh-array-sort -fmutable-arrays
- name: Run tests in linear mode with mutable arrays
run: cabal test -fmutable-arrays
test-prim-mutable-arrays:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Z3
uses: cda-tum/setup-z3@v1
- uses: haskell-actions/setup@v2
with:
ghc-version: 9.10.1
cabal-version: 3.14
- uses: actions/cache@v4
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-*
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
- name: Configure
run: cabal configure --enable-tests -f-liquid-checks
- name: Build in linear mode with primitive mutable arrays
run: cabal build lh-array-sort -fprim-mutable-arrays
- name: Run tests in linear mode with primitive mutable arrays
run: cabal test -fprim-mutable-arrays
test-pure-arrays:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Z3
uses: cda-tum/setup-z3@v1
- uses: haskell-actions/setup@v2
with:
ghc-version: 9.10.1
cabal-version: 3.14
- uses: actions/cache@v4
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-*
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
- name: Configure
run: cabal configure --enable-tests -f-liquid-checks
- name: Build in linear mode with pure arrays
run: cabal build lh-array-sort
- name: Run tests in linear mode with pure arrays
run: cabal test
#optional --flag=verbose-tests for printing additional debug information when running tests
run-benchrunner:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Z3
uses: cda-tum/setup-z3@v1
- uses: haskell-actions/setup@v2
with:
ghc-version: 9.10.1
cabal-version: 3.14
- uses: actions/cache@v4
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-*
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
- name: Configure
run: cabal configure -f-liquid-checks -fmutable-arrays # (benchrunner must use mutable arrays)
- name: Make sure benchrunner builds and runs
run: |
cabal build benchrunner
cabal run benchrunner -- 5 Insertionsort Seq 100
cabal run benchrunner -- 5 Mergesort Seq 100
cabal run benchrunner -- 5 Mergesort Par 100 +RTS -N2
cabal run benchrunner -- 5 "VectorSort Insertionsort" Seq 100
cabal run benchrunner -- 5 "VectorSort Mergesort" Seq 100
cabal run benchrunner -- 5 "VectorSort Quicksort" Seq 100
cabal run benchrunner -- 5 "CSort Insertionsort" Seq 100
cabal run benchrunner -- 5 "CSort Mergesort" Seq 100
cabal run benchrunner -- 5 "CSort Quicksort" Seq 100