Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 23 additions & 19 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,29 @@ jobs:
cabal: ["3.10.2.1"]
os: [ubuntu-latest, windows-latest, macOS-latest]
cabal-flags: [""]
no-debug: [""]
cabal-project-file: ["cabal.project.debug"]
exclude:
- ghc: "8.10.7"
os: macOS-latest
include:
- ghc: "8.10.7"
cabal: "3.10.2.1"
os: macOS-13
cabal-project-file: "cabal.project.debug"
- ghc: "9.6.4"
cabal: "3.10.2.1"
os: ubuntu-latest
cabal-flags: "+serialblockio"
cabal-project-file: "cabal.project.debug"
- ghc: "9.6.4"
cabal: "3.10.2.1"
os: ubuntu-latest
no-debug: "no-debug"
cabal-project-file: "cabal.project.release"

timeout-minutes: 60

steps:

- name: CPU info (macOS)
if: ${{ startsWith(matrix.os, 'macOS') }}
run: sysctl -a machdep.cpu
Expand Down Expand Up @@ -75,19 +78,13 @@ jobs:

- name: Configure the build
run: |
cabal configure --enable-tests --enable-benchmark --ghc-options="-Werror" --flag="${{ matrix.cabal-flags }}"
cat cabal.project.local

- name: Configure the build (no-debug)
if: ${{ matrix.no-debug }}
run: |
echo "" > cabal.project.debug
cat cabal.project.debug
cabal configure --project-file="${{ matrix.cabal-project-file }}" --enable-tests --enable-benchmark --ghc-options="-Werror" --flag="${{ matrix.cabal-flags }}"
cat "${{ matrix.cabal-project-file }}.local"

- name: Record cabal dependencies
id: record-deps
run: |
cabal build all --dry-run
cabal build all --project-file="${{ matrix.cabal-project-file }}" --dry-run

- name: "Restore cache"
uses: actions/cache/restore@v4
Expand All @@ -104,7 +101,8 @@ jobs:

- name: Install cabal dependencies
id: build-dependencies
run: cabal build --only-dependencies --enable-tests --enable-benchmarks all
run: |
cabal build --project-file="${{ matrix.cabal-project-file }}" --only-dependencies --enable-tests --enable-benchmarks all

- name: "Save cache"
uses: actions/cache/save@v4
Expand All @@ -118,7 +116,8 @@ jobs:
key: ${{ steps.restore-cabal-cache.outputs.cache-primary-key }}

- name: Build
run: cabal build all
run: |
cabal build all --project-file="${{ matrix.cabal-project-file }}"

# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
- name: Set test timeout (Unix)
Expand All @@ -134,7 +133,7 @@ jobs:

- name: Run tests
run: |
cabal test -j1 --test-show-details=direct all
cabal test -j1 --test-show-details=direct all --project-file="${{ matrix.cabal-project-file }}"

- name: cabal-docspec
if: ${{ startsWith(matrix.os, 'ubuntu') }}
Expand Down Expand Up @@ -184,7 +183,8 @@ jobs:
cabal-update: false

- name: Cabal update
run: cabal update
run: |
cabal update --ignore-project

- name: Setup cabal bin path
run: echo "$HOME/.cabal/bin" >> $GITHUB_PATH
Expand All @@ -200,7 +200,8 @@ jobs:
${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}-

- name: Install stylish-haskell
run: cabal install --ignore-project --index-state="${{ env.hackage-index-state }}" stylish-haskell --constraint 'stylish-haskell == 0.14.6.0'
run: |
cabal install --ignore-project --index-state="${{ env.hackage-index-state }}" stylish-haskell --constraint 'stylish-haskell == 0.14.6.0'

- name: Record stylish-haskell version
run: |
Expand Down Expand Up @@ -246,7 +247,8 @@ jobs:
cabal-update: false

- name: Cabal update
run: cabal update
run: |
cabal update --ignore-project

- name: Setup cabal bin path
run: echo "$HOME/.cabal/bin" >> $GITHUB_PATH
Expand All @@ -262,7 +264,8 @@ jobs:
${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}-

- name: Install cabal-fmt
run: cabal install --ignore-project cabal-fmt --index-state="${{ env.hackage-index-state }}" --constraint 'cabal-fmt == 0.1.11'
run: |
cabal install --ignore-project cabal-fmt --index-state="${{ env.hackage-index-state }}" --constraint 'cabal-fmt == 0.1.11'

- name: Record cabal-fmt version
run: |
Expand Down Expand Up @@ -298,7 +301,8 @@ jobs:
cabal-update: false

- name: Cabal update
run: cabal update
run:
cabal update --ignore-project

- name: Run cabal check
run: |
Expand Down
31 changes: 0 additions & 31 deletions cabal.project

This file was deleted.

1 change: 1 addition & 0 deletions cabal.project
3 changes: 3 additions & 0 deletions cabal.project.debug
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
-- Import release project configuration
import: cabal.project.release

package lsm-tree
-- apply this to all components
-- relevant mostly only for development & testing
Expand Down
28 changes: 28 additions & 0 deletions cabal.project.release
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
index-state:
-- Bump this if you need newer packages from Hackage
-- current date: fs-sim-0.3.0.1
, hackage.haskell.org 2024-10-02T10:41:30Z

packages: .

tests: True
benchmarks: True

-- this prevents occurence of Hackage bloomfilter anywhere in the install plan
-- that is overconstraining, as we'd only need to make sure lsm-tree
-- doesn't depend on Hackage bloomfilter.
-- Luckily, bloomfilter is not commonly used package, so this is good enough.
constraints: bloomfilter <0

-- comment me if you don't have liburing installed
--
-- TODO: it is slightly unfortunate that one has to manually remove this file
-- import in case they don't have liburing installed... Currently, it is not
-- possible to have conditionals on package flags in a project file. Otherwise,
-- we could add a conditional on (+serialblockio) to remove this import automatically.
import: cabal.project.blockio-uring

source-repository-package
type: git
location: https://github.com/well-typed/quickcheck-lockstep.git
tag: 1852cf87a76dc48c71aa0d9fda3fdc7c8b965011