Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import cardano addresses repo #492

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
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
47 changes: 46 additions & 1 deletion .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,56 @@ jobs:
ghc-version: ${{ matrix.ghc }}
cabal-version: 3.12.1.0

- name: "WIN: fixup cabal config"
if: runner.os == 'Windows'
run: |
# make sure cabal knows about msys64, and mingw64 tools. Not clear why C:/cabal/config is empty
# and C:/cabal doesn't even exist. The ghcup bootstrap file should have create it in the image:
# See https://github.com/haskell/ghcup-hs/blob/787edc17af4907dbc51c85e25c490edd8d68b80b/scripts/bootstrap/bootstrap-haskell#L591
# So we'll do it by hand here for now.
#
# We'll _not_ add extra-include-dirs, or extra-lib-dirs, and rely on what's shipped with GHC.
# https://github.com/msys2/MINGW-packages/issues/10837#issuecomment-1047105402
# https://gitlab.haskell.org/ghc/ghc/-/issues/21111
# if we _do_ want them, this would be the lines to add below

$ghcMingwDir = Join-Path -Path $(ghc --print-libdir) `
-ChildPath ../mingw/x86_64-*-mingw32/lib/ `
-Resolve

cabal user-config -a "extra-prog-path: C:/msys64/mingw64/bin, C:/msys64/usr/bin" `
-a "extra-include-dirs: C:/msys64/mingw64/include" `
-a ("extra-lib-dirs: {0}, C:/msys64/mingw64/lib" -f $ghcMingwDir) `
-f init

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

- name: "WIN: Install libs"
if: runner.os == 'Windows'
run: |
C:/msys64/usr/bin/pacman.exe --noconfirm -S mingw-w64-x86_64-pcre

- name: "LINUX: Install build environment (apt-get)"
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -y install libsodium23 libsodium-dev
sudo apt-get -y remove --purge software-properties-common
sudo apt-get -y autoremove

- name: "MAC: Install build environment (brew)"
if: runner.os == 'macOS'
run: |
brew install libsodium
brew install pcre
sudo mkdir -p /usr/local/include
if [ ! -f /usr/local/include/pcre.h ]; then
sudo ln -s /opt/homebrew/Cellar/pcre/8.45/include/pcre.h /usr/local/include
fi

- uses: actions/checkout@v4

- name: Cabal update
Expand Down Expand Up @@ -132,7 +177,7 @@ jobs:
# these two are msys2 env vars, they have no effect on non-msys2 installs.
MSYS2_PATH_TYPE: inherit
MSYSTEM: MINGW64
run: cabal test all --enable-tests --test-show-details=direct -j1
run: cabal test all

- name: Build strict-checked-vars with invariants
run: cabal build -f+checktvarinvariants -f+checkmvarinvariants strict-checked-vars
Expand Down
72 changes: 58 additions & 14 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,70 @@ repository cardano-haskell-packages
c00aae8461a256275598500ea0e187588c35a5d5d7454fb57eac18d9edb86a56
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee

repository ghcjs-overlay
url: https://input-output-hk.github.io/hackage-overlay-ghcjs/
secure: True
root-keys:
key-threshold: 0
--sha256: sha256-w1WpLfHixvH2ki88pUXOSgEs05+vMzheQfjyQ5ZaqH0=

-- The hackage index-state
index-state: 2024-06-12T11:52:25Z
-- The CHaP index-state
index-state: cardano-haskell-packages 2024-06-12T11:52:25Z

packages:
base-deriving-via
cardano-binary
cardano-binary/test
cardano-crypto-class
cardano-crypto-praos
cardano-crypto-tests
cardano-git-rev
cardano-slotting
cardano-strict-containers
cardano-mempool
heapwords
measures
orphans-deriving-via
strict-checked-vars
cardano-addresses/cardano-addresses
cardano-addresses/cardano-addresses-cli
cardano-addresses/cardano-addresses-jsapi
cardano-addresses/cardano-addresses-jsbits
if !os(ghcjs)
packages:
base-deriving-via
cardano-binary
cardano-binary/test
cardano-crypto-class
cardano-crypto-praos
cardano-crypto-tests
cardano-git-rev
cardano-slotting
cardano-strict-containers
cardano-mempool
heapwords
measures
orphans-deriving-via
strict-checked-vars

if os(ghcjs)
active-repositories: hackage.haskell.org, cardano-haskell-packages, ghcjs-overlay:override
else
active-repositories: hackage.haskell.org, cardano-haskell-packages

-- If not ghcjs, we disable cardano-addresses-jsapi
-- because they only work on JS
if os(ghcjs)
package cardano-addresses-jsapi
tests: true
else
package cardano-addresses-jsapi
tests: false

constraints:
ghcjs-base >=0.2.0.3
, optparse-applicative >= 0.18.1.0
-- Avoid conflict in `hjsonschema`
-- src/Import.hs:2:16: error: [GHC-69158]
-- Conflicting exports for ‘witness’:
-- ‘module Export’ exports ‘Export.witness’
-- imported from ‘Protolude’ at src/Import.hs:4:1-36
-- (and originally defined in ‘Protolude.Debug’)
-- ‘module Export’ exports ‘Export.witness’
-- imported from ‘Test.QuickCheck’ at src/Import.hs:(9,1)-(10,50)
-- (and originally defined in ‘Test.QuickCheck.Property’)
-- TODO update https://github.com/input-output-hk/hjsonschema to
-- hide `witness` when importing from `Test.QuickCheck`
, QuickCheck < 2.15


-- Ensures colourized output from test runners
test-show-details: direct
Expand Down
Loading
Loading