Skip to content

Commit 8228d24

Browse files
committed
Merge branch 'l-monninger/ci-fix' into eng-326/full-node-commitments
2 parents e61c112 + 0134626 commit 8228d24

24 files changed

+165
-195
lines changed

.github/workflows/checks.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Checks
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build:
8+
strategy:
9+
matrix:
10+
include:
11+
- os: ubuntu-22.04
12+
arch: x86_64
13+
runs-on: movement-runner
14+
- os: macos-13-latest
15+
arch: arm64
16+
runs-on: macos-13-xlarge
17+
18+
runs-on: ${{ matrix.runs-on }}
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v3
23+
24+
- name: Install Nix
25+
uses: DeterminateSystems/nix-installer-action@main
26+
27+
- name: Run test in nix environment
28+
run: nix develop --command bash -c "cargo check"
29+
30+
- name: Run test in nix environment
31+
run: nix develop --command bash -c "just m1-da-light-node test.local -t=false"
32+
33+
- name: Run test in nix environment
34+
run: nix develop --command bash -c "just monza-full-node test.local -t=false"

.github/workflows/m1-da-light-node.yml

-19
This file was deleted.

.github/workflows/m2-ci.yml

-65
This file was deleted.

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ target/
55
ledger_db/
66
state_merkle_db/
77
.etc
8-
.movement
8+
.movement
9+
.idea

