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 Aug 23, 2023
1 parent 7bced7a commit be0635f
Show file tree
Hide file tree
Showing 9 changed files with 162 additions and 105 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.

67 changes: 49 additions & 18 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,37 @@ 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-07-12"
CABAL_CACHE_VERSION: "2023-08-01"

concurrency:
group: >
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}
30 changes: 16 additions & 14 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@ repository cardano-haskell-packages
-- See CONTRIBUTING for information about these, including some Nix commands
-- you need to run if you change them
index-state:
, hackage.haskell.org 2023-07-10T22:41:49Z
, cardano-haskell-packages 2023-07-12T13:59:36Z
, hackage.haskell.org 2023-07-26T23:47:54Z
, cardano-haskell-packages 2023-08-02T11:20:00Z

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 @@ -38,14 +35,19 @@ test-show-details: direct
-- Always write GHC env files, because they are needed for ghci.
write-ghc-environment-files: always

if impl(ghc >= 9.6)
allow-newer:
-- Only really needed because `cardano-ledger-byron-test` has not yet been released to CHaP
-- and its not possible to specify `cardano-ledger-byron-test:base` because the dependencies
-- of `cardano-ledger-byron-test` also do not permit the version of `base` that `ghc-9.6`
-- provides.
, *:base

-- IMPORTANT
-- 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: 5f94982bd6400b2dca3cfc3619e6bb9896775e68
--sha256: 1prkxx0bwfcy8ss61hxnxk94zfkyx653l28h6bhc08hsg7pbd58z
subdir:
ouroboros-consensus
ouroboros-consensus-cardano
ouroboros-consensus-cardano-legacy-block
ouroboros-consensus-protocol
ouroboros-consensus-diffusion
1 change: 1 addition & 0 deletions cardano-api/cardano-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ library internal
, optparse-applicative-fork
, ouroboros-consensus >= 0.9
, ouroboros-consensus-cardano >= 0.7
, 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 be0635f

Please sign in to comment.