Skip to content

Commit c78cad6

Browse files
authored
Merge branch 'IntersectMBO:main' into js/iog-contra-tracer
2 parents 60b518b + 6453290 commit c78cad6

File tree

103 files changed

+4512
-1298
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+4512
-1298
lines changed

.github/actions/generate-readme/action.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ inputs:
88
required: true
99
description: "Version of cabal"
1010
hackage-index-state:
11-
required: false
11+
required: true
1212
description: "Timestamp for Hackage index"
1313
runs:
1414
using: composite
@@ -25,10 +25,13 @@ runs:
2525
id: cache-cabal
2626
with:
2727
path: ${{ steps.setup-haskell.outputs.cabal-store }}
28-
key: generate-readme-${{ runner.os }}-ghc-${{ steps.setup-haskell.outputs.ghc-version }}-cabal-${{ steps.setup-haskell.outputs.cabal-version }}
28+
key: generate-readme-${{ runner.os }}-ghc-${{ steps.setup-haskell.outputs.ghc-version }}-cabal-${{ steps.setup-haskell.outputs.cabal-version }}-input-state-${{ inputs.hackage-index-state }}
2929

3030
- name: 🛠️ Generate README.md
31-
run: ./scripts/generate-readme.hs
31+
run: |
32+
cabal run \
33+
${{ inputs.hackage-index-state && format('--index-state={0}', inputs.hackage-index-state) }} \
34+
./scripts/generate-readme.hs
3235
shell: sh
3336