Cargo.lock

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+41-60
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
inputs = {
3-
nixpkgs.url = "github:NixOS/nixpkgs/6143fc5eeb9c4f00163267708e26191d1e918932";
3+
nixpkgs.url = "github:NixOS/nixpkgs/f1010e0469db743d14519a1efd37e23f8513d714";
44
rust-overlay.url = "github:oxalica/rust-overlay";
55
flake-utils.url = "github:numtide/flake-utils";
66
};
@@ -12,9 +12,14 @@
1212
flake-utils,
1313
...
1414
}:
15-
flake-utils.lib.eachSystem ["aarch64-darwin" "x86_64-linux" "aarch64-linux"] (
15+
flake-utils.lib.eachSystem ["aarch64-darwin" "x86_64-darwin" "x86_64-linux" "aarch64-linux"] (
16+
1617
system: let
18+
19+
overrides = (builtins.fromTOML (builtins.readFile ./rust-toolchain.toml));
20+
1721
overlays = [(import rust-overlay)];
22+
1823
pkgs = import nixpkgs {
1924
inherit system overlays;
2025
};
@@ -28,29 +33,8 @@
2833
celestia-app = import ./celestia-app.nix { inherit pkgs; };
2934

3035
# monza-aptos
31-
monza-aptos = pkgs.stdenv.mkDerivation {
32-
pname = "monza-aptos";
33-
version = "branch-monza";
34-
35-
src = pkgs.fetchFromGitHub {
36-
owner = "movementlabsxyz";
37-
repo = "aptos-core";
38-
rev = "06443b81f6b8b8742c4aa47eba9e315b5e6502ff";
39-
sha256 = "sha256-iIYGbIh9yPtC6c22+KDi/LgDbxLEMhk4JJMGvweMJ1Q=";
40-
};
41-
42-
installPhase = ''
43-
cp -r . $out
44-
'';
45-
46-
meta = with pkgs.lib; {
47-
description = "Aptos core repository on the monza branch";
48-
homepage = "https://github.com/movementlabsxyz/aptos-core";
49-
license = licenses.asl20;
50-
};
36+
monza-aptos = import ./monza-aptos.nix { inherit pkgs; };
5137

52-
};
53-
5438
# Specific version of toolchain
5539
rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
5640

@@ -59,46 +43,37 @@
5943
rustc = rust;
6044
};
6145

62-
runtimeDependencies = with pkgs; [
46+
dependencies = with pkgs; [
47+
llvmPackages.bintools
6348
openssl
49+
openssl.dev
50+
libiconv
51+
pkg-config
6452
process-compose
6553
just
6654
jq
67-
];
68-
69-
70-
buildDependencies = with pkgs; [
71-
libclang.lib
72-
libz
73-
clang
74-
pkg-config
75-
protobuf
76-
rustPlatform.bindgenHook
77-
lld
78-
coreutils
79-
]
80-
++ runtimeDependencies
81-
# Be it Darwin
82-
++ lib.optionals stdenv.isDarwin [
83-
frameworks.Security
84-
frameworks.CoreServices
85-
frameworks.SystemConfiguration
86-
frameworks.AppKit
87-
]
88-
++ lib.optionals stdenv.isLinux [
89-
systemd
90-
];
91-
92-
testingDependencies = with pkgs; [
93-
celestia-node
94-
celestia-app
95-
monza-aptos
96-
]
97-
++ buildDependencies;
98-
99-
developmentDependencies = with pkgs; [
55+
libclang.lib
56+
libz
57+
clang
58+
pkg-config
59+
protobuf
60+
rustPlatform.bindgenHook
61+
lld
62+
coreutils
63+
gcc
10064
rust
101-
] ++ testingDependencies;
65+
celestia-node
66+
celestia-app
67+
monza-aptos
68+
] ++ lib.optionals stdenv.isDarwin [
69+
frameworks.Security
70+
frameworks.CoreServices
71+
frameworks.SystemConfiguration
72+
frameworks.AppKit
73+
] ++ lib.optionals stdenv.isLinux [
74+
udev
75+
systemd
76+
];
10277

10378

10479
in
@@ -109,11 +84,17 @@
10984

11085
# Development Shell
11186
devShells.default = mkShell {
112-
buildInputs = developmentDependencies;
87+
88+
OPENSSL_DEV=pkgs.openssl.dev;
89+
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
90+
buildInputs = dependencies;
91+
nativeBuildInputs = dependencies;
11392

11493
shellHook = ''
11594
#!/bin/bash
11695
export MONZA_APTOS_PATH=$(nix path-info -r .#monza-aptos | tail -n 1)
96+
export PATH=$PATH:''${CARGO_HOME:-~/.cargo}/bin
97+
export PATH=$PATH:''${RUSTUP_HOME:-~/.rustup}/toolchains/$RUSTC_VERSION-x86_64-unknown-linux-gnu/bin/
11798
cat <<'EOF'
11899
_ _ __ _ _ ____ _ _ ____ __ _ ____
119100
( \/ ) / \ / )( \( __)( \/ )( __)( ( \(_ _)

monza-aptos.nix

+3-5
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,16 @@ pkgs.stdenv.mkDerivation {
88
owner = "movementlabsxyz";
99
repo = "aptos-core";
1010
rev = "06443b81f6b8b8742c4aa47eba9e315b5e6502ff";
11-
sha256 = "sha256-bmFcJrC4ocbCw1pew2HKEdLj6+1D/0VuWtdoTs1S2sU=";
11+
sha256 = "sha256-iIYGbIh9yPtC6c22+KDi/LgDbxLEMhk4JJMGvweMJ1Q=";
1212
};
1313

1414
installPhase = ''
15-
ls -al && sleep 30
16-
mkdir -p $out
17-
cp -r ./* $out/
15+
cp -r . $out
1816
'';
1917

2018
meta = with pkgs.lib; {
2119
description = "Aptos core repository on the monza branch";
2220
homepage = "https://github.com/movementlabsxyz/aptos-core";
2321
license = licenses.asl20;
2422
};
25-
}
23+
}

process-compose/m1-da-light-node/process-compose.sequencer.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ processes:
99
cargo run -p m1-da-light-node --features "sequencer"
1010
depends_on:
1111
m1-da-light-node-verifier-tests:
12-
condition: process_completed
12+
condition: process_completed_successfully
1313
celestia-light-node:
1414
condition: process_healthy
1515
readiness_probe:
@@ -26,4 +26,4 @@ processes:
2626
m1-da-light-node:
2727
condition: process_healthy
2828
m1-da-light-node-verifier-tests:
29-
condition: process_completed
29+
condition: process_completed_successfully

process-compose/m1-da-light-node/process-compose.test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ processes:
1111
celestia-light-node:
1212
condition: process_healthy
1313
celestia-light-node-synced:
14-
condition: process_completed
14+
condition: process_completed_successfully
1515

1616
readiness_probe:
1717
exec:
@@ -27,7 +27,7 @@ processes:
2727
m1-da-light-node:
2828
condition: process_healthy
2929
m1-da-light-node-verifier-tests:
30-
condition: process_completed
30+
condition: process_completed_successfully
3131
availability:
3232
# NOTE: `restart: exit_on_failure` is not needed since
3333
# exit_on_end implies it.

process-compose/m1-da-light-node/process-compose.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,17 @@ processes:
1313

1414
celestia-light-node-synced:
1515
command: |
16-
sleep 10
1716
cargo run --bin wait-for-celestia-light-node
1817
depends_on:
1918
celestia-light-node:
2019
condition: process_healthy
2120

2221
m1-da-light-node:
2322
command: |
24-
cargo run -p m1-da-light-node
23+
./target/debug/m1-da-light-node
2524
depends_on:
2625
m1-da-light-node-verifier-tests:
27-
condition: process_completed
26+
condition: process_completed_successfully
2827
celestia-light-node:
2928
condition: process_healthy
3029
readiness_probe:

0 commit comments

Comments
 (0)