Skip to content

Commit

Permalink
chore(nix): update process-compose to support process-compose down
Browse files Browse the repository at this point in the history
…and some minor refactoring (#4258)

Required for merge:
- [ ] `pr-workflow-check / draft-release-check` is ✅ success
- Other rules GitHub shows you, or can be read in
[configuration](../terraform/github.com/branches.tf)

Makes review faster:
- [ ] PR title is my best effort to provide summary of changes and has
clear text to be part of release notes
- [ ] I marked PR by `misc` label if it should not be in release notes
- [ ] Linked Zenhub/Github/Slack/etc reference if one exists
- [ ] I was clear on what type of deployment required to release my
changes (node, runtime, contract, indexer, on chain operation, frontend,
infrastructure) if any in PR title or description
- [ ] Added reviewer into `Reviewers`
- [ ] I tagged(`@`) or used other form of notification of one person who
I think can handle best review of this PR
- [ ] I have proved that PR has no general regressions of relevant
features and processes required to release into production
- [ ] Any dependency updates made, was done according guides from
relevant dependency
- Clicking all checkboxes 
- Adding detailed description of changes when it feels appropriate (for
example when PR is big)
  • Loading branch information
dzmitry-lahoda authored Oct 28, 2023
1 parent 6afbb34 commit 2501af3
Show file tree
Hide file tree
Showing 7 changed files with 139 additions and 77 deletions.
16 changes: 7 additions & 9 deletions code/integration-tests/runtime-tests/runtime-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@
pkgs.lib.meta.getExe self'.packages.devnet-xc-fresh-background
} 2>&1 & ) | tee devnet-xc.log &
process-compose-stop() {
for i in $(process-compose process list)
do
process-compose process stop "$i"
done
}
TRIES=0
START_RESULT=1
while test $TRIES -le 64; do
Expand All @@ -38,7 +31,9 @@
fi
set -o errexit
if test $START_RESULT -eq 0; then
process-compose-stop
set +o errexit
pkill -SIGTERM process-compose
set -o errexit
break
fi
((TRIES=TRIES+1))
Expand All @@ -47,7 +42,10 @@
# here nodes are up and running, binaries in path, npm is here too
process-compose-stop
sleep 8
set +o errexit
pkill -SIGKILL process-compose
set -o errexit
exit $START_RESULT
'';
};
Expand Down
39 changes: 38 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 13 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
url = "github:Platonic-Systems/process-compose-flake";
};

process-compose = {
url = "github:F1bonacc1/process-compose";
inputs.nixpkgs.follows = "nixpkgs";
};

flake-parts.url = "github:hercules-ci/flake-parts";
flake-utils.url = "github:numtide/flake-utils";
npm-buildpackage.url = "github:serokell/nix-npm-buildpackage";
Expand Down Expand Up @@ -114,28 +119,31 @@
./code/runtimes.nix
./code/services/cmc-api/cmc-api.nix
./code/utils/price-feed/price-feed.nix
./code/xcvm/flake-module.nix
./code/xcvm/evm/flake-module.nix
./code/xcvm/flake-module.nix
./docs/flake-module.nix
./flake/all.nix
./flake/nixos-configuration.nix
./flake/bash.nix
./flake/cargo-tools.nix
./flake/check.nix
./flake/cosmos.nix
./flake/darwin-configurations.nix
./flake/bash.nix
./flake/dev-shells.nix
./flake/devnet-tools.nix
./flake/devnet.nix
./flake/docker.nix
./flake/ethereum.nix
./flake/fmt.nix
./flake/hermes.nix
./flake/ethereum.nix
./flake/home-configurations.nix
./flake/ibc.nix
./flake/live.nix
./flake/nixos-configuration.nix
./flake/osmosis.nix
./flake/cosmos.nix
./flake/overlays.nix
./flake/process-compose.nix
./flake/release.nix
./flake/rust.nix
./flake/subxt.nix
./flake/zombienet.nix
./inputs/AcalaNetwork/acala.nix
Expand All @@ -151,9 +159,6 @@
./inputs/paritytech/zombienet/flake-module.nix
./inputs/Wasmswap/wasmswap-contracts.nix
./inputs/wynddao/flake-module.nix
./tools/devnet-tools.nix
./tools/pkgs.nix
./tools/rust.nix
];
systems =
[ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
Expand Down
3 changes: 2 additions & 1 deletion tools/devnet-tools.nix → flake/devnet-tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
curl
];
withDevNetContainerTools = with pkgs;
[ bottom gawk gnugrep less nettools nix self'.packages.bech32cli ]
with self'.packages;
[ bottom gawk gnugrep less nettools nix bech32cli process-compose ]
++ withBaseContainerTools ++ withUserContainerTools;
withBuildTools = with pkgs; [ binutils ] ++ withBaseContainerTools;

Expand Down
1 change: 1 addition & 0 deletions tools/pkgs.nix → flake/overlays.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
polkadot.overlays.default
rust-overlay.overlays.default
zombienet.overlays.default
process-compose.overlays.default
];
};
};
Expand Down
Loading

0 comments on commit 2501af3

Please sign in to comment.