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

WIP: Hydra Test (Second attempt) #4973

Closed
wants to merge 18 commits into from
Closed
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
11 changes: 0 additions & 11 deletions .github/dependabut.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@ on:
merge_group:

jobs:
check-git-dependencies:
name: Check git dependencies
runs-on: ubuntu-latest
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v4
- name: Check Dependencies
run: ./scripts/ci/check-git-dependencies.sh

check-changelogs:
name: Check changelogs
runs-on: ubuntu-latest
Expand All @@ -39,26 +27,3 @@ jobs:

- name: Check changelogs
run: ./scripts/ci/check-changelogs.sh

check-cabal-files:
name: Check cabal files
runs-on: ubuntu-latest
defaults:
run:
shell: bash

steps:
- name: Install dependencies
run: sudo apt install -y fd-find

- name: Install Haskell
uses: input-output-hk/actions/haskell@latest
id: setup-haskell
with:
cabal-version: "3.10.1.0"

- uses: actions/checkout@v4

- name: Check cabal files
run: ./scripts/ci/check-cabal-files.sh

69 changes: 36 additions & 33 deletions cardano-client/cardano-client.cabal
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
cabal-version: 3.0
name: cardano-client
version: 0.3.1.5
synopsis: An API for ouroboros-network
description: An API for ouroboros-network.
license: Apache-2.0
license-files:
LICENSE
NOTICE

name: cardano-client
version: 0.3.1.5
synopsis: An API for ouroboros-network
description: An API for ouroboros-network.
license: Apache-2.0
license-files: LICENSE
NOTICE
copyright: 2019-2023 Input Output Global Inc (IOG), 2023-2024 Intersect
author: IOHK Engineering Team
maintainer: [email protected]
category: Network
build-type: Simple
extra-doc-files: CHANGELOG.md
copyright: 2019-2023 Input Output Global Inc (IOG), 2023-2024 Intersect
author: IOHK Engineering Team
maintainer: [email protected]
category: Network
build-type: Simple
extra-doc-files: CHANGELOG.md

library
hs-source-dirs: src
exposed-modules: Cardano.Client.Subscription
default-language: Haskell2010
default-extensions: ImportQualifiedPost
build-depends: base >=4.14 && <4.21,
bytestring >=0.10 && <0.13,
containers,
ouroboros-network-api >= 0.5.2 && < 0.10,
ouroboros-network >= 0.9 && < 0.18,
ouroboros-network-framework >= 0.8 && < 0.14,
network-mux ^>= 0.4.5,
hs-source-dirs: src
exposed-modules: Cardano.Client.Subscription
default-language: Haskell2010
default-extensions: ImportQualifiedPost
build-depends:
base >=4.14 && <4.21,
bytestring >=0.10 && <0.13,
containers,
network-mux ^>=0.4.5,
ouroboros-network >=0.9 && <0.18,
ouroboros-network-api >=0.5.2 && <0.10,
ouroboros-network-framework >=0.8 && <0.14,

ghc-options: -Wall
-Wno-unticked-promoted-constructors
-Wcompat
-Wincomplete-uni-patterns
-Wincomplete-record-updates
-Wpartial-fields
-Widentities
-Wredundant-constraints
-Wunused-packages
ghc-options:
-Wall
-Wno-unticked-promoted-constructors
-Wcompat
-Wincomplete-uni-patterns
-Wincomplete-record-updates
-Wpartial-fields
-Widentities
-Wredundant-constraints
-Wunused-packages
107 changes: 54 additions & 53 deletions cardano-ping/cardano-ping.cabal
Original file line number Diff line number Diff line change
@@ -1,59 +1,60 @@
cabal-version: 3.0
name: cardano-ping
version: 0.4.0.2
synopsis: Utility for pinging cardano nodes
description: Utility for pinging cardano nodes.
license: Apache-2.0
license-files: LICENSE
NOTICE
copyright: 2019-2023 Input Output Global Inc (IOG), 2023-2024 Intersect
author: Karl Knutsson
maintainer: [email protected] [email protected]
category: Network
build-type: Simple
extra-doc-files: README.md
CHANGELOG.md
cabal-version: 3.0
name: cardano-ping
version: 0.4.0.2
synopsis: Utility for pinging cardano nodes
description: Utility for pinging cardano nodes.
license: Apache-2.0
license-files:
LICENSE
NOTICE

copyright: 2019-2023 Input Output Global Inc (IOG), 2023-2024 Intersect
author: Karl Knutsson
maintainer: [email protected] [email protected]
category: Network
build-type: Simple
extra-doc-files:
CHANGELOG.md
README.md

flag asserts
description: Enable assertions
manual: False
default: False
description: Enable assertions
manual: False
default: False

library
hs-source-dirs: src
exposed-modules: Cardano.Network.Ping
build-depends: base >=4.14 && <4.21,
aeson >=2.1.1.0 && <3,
cborg >=0.2.8 && <0.3,
bytestring >=0.10 && <0.13,
contra-tracer >=0.1 && <0.3,
iproute,
time,

si-timers ^>=1.5,
strict-stm,

