Move bloomfilter-blocked
to its own repo
#949
Workflow file for this run
This file contains hidden or 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
name: CI | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
merge_group: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
# Set the default shell on all platforms. | |
defaults: | |
run: | |
shell: sh | |
# Set the default GHC and Cabal versions. | |
env: | |
DEFAULT_GHC_VERSION: "9.6" | |
DEFAULT_CABAL_VERSION: "3.12" | |
DEFAULT_CABAL_PROJECT_FILE: "cabal.project.debug" | |
jobs: | |
################################################################################ | |
# Build | |
################################################################################ | |
build: | |
name: | | |
${{ matrix.name | |
|| format( | |
'Build on {0}{1}{2}', | |
startsWith(matrix.os, 'ubuntu-') && 'Linux' || startsWith(matrix.os, 'macOS-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows', | |
matrix.ghc-version && format(' with GHC {0}', matrix.ghc-version), | |
matrix.cabal-version && format(' and Cabal {0}', matrix.cabal-version) | |
) | |
}} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
steps: | |
- name: 📥 Checkout repository | |
uses: actions/checkout@v5 | |
- name: 🗄️ Print Job info | |
run: | | |
echo 'matrix.os: ${{ matrix.os }}' | |
echo 'matrix.ghc-version: ${{ matrix.ghc-version || env.DEFAULT_GHC_VERSION }}' | |
echo 'matrix.cabal-version: ${{ matrix.os || env.DEFAULT_CABAL_VERSION }}' | |
echo 'matrix.cabal-flags: ${{ matrix.cabal-flags }}' | |
echo 'matrix.cabal-project-file: ${{ matrix.cabal-project-file || env.DEFAULT_CABAL_PROJECT_FILE }}' | |
echo 'toJSON(matrix): ${{ toJSON(matrix) }}' | |
- name: 🗄️ Print CPU info | |
uses: ./.github/actions/print-cpu-info | |
- name: 🛠️ Setup Haskell | |
id: setup-haskell | |
uses: haskell-actions/setup@v2 | |
with: | |
ghc-version: ${{ matrix.ghc-version || env.DEFAULT_GHC_VERSION }} | |
cabal-version: ${{ matrix.cabal-version || env.DEFAULT_CABAL_VERSION }} | |
- name: 🛠️ Setup system dependencies (Linux) | |
if: ${{ runner.os == 'Linux' }} | |
run: sudo apt-get update && sudo apt-get -y install liburing-dev librocksdb-dev | |
env: | |
DEBIAN_FRONTEND: "noninteractive" | |
- name: 🛠️ Configure | |
run: | | |
cabal configure \ | |
--project-file="${{ matrix.cabal-project-file || env.DEFAULT_CABAL_PROJECT_FILE }}" \ | |
--enable-tests \ | |
--enable-benchmarks \ | |
--disable-documentation \ | |
--ghc-options="-Werror" \ | |
--flag="${{ matrix.cabal-flags }}" | |
cat "${{ matrix.cabal-project-file || env.DEFAULT_CABAL_PROJECT_FILE }}.local" | |
- name: 💾 Generate Cabal plan | |
run: | | |
cabal build all \ | |
--project-file="${{ matrix.cabal-project-file || env.DEFAULT_CABAL_PROJECT_FILE }}" \ | |
--dry-run | |
- name: 💾 Restore Cabal dependencies | |
uses: actions/cache/restore@v4 | |
if: ${{ !env.ACT }} | |
id: cache-cabal | |
env: | |
key: build-${{ runner.os }}-ghc-${{ steps.setup-haskell.outputs.ghc-version }}-cabal-${{ steps.setup-haskell.outputs.cabal-version }} | |
with: | |
path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
key: ${{ env.key }}-plan-${{ hashFiles('dist-newstyle/cache/plan.json') }} | |
restore-keys: ${{ env.key }}- | |
- name: 🛠️ Build Cabal dependencies | |
run: | | |
cabal build all \ | |
--project-file="${{ matrix.cabal-project-file || env.DEFAULT_CABAL_PROJECT_FILE }}" \ | |
--only-dependencies | |
- name: 💾 Save Cabal dependencies | |
uses: actions/cache/save@v4 | |
if: ${{ !env.ACT && steps.cache-cabal.outputs.cache-hit != 'true' }} | |
with: | |
path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
key: ${{ steps.cache-cabal.outputs.cache-primary-key }} | |
- name: 🏗️ Build | |
run: | | |
cabal build all \ | |
--project-file="${{ matrix.cabal-project-file || env.DEFAULT_CABAL_PROJECT_FILE }}" | |
- name: 🧪 Test | |
id: test | |
run: | | |
cabal test all \ | |
-j1 \ | |
--test-show-details=direct \ | |
--project-file="${{ matrix.cabal-project-file || env.DEFAULT_CABAL_PROJECT_FILE }}" | |
env: | |
TASTY_TIMEOUT: "5m" | |
# Golden test output is not printed to the screen, so if a golden test fails | |
# then it is not clear from the logs why the test fails. Uploading the | |
# directory containing the golden files after running the goldens tests | |
# allows us to diff the expected and actual golden file contents. | |
- name: 📦 Upload golden files | |
if: ${{ steps.test.outcome != 'success' && always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: golden-files-${{ runner.os }}-ghc-${{ steps.setup-haskell.outputs.ghc-version }}-cabal-${{ steps.setup-haskell.outputs.cabal-version }}-plan-${{ hashFiles('dist-newstyle/cache/plan.json') }} | |
path: lsm-tree/test/golden-file-data | |
if-no-files-found: error | |
retention-days: 1 | |
- name: 🛠️ Setup cabal-docspec (Linux) | |
if: ${{ runner.os == 'Linux' }} | |
uses: ./.github/actions/setup-cabal-docspec | |
- name: 🧪 Test with cabal-docspec (Linux) | |
if: ${{ runner.os == 'Linux' }} | |
run: ./scripts/test-cabal-docspec.sh | |
env: | |
SKIP_CABAL_BUILD: true | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "macOS-latest", "windows-latest"] | |
ghc-version: ["9.2", "9.4", "9.6", "9.8", "9.10", "9.12"] | |
cabal-version: ["3.12"] | |
# The inclusion of these default keys in the matrix ensures that any | |
# entry under include that assigns these keys creates a new matrix entry | |
cabal-flags: [""] | |
cabal-project-file: [""] | |
include: | |
# Include builds for various special cases | |
- name: "Build with +serialblockio" | |
os: "ubuntu-latest" | |
cabal-flags: "+serialblockio" | |
- name: "Build with cabal.project.release" | |
os: "ubuntu-latest" | |
cabal-project-file: "cabal.project.release" | |
################################################################################ | |
# Lint with actionlint | |
################################################################################ | |
lint-actionlint: | |
name: Lint with actionlint | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Checkout repository | |
uses: actions/checkout@v5 | |
- name: 🛠️ Setup actionlint | |
uses: ./.github/actions/setup-actionlint | |
with: | |
actionlint-version: "1.7.7" | |
- name: 🎗️ Lint with actionlint | |
run: ./scripts/lint-actionlint.sh | |
################################################################################ | |
# Lint with cabal-fmt | |
################################################################################ | |
lint-cabal-fmt: | |
name: Lint with cabal-fmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Checkout repository | |
uses: actions/checkout@v5 | |
- name: 🛠️ Setup cabal-fmt | |
uses: ./.github/actions/setup-cabal-fmt | |
with: | |
cabal-fmt-version: "0.1.12" | |
ghc-version: ${{ env.DEFAULT_GHC_VERSION }} | |
cabal-version: ${{ env.DEFAULT_CABAL_VERSION }} | |
# The index-state is fixed to enable caching and ensure that the version | |
# regardless of the current state of Hackage head. | |
# If you want a newer version of cabal-fmt, use a more recent time. | |
hackage-index-state: "2025-05-22T00:00:00Z" | |
- name: 🎗️ Lint with cabal-fmt | |
run: ./scripts/format-cabal-fmt.sh && git diff --exit-code | |
################################################################################ | |
# Lint with cabal | |
################################################################################ | |
lint-cabal: | |
name: Lint with cabal | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Checkout repository | |
uses: actions/checkout@v5 | |
- name: 🛠️ Setup Haskell | |
id: setup-haskell | |
uses: haskell-actions/setup@v2 | |
with: | |
ghc-version: ${{ env.DEFAULT_GHC_VERSION }} | |
cabal-version: ${{ env.DEFAULT_CABAL_VERSION }} | |
cabal-update: false | |
- name: 🎗️ Lint with cabal | |
run: ./scripts/lint-cabal.sh | |
################################################################################ | |
# Lint with stylish-haskell | |
################################################################################ | |
lint-stylish-haskell: | |
name: Lint with stylish-haskell | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Checkout repository | |
uses: actions/checkout@v5 | |
- name: 🛠️ Setup stylish-haskell | |
uses: ./.github/actions/setup-stylish-haskell | |
with: | |
stylish-haskell-version: "0.15.1.0" | |
ghc-version: "9.10" | |
cabal-version: ${{ env.DEFAULT_CABAL_VERSION }} | |
# The index-state is fixed to enable caching and ensure that the version | |
# regardless of the current state of Hackage head. | |
# If you want a newer version of stylish-haskell, use a more recent time. | |
hackage-index-state: "2025-05-21T09:13:36Z" | |
- name: 🎗️ Lint with stylish-haskell | |
run: ./scripts/format-stylish-haskell.sh && git diff --exit-code | |
################################################################################ | |
# Lint for missing IO specialisations | |
################################################################################ | |
lint-io-specialisations: | |
name: Lint for missing IO specialisations | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Checkout repository | |
uses: actions/checkout@v5 | |
- name: 🎗️ Lint for missing IO specialisations | |
run: ./scripts/lint-io-specialisations.sh | |
################################################################################ | |
# Lint with generate-readme | |
################################################################################ | |
lint-generate-readme: | |
name: Lint with generate-readme | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Checkout repository | |
uses: actions/checkout@v5 | |
- name: 🛠️ Generate README.md | |
uses: ./.github/actions/generate-readme | |
with: | |
ghc-version: ${{ env.DEFAULT_GHC_VERSION }} | |
cabal-version: ${{ env.DEFAULT_CABAL_VERSION }} | |
hackage-index-state: "2025-05-22T00:00:00Z" | |
- name: 🎗️ Lint with generate-readme | |
run: git diff --exit-code | |
################################################################################ | |
# Lint with HLint | |
################################################################################ | |
lint-hlint: | |
name: Lint with HLint | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Checkout repository | |
uses: actions/checkout@v5 | |
- name: 🛠️ Setup HLint | |
uses: haskell-actions/hlint-setup@v2 | |
with: | |
version: "3.10" | |
- name: 🎗️ Lint with HLint | |
run: ./scripts/lint-hlint.sh | |
############################################################################# | |
# Lint with ShellCheck | |
############################################################################# | |
lint-shellcheck: | |
name: "Lint with ShellCheck" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: 📥 Checkout repository | |
uses: actions/checkout@v5 | |
- name: 🛠️ Install ShellCheck | |
uses: ./.github/actions/setup-shellcheck | |
with: | |
shellcheck-version: "0.10.0" | |
- name: 🎗️ Lint with ShellCheck | |
run: ./scripts/lint-shellcheck.sh |