Skip to content

Commit 8981a96

Browse files
iohk-bors[bot]dermetfanjbgi
authored
Merge #1280
1280: add CI action for Cicero r=jbgi a=dermetfan This adds a Cicero action that runs all hydra jobs on pushes and pull requests. Also purified nix evaluation of hydra jobs. Co-authored-by: Robin Stumm <[email protected]> Co-authored-by: Jean-Baptiste Giraudeau <[email protected]>
2 parents 63e68f2 + e96e474 commit 8981a96

27 files changed

+888
-658
lines changed

.buildkite/docker-build-push.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# There is a little bit of bash logic to replace the default repo and
66
# tag from the nix-build (../nix/docker.nix).
77

8-
{ dbSyncPackages ? import ../. {}
8+
{ dbSyncPackages ? import ../nix {}
99

1010
# Build system's Nixpkgs. We use this so that we have the same docker
1111
# version as the docker daemon.

.buildkite/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
steps:
22
- label: 'check-cabal-project'
3-
command: 'nix-build ./nix -A iohkNix.checkCabalProject -o check-cabal-project.sh && ./check-cabal-project.sh'
3+
command: 'nix run .#checkCabalProject'
44
agents:
55
system: x86_64-linux
66

bors.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
status = [
22
"buildkite/cardano-db-sync",
3-
"ci/hydra-eval",
4-
"ci/hydra-build:required",
3+
"ci",
54
]
65
timeout_sec = 7200
76
required_approvals = 1

cabal.project

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ repository cardano-haskell-packages
99
c00aae8461a256275598500ea0e187588c35a5d5d7454fb57eac18d9edb86a56
1010
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee
1111

12+
-- repeating the index-state for hackage to work around hackage.nix parsing limitation
1213
index-state: 2022-11-11T00:00:00Z
13-
index-state: cardano-haskell-packages 2022-11-12T20:00:00Z
14+
index-state:
15+
, hackage.haskell.org 2022-11-11T00:00:00Z
16+
, cardano-haskell-packages 2022-11-12T20:00:00Z
1417

1518
packages:
1619
cardano-db
@@ -55,7 +58,7 @@ package cryptonite
5558
flags: -support_rdrand
5659

5760
-- ---------------------------------------------------------
58-
-- Enable tests
61+
-- Enable tests
5962

6063
tests: True
6164
test-show-details: direct

custom-config/default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
self: { withHoogle = true; }
1+
self: {
2+
withHoogle = true;
3+
# optional extra haskell.nix module
4+
haskellNix = {};
5+
}

custom-config/flake.nix

Lines changed: 0 additions & 9 deletions
This file was deleted.

default.nix

Lines changed: 0 additions & 60 deletions
This file was deleted.

doc/building-running.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ command. Pre-release tags (eg things like `12.0.0-preX`) should also be avoided
3232
git clone https://github.com/input-output-hk/cardano-node
3333
cd cardano-node
3434
git checkout <latest-official-tag> -b tag-<latest-official-tag>
35-
nix-build -A scripts.mainnet.node -o mainnet-node-local
36-
./mainnet-node-local/bin/cardano-node-mainnet
35+
nix run .#mainnet/node
3736
```
3837

3938
### Set up and run the db-sync node
@@ -45,10 +44,10 @@ nix-build -A scripts.mainnet.node -o mainnet-node-local
4544
# Check ./github/workflows/haskell.yml to validate the git sha above.
4645

4746
# On Linux
48-
sudo make install
47+
sudo make install
4948

5049
# On macOS
51-
make install
50+
make install
5251

5352
```
5453

doc/docker.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ docker run \
5555
## Build and load image using Nix
5656

5757
```
58-
docker load -i $(nix-build -A dockerImage --no-out-link)
58+
nix build .#dockerImage
59+
docker load -i ./result
5960
```
6061

6162
## Restore from Snapshot
@@ -81,15 +82,15 @@ For `docker-compose`:
8182
```yaml
8283
cardano-db-sync:
8384
image: inputoutput/cardano-db-sync:13.0.5
84-
...
85+
...
8586
working_dir: /var/lib/cexplorer
8687
volumes:
8788
- db-sync-data:/var/lib/cexplorer
8889
- node-ipc:/node-ipc
8990
restart: on-failure
9091
...
9192
```
92-
After starting `docker-compose` the snapshot file should be downloaded to specified directory
93+
After starting `docker-compose` the snapshot file should be downloaded to specified directory
9394
which exact location can be found by using `docker volume inspect` command:
9495

9596
```sh
@@ -173,9 +174,8 @@ Prerequisites:
173174
Assuming you want a Linux x86 image run:
174175

175176
``` shell
176-
nix-build -A dockerImage --no-out-link \
177-
--builders 'ssh://builder@x86_64-linux.example.com x86_64-linux' \
178-
--argstr system x86_64-linux
177+
nix build .#legacyPackages.x86_64-linux.dockerImage \
178+
--builders 'ssh://builder@x86_64-linux.example.com x86_64-linux'
179179
```
180180

181181
At the end it will generate a `tar.gz` file

doc/smash.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ cabal install cardano-smash-server
8989
- nix
9090

9191
```
92-
nix-build -A cardano-smash-server -o smash-server
92+
nix build .#cardano-smash-server -o smash-server
9393
```
9494

9595
## How to run SMASH with the Cardano node and db-sync
@@ -243,5 +243,3 @@ It is possible that a pool unregisters, in which case all it's metadata will be
243243
```
244244
curl --verbose --header "Content-Type: application/json" http://localhost:3100/api/v1/retired
245245
```
246-
247-

0 commit comments

Comments
 (0)