Skip to content

Commit

Permalink
Update the code to UTxO-HD
Browse files Browse the repository at this point in the history
  • Loading branch information
jasagredo committed Sep 19, 2023
1 parent e8da7ae commit 5310f94
Show file tree
Hide file tree
Showing 9 changed files with 176 additions and 108 deletions.
File renamed without changes.
5 changes: 0 additions & 5 deletions .github/workflows/cabal.project.local.ci.Linux

This file was deleted.

This file was deleted.

65 changes: 48 additions & 17 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,35 @@ on:

jobs:
build:
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.sys.os }}

strategy:
fail-fast: false
matrix:
ghc: ["8.10.7", "9.2.7", "9.6.2"]
ghc: ["8.10.7", "9.2.8", "9.6.2"]
cabal: ["3.10.1.0"]
os: [ubuntu-latest, macos-latest, windows-latest]
sys:
- { os: windows-latest, shell: 'C:/msys64/usr/bin/bash.exe -e {0}' }
- { os: macos-latest, shell: bash }
- { os: ubuntu-latest, shell: bash }
exclude:
- ghc: "9.2.7"
os: macos-latest
- ghc: "9.2.8"
sys.os: macos-latest

defaults:
run:
shell: ${{ matrix.sys.shell }}

env:
MSYSTEM: MINGW64

# do not ever change to $HOME by yourself.
CHERE_INVOKING: 1

# do we want to inherit the path?
MSYS2_PATH_TYPE: inherit

# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "2023-08-22"

Expand All @@ -29,7 +45,7 @@ jobs:
c+${{ github.job }}
d+${{ matrix.ghc }}
e+${{ matrix.cabal }}
f+${{ matrix.os }}
f+${{ matrix.sys.os }}
g+${{ (startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.run_id) || github.event.pull_request.number || github.ref }}
cancel-in-progress: true

Expand All @@ -42,26 +58,44 @@ jobs:
c+${{ github.job }}
d+${{ matrix.ghc }}
e+${{ matrix.cabal }}
f+${{ matrix.os }}
f+${{ matrix.sys.os }}
g+${{ (startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && github.run_id) || github.event.pull_request.number || github.ref }}
- name: Install Base libs
uses: input-output-hk/actions/base@latest
with:
use-sodium-vrf: false

- name: Install Haskell
uses: input-output-hk/actions/haskell@latest
id: setup-haskell
uses: input-output-hk/actions/haskell@latest
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- name: Install system dependencies
uses: input-output-hk/actions/base@latest
with:
use-sodium-vrf: true # default is true

- uses: actions/checkout@v3


- name: Install lmdb
run: |
if [[ ${{ runner.os }} == "Windows" ]]; then
/usr/bin/pacman --noconfirm -S mingw-w64-x86_64-lmdb
elif [[ ${{ runner.os }} == "macOS" ]]; then
brew install lmdb
sudo cp ./.github/workflows/lmdb.pc /usr/local/lib/pkgconfig
else
sudo apt install liblmdb-dev
fi
- name: Cabal update
run: cabal update

- name: Configure build
shell: bash
run: |
cp .github/workflows/cabal.project.local.ci cabal.project.local
echo "# cabal.project.local"
cat cabal.project.local
- name: Build dry run
run: cabal build all --dry-run --minimize-conflict-set

Expand Down Expand Up @@ -109,9 +143,6 @@ jobs:

- name: Run tests
env:
# these two are msys2 env vars, they have no effect on non-msys2 installs.
MSYS2_PATH_TYPE: inherit
MSYSTEM: MINGW64
TMPDIR: ${{ runner.temp }}
TMP: ${{ runner.temp }}
KEEP_WORKSPACE: 1
Expand All @@ -137,7 +168,7 @@ jobs:
- name: Save Artifact
uses: actions/upload-artifact@v1
with:
name: artifacts-${{ matrix.os }}-${{ matrix.ghc }}
name: artifacts-${{ matrix.sys.os }}-${{ matrix.ghc }}
path: ./artifacts

# Uncomment the following back in for debugging. Remember to launch a `pwsh` from
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/lmdb.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${exec_prefix}/include

Name: liblmdb
Description: Lightning Memory-Mapped Database
URL: https://symas.com/products/lightning-memory-mapped-database/
Version: 0.9.29
Libs: -L${libdir} -llmdb
Cflags: -I${includedir}
19 changes: 15 additions & 4 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ packages:
cardano-api
cardano-api-gen

package cardano-api
ghc-options: -Werror

package cardano-api-gen
program-options
ghc-options: -Werror

package cryptonite
Expand All @@ -42,3 +39,17 @@ write-ghc-environment-files: always
-- Do NOT add more source-repository-package stanzas here unless they are strictly
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.

-- utxo-hd
source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-consensus
tag: a45e9342a23dbc3859b84baa54cf9f4c322f4997
--sha256: 1gs89039l0sjxvw091vhgvw24kagg4q74s751dkrcirax4hdnpf5
subdir:
ouroboros-consensus
ouroboros-consensus-cardano
ouroboros-consensus-cardano-legacy-block
ouroboros-consensus-protocol
ouroboros-consensus-diffusion
strict-sop-core
sop-extras
1 change: 1 addition & 0 deletions cardano-api/cardano-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ library internal
, optparse-applicative-fork
, ouroboros-consensus >= 0.9
, ouroboros-consensus-cardano >= 0.8
, ouroboros-consensus-cardano-legacy-block
, ouroboros-consensus-diffusion >= 0.7
, ouroboros-consensus-protocol >= 0.5.0.4
, ouroboros-network
Expand Down
Loading

0 comments on commit 5310f94

Please sign in to comment.