Skip to content

Commit a89d417

Browse files
committed
Try fix ubuntu ci
1 parent afe1978 commit a89d417

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

nix/hydra/demo.nix

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,15 @@
1616

1717
processes = {
1818
prepare-devnet = {
19-
command = "${self}/demo/prepare-devnet.sh";
19+
# Run with Nix-provided bash to avoid shebang/env issues in sandboxes
20+
working_dir = ".";
21+
command = ''
22+
${pkgs.bash}/bin/bash ${self}/demo/prepare-devnet.sh
23+
'';
2024
};
2125
cardano-node = {
26+
# Ensure relative paths resolve against the same directory as prepare-devnet
27+
working_dir = ".";
2228
command = ''
2329
${pkgs.cardano-node}/bin/cardano-node run \
2430
--config devnet/cardano-node.json \
@@ -33,6 +39,8 @@
3339
depends_on."prepare-devnet".condition = "process_completed";
3440
};
3541
seed-devnet = {
42+
# Needs the same working directory as prepare-devnet to find devnet files
43+
working_dir = ".";
3644
command = ''
3745
${self}/demo/seed-devnet.sh ${pkgs.cardano-cli}/bin/cardano-cli ${self'.packages.hydra-node}/bin/hydra-node
3846
'';
@@ -45,7 +53,7 @@
4553
checkPhase = ""; # not shellcheck and choke on sourcing .env
4654
text = ''
4755
# (Re-)Export all variables from .env
48-
set -a; source .env; set +a
56+
set -a; [ -f .env ] && source .env; set +a
4957
${self'.packages.hydra-node}/bin/hydra-node \
5058
--node-id 1 \
5159
--listen 127.0.0.1:5001 \
@@ -67,6 +75,7 @@
6775
--contestation-period 3s
6876
'';
6977
};
78+
working_dir = ".";
7079
ready_log_line = "NodeIsLeader";
7180
depends_on."seed-devnet".condition = "process_completed";
7281
};
@@ -77,7 +86,7 @@
7786
checkPhase = ""; # not shellcheck and choke on sourcing .env
7887
text = ''
7988
# (Re-)Export all variables from .env
80-
set -a; source .env; set +a
89+
set -a; [ -f .env ] && source .env; set +a
8190
${self'.packages.hydra-node}/bin/hydra-node \
8291
--node-id 2 \
8392
--listen 127.0.0.1:5002 \
@@ -99,6 +108,7 @@
99108
--contestation-period 3s
100109
'';
101110
};
111+
working_dir = ".";
102112
ready_log_line = "NodeIsLeader";
103113
depends_on."seed-devnet".condition = "process_completed";
104114
};
@@ -109,7 +119,7 @@
109119
checkPhase = ""; # not shellcheck and choke on sourcing .env
110120
text = ''
111121
# (Re-)Export all variables from .env
112-
set -a; source .env; set +a
122+
set -a; [ -f .env ] && source .env; set +a
113123
${self'.packages.hydra-node}/bin/hydra-node \
114124
--node-id 3 \
115125
--listen 127.0.0.1:5003 \
@@ -131,6 +141,7 @@
131141
--contestation-period 3s
132142
'';
133143
};
144+
working_dir = ".";
134145
ready_log_line = "NodeIsLeader";
135146
depends_on."seed-devnet".condition = "process_completed";
136147
};
@@ -187,7 +198,7 @@
187198
cardano-node --version
188199
189200
echo "--- Testing demo setup"
190-
${self}/demo/prepare-devnet.sh
201+
${pkgs.bash}/bin/bash ${self}/demo/prepare-devnet.sh
191202
echo "✅ Demo setup completed successfully"
192203
193204
echo "--- Testing that devnet files exist"

0 commit comments

Comments
 (0)