3437
- name: 💾 Save Cabal dependencies
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: Check release builds
2+
3+
on:
4+
push:
5+
tags:
6+
- blockio-*
7+
- bloomfilter-blocked-*
8+
- lsm-tree-*
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
contents: read
16+
17+
# Set the default shell on all platforms.
18+
defaults:
19+
run:
20+
shell: sh
21+
22+
jobs:
23+
################################################################################
24+
# Build
25+
################################################################################
26+
build:
27+
name: |
28+
${{ format(
29+
'Check release build on {0}{1}{2}',
30+
startsWith(matrix.os, 'ubuntu-') && 'Linux' || startsWith(matrix.os, 'macOS-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows',
31+
matrix.ghc-version && format(' with GHC {0}', matrix.ghc-version),
32+
matrix.cabal-version && format(' and Cabal {0}', matrix.cabal-version)
33+
)
34+
}}
35+
runs-on: ${{ matrix.os }}
36+
timeout-minutes: 60
37+
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
42+
ghc-version: ["9.2", "9.4", "9.6", "9.8", "9.10", "9.12"]
43+
cabal-version: ["3.12"]
44+
45+
env:
46+
tag-name: ${{ github.ref_name }}
47+
release-build-target: |
48+
${{ startsWith(github.ref_name, 'blockio') && './blockio/blockio.cabal' || startsWith(github.ref_name, 'bloomfilter-blocked') && './bloomfilter-blocked/bloomfilter-blocked.cabal' || startsWith(github.ref_name, 'lsm-tree') && './lsm-tree.cabal' }}
49+
50+
steps:
51+
- name: 🗄️ Print release build target
52+
run: |
53+
echo ${{ env.tag-name }}
54+
echo ${{ env.release-build-target }}
55+
56+
- name: 📥 Checkout repository
57+
uses: actions/checkout@v4
58+
59+
- name: 🗄️ Print Job info
60+
run: |
61+
echo 'matrix.os: ${{ matrix.os }}'
62+
echo 'matrix.ghc-version: ${{ matrix.ghc-version }}'
63+
echo 'matrix.cabal-version: ${{ matrix.cabal-version }}'
64+
echo 'toJSON(matrix): ${{ toJSON(matrix) }}'
65+
66+
- name: 🛠️ Setup Haskell
67+
id: setup-haskell
68+
uses: haskell-actions/setup@v2
69+
with:
70+
ghc-version: ${{ matrix.ghc-version }}
71+
cabal-version: ${{ matrix.cabal-version }}
72+
73+
- name: 🛠️ Setup system dependencies (Linux)
74+
if: ${{ runner.os == 'Linux' }}
75+
run: sudo apt-get update && sudo apt-get -y install liburing-dev librocksdb-dev
76+
env:
77+
DEBIAN_FRONTEND: "noninteractive"
78+
79+
- name: 🛠️ Configure
80+
run: |
81+
echo "packages: ${{ env.release-build-target }}" > cabal.project.temp
82+
cabal configure \
83+
--project-file="cabal.project.temp" \
84+
--disable-tests \
85+
--disable-benchmarks \
86+
--index-state=HEAD \
87+
--ghc-options="-Werror"
88+
cat "cabal.project.temp.local"
89+
90+
- name: 💾 Generate Cabal plan
91+
run: |
92+
cabal build all \
93+
--project-file="cabal.project.temp" \
94+
--dry-run
95+
96+
- name: 💾 Restore Cabal dependencies
97+
uses: actions/cache/restore@v4
98+
if: ${{ !env.ACT }}
99+
id: cache-cabal
100+
env:
101+
key: check-release-build-${{ runner.os }}-ghc-${{ steps.setup-haskell.outputs.ghc-version }}-cabal-${{ steps.setup-haskell.outputs.cabal-version }}
102+
with:
103+
path: ${{ steps.setup-haskell.outputs.cabal-store }}
104+
key: ${{ env.key }}-plan-${{ hashFiles('dist-newstyle/cache/plan.json') }}
105+
restore-keys: ${{ env.key }}-
106+
107+
- name: 🛠️ Build Cabal dependencies
108+
run: |
109+
cabal build all \
110+
--project-file="cabal.project.temp" \
111+
--only-dependencies
112+
113+
- name: 💾 Save Cabal dependencies
114+
uses: actions/cache/save@v4
115+
if: ${{ !env.ACT && steps.cache-cabal.outputs.cache-hit != 'true' }}
116+
with:
117+
path: ${{ steps.setup-haskell.outputs.cabal-store }}
118+
key: ${{ steps.cache-cabal.outputs.cache-primary-key }}
119+
120+
- name: 🏗️ Build
121+
run: |
122+
cabal build all \
123+
--project-file="cabal.project.temp"

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,6 @@ jobs:
310310
with:
311311
ghc-version: ${{ env.DEFAULT_GHC_VERSION }}
312312
cabal-version: ${{ env.DEFAULT_CABAL_VERSION }}
313-
# The index-state is fixed to enable caching and ensure that the version
314-
# regardless of the current state of Hackage head.
315-
# If you want a newer version of cabal-fmt, use a more recent time.
316313
hackage-index-state: "2025-05-22T00:00:00Z"
317314

318315
- name: 🎗️ Lint with generate-readme

.hlint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
- ignore: {name: "Use notElem"}
4141
- ignore: {name: "Use elem"}
4242
- ignore: {name: "Use infix"}
43+
- ignore: {name: "Redundant pure"}
4344

4445
# Specify additional command line arguments
4546
#

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Revision history for lsm-tree
1+
# Revision history for `lsm-tree`
22

3-
## 0.1.0.0 -- YYYY-mm-dd
3+
## 1.0.0.0 -- 2025-07
44

5-
* First version. Released on an unsuspecting world.
5+
* First released version.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ executable using `--flag=+serialblockio`.
2525
> build.
2626
2727
Installing `rocksdb` is entirely optional, and only required if one wants to
28-
build or run the `rocksdb-bench-wp8` comparison macro-benchmark.
28+
build or run the `utxo-rocksdb-bench` comparison macro-benchmark.
2929

3030
* Ubuntu:
3131
```

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2023 Input Output Global, Inc. (IOG), 2023-2025 INTERSECT.
1+
Copyright (c) 2023-2025 Cardano Development Foundation
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,27 @@
22

33
# lsm-tree
44

5-
[![Cardano Handbook](https://img.shields.io/badge/policy-Cardano%20Engineering%20Handbook-informational)](https://input-output-hk.github.io/cardano-engineering-handbook)
5+
[![Hackage: lsm-tree](https://img.shields.io/hackage/v/lsm-tree?label=Hackage:%20lsm-tree)](https://hackage.haskell.org/package/lsm-tree)
6+
[![Hackage: bloomfilter-blocked](https://img.shields.io/hackage/v/bloomfilter-blocked?label=Hackage:%20bloomfilter-blocked)](https://hackage.haskell.org/package/bloomfilter-blocked)
7+
[![Hackage: blockio](https://img.shields.io/hackage/v/blockio?label=Hackage:%20blockio)](https://hackage.haskell.org/package/blockio)
68
[![Build](https://img.shields.io/github/actions/workflow/status/IntersectMBO/lsm-tree/ci.yml?label=Build)](https://github.com/IntersectMBO/lsm-tree/actions/workflows/ci.yml)
79
[![Haddocks](https://img.shields.io/badge/documentation-Haddocks-purple)](https://IntersectMBO.github.io/lsm-tree/)
810

9-
> :warning: **This library is in active development**: there is currently no release schedule!
11+
This package has been developed by Well-Typed LLP on behalf of the Cardano
12+
Development Foundation and Intersect. A [project report] and [integration notes]
13+
are available.
1014

11-
This package is developed by Well-Typed LLP on behalf of Input Output Global, Inc. (IOG) and INTERSECT.
12-
The main contributors are Duncan Coutts, Joris Dral, Matthias Heinzel, Wolfgang Jeltsch, Wen Kokke, and Alex Washburn.
15+
[project report]: https://github.com/IntersectMBO/lsm-tree/blob/main/doc/final-report/final-report.pdf
16+
[integration notes]: https://github.com/IntersectMBO/lsm-tree/blob/main/doc/final-report/integration-notes.pdf
17+
18+
The primary authors are Duncan Coutts, Joris Dral, Matthias Heinzel,
19+
Wolfgang Jeltsch, Wen Kokke, and Alex Washburn.
1320

1421
## Description
1522

1623
This package contains an efficient implementation of on-disk key–value
17-
storage, implemented as a log-structured merge-tree or LSM-tree. An
18-
LSM-tree is a data structure for key–value mappings, similar to
24+
storage, implemented as a log-structured merge-tree, LSM-tree or LSMT.
25+
An LSM-tree is a data structure for key–value mappings, similar to
1926
`Data.Map`, but optimized for large tables with a high insertion volume.
2027
It has support for:
2128

0 commit comments

Comments
 (0)