network-mux ^>=0.4.5,
tdigest ^>=0.3,
text >=1.2.4 && <2.2,
transformers >=0.5 && <0.7,

-- The Windows version of network-3.1.2 is missing
-- functions, see
-- https://github.com/haskell/network/issues/484
network >= 3.1.2.2 && < 3.2,
hs-source-dirs: src
exposed-modules: Cardano.Network.Ping
build-depends:
-- The Windows version of network-3.1.2 is missing
-- functions, see
-- https://github.com/haskell/network/issues/484
aeson >=2.1.1.0 && <3,
base >=4.14 && <4.21,
bytestring >=0.10 && <0.13,
cborg >=0.2.8 && <0.3,
contra-tracer >=0.1 && <0.3,
iproute,
network >=3.1.2.2 && <3.2,
network-mux ^>=0.4.5,
si-timers ^>=1.5,
strict-stm,
tdigest ^>=0.3,
text >=1.2.4 && <2.2,
time,
transformers >=0.5 && <0.7,

if flag(asserts)
ghc-options: -fno-ignore-asserts

default-language: Haskell2010
default-extensions: ImportQualifiedPost
ghc-options: -Wall
-Wcompat
-Widentities
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wno-unticked-promoted-constructors
-Wpartial-fields
-Wredundant-constraints
-Wunused-packages
ghc-options: -fno-ignore-asserts
default-language: Haskell2010
default-extensions: ImportQualifiedPost
ghc-options:
-Wall
-Wcompat
-Widentities
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wno-unticked-promoted-constructors
-Wpartial-fields
-Wredundant-constraints
-Wunused-packages
76 changes: 41 additions & 35 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@

outputs = inputs:
let # all platforms on which we build
supportedSystems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
supportedSystems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
in
inputs.flake-utils.lib.eachSystem supportedSystems (
system:
Expand All @@ -45,53 +45,59 @@
overlays = [
# haskellNix.overlay can be configured by later overlays, so need to come before them.
inputs.haskellNix.overlay
(import ./nix/tools.nix inputs)
(import ./nix/ouroboros-network.nix inputs)
(import ./nix/network-docs.nix inputs)
];
};
inherit (pkgs) lib;

flake = pkgs.ouroboros-network.flake {};
network-docs = pkgs.callPackage ./nix/network-docs.nix { };
check-stylish = pkgs.callPackage ./nix/check-stylish.nix { };
buildSystem = pkgs.buildPlatform.system;
flake = pkgs.ouroboros-network.flake { };
format = pkgs.callPackage ./nix/formatting.nix pkgs;
inherit (pkgs) lib network-docs;

# shells accessible through `nix develop`,
# `nix develop .\#devShells.x86_64-linux.ghc810`, etc.
devShells = rec {
default = import ./nix/shell.nix {
hls = true;
profiling = false;
inherit inputs pkgs;
ouroboros-network = pkgs.ouroboros-network;
};
profiling = import ./nix/shell.nix {
hls = true;
profiling = true;
inherit inputs pkgs;
ouroboros-network = pkgs.ouroboros-network;
};
};

# jobs executed on hydra
hydraJobs =
pkgs.callPackages inputs.iohkNix.utils.ciJobsAggregates
{
ciJobs =
flake.hydraJobs
// {
# This ensure hydra send a status for the required job (even if no change other than commit hash)
# This ensure hydra send a status for the required job (even
# if no change other than commit hash)
revision = pkgs.writeText "revision" (inputs.self.rev or "dirty");
inherit network-docs check-stylish;
}
// lib.optionalAttrs (system == "x86_64-linux") {
devShell = devShells.default;
inherit format network-docs;
};
}
# add network-docs & check-stylish to support
# `nix build .\#hydraJobs.x86_64-linux.network-docs` and
# `nix build .\#hydraJobs.x86_64-linux.check-stylis`.
// { inherit network-docs check-stylish; };
# also provide hydraJobs through legacyPackages to allow building without system prefix, e.g.
};

# Provide hydraJobs through legacyPackages to allow building without system prefix, e.g.
# `nix build .\#network-mux:lib:network-mux`
# `nix build .\#network-docs`
legacyPackages = { inherit hydraJobs network-docs check-stylish; };
legacyPackages = { inherit hydraJobs network-docs format; };
in
lib.recursiveUpdate flake rec {
project = pkgs.ouroboros-network;
inherit hydraJobs;
inherit legacyPackages;
devShells = let
profillingShell = p: {
# `nix develop .#profiling`
profiling = (p.appendModule {modules = [{enableLibraryProfiling = true;}];}).shell;
};
in
profillingShell pkgs.ouroboros-network
# Additional shells for every GHC version supported by haskell.nix, eg. `nix develop .#ghc927`
// lib.mapAttrs (compiler-nix-name: _: let
p = pkgs.ouroboros-network.appendModule {inherit compiler-nix-name;};
in
p.shell // (profillingShell p))
pkgs.haskell-nix.compiler;
# formatter used by nix fmt
formatter = pkgs.alejandra;
inherit hydraJobs legacyPackages devShells;
}
);
}
Loading
Loading