File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1717 SCCACHE_GCS_KEY_PREFIX : sccache_dcipher
1818 SCCACHE_GCS_RW_MODE : READ_WRITE
1919 CARGO_TERM_COLOR : always
20- TESTNETS_PRIVATE_KEY : ${{ secrets.TESTNETS_PRIVATE_KEY }}
21- POLYGON_RPC_URL : ${{ secrets.POLYGON_RPC_URL }}
22- BASE_SEPOLIA_RPC_URL : ${{ secrets.BASE_SEPOLIA_RPC_URL }}
23- AVALANCHE_FUJI_RPC_URL : ${{ secrets.AVALANCHE_FUJI_RPC_URL }}
20+
2421
2522jobs :
2623 rust-tests :
4744 - name : Run all tests
4845 run : cargo nextest run --target-dir './target' --no-tests warn --profile ci
4946 shell : bash
47+ env :
48+ TESTNETS_PRIVATE_KEY : ${{ secrets.TESTNETS_PRIVATE_KEY }}
49+ POLYGON_RPC_URL : ${{ secrets.POLYGON_RPC_URL }}
50+ BASE_SEPOLIA_RPC_URL : ${{ secrets.BASE_SEPOLIA_RPC_URL }}
51+ AVALANCHE_FUJI_RPC_URL : ${{ secrets.AVALANCHE_FUJI_RPC_URL }}
5052
5153 rust-clippy :
5254 name : Run clippy
Original file line number Diff line number Diff line change @@ -5,16 +5,21 @@ WORKDIR /app
55
66FROM chef AS planner
77COPY . .
8- RUN cargo chef prepare --recipe-path recipe.json
8+ RUN cargo chef prepare --recipe-path recipe.json --bin adkg-cli
99
1010FROM chef AS builder
1111COPY --from=planner /app/recipe.json recipe.json
1212# Build dependencies - this is the caching Docker layer!
13- RUN cargo chef cook --release --recipe-path recipe.json
13+ RUN cargo chef cook --release --recipe-path recipe.json --bin adkg-cli
14+ # Copy local dependencies
15+ COPY Cargo.toml Cargo.lock ./
16+ COPY bin/adkg-cli/ ./bin/adkg-cli
17+ COPY crates/adkg ./crates/adkg
18+ COPY crates/config ./crates/config
19+ COPY crates/network ./crates/network
20+ COPY crates/utils ./crates/utils
1421# Build application
15- COPY . .
16- RUN cargo build --release -p adkg-cli
17- RUN strip target/release/adkg-cli
22+ RUN cargo build --release -p adkg-cli --bin adkg-cli
1823
1924# We do not need the Rust toolchain to run the binary!
2025FROM debian:bookworm-slim AS runtime
Original file line number Diff line number Diff line change @@ -6,16 +6,23 @@ WORKDIR /app
66
77FROM chef AS planner
88COPY . .
9- RUN cargo chef prepare --recipe-path recipe.json
9+ RUN cargo chef prepare --recipe-path recipe.json --bin blocklock-agent
1010
1111FROM chef AS builder
1212COPY --from=planner /app/recipe.json recipe.json
13-
1413# Build dependencies - this is the caching Docker layer!
15- RUN cargo chef cook --release --recipe-path recipe.json
16-
14+ RUN cargo chef cook --release --recipe-path recipe.json --bin blocklock-agent
1715# Build application
18- COPY . .
16+ COPY Cargo.toml Cargo.lock ./
17+ COPY bin/blocklock-agent/ ./bin/blocklock-agent
18+ COPY crates/dcipher-agents ./crates/dcipher-agents
19+ COPY crates/generated ./crates/generated
20+ COPY crates/utils ./crates/utils
21+ COPY crates/config ./crates/config
22+ COPY crates/network ./crates/network
23+ COPY crates/signer ./crates/signer
24+ COPY crates/superalloy ./crates/superalloy
25+
1926RUN cargo build --release -p blocklock-agent --example blocklock
2027
2128# We do not need the Rust toolchain to run the binary!
Original file line number Diff line number Diff line change 22
33# Base image for rust
44FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef
5- RUN apt-get update && apt-get install -y protobuf-compiler
6-
5+ RUN apt-get update \
6+ && apt-get install -y protobuf-compiler \
7+ && rm -rf /var/lib/apt/lists/*
78WORKDIR /app
89
910FROM chef AS planner
1011COPY . .
12+ # chef prepare --bin sadly doesn't support binaries of kind "example"
1113RUN cargo chef prepare --recipe-path recipe.json
1214
1315FROM chef AS builder
1416COPY --from=planner /app/recipe.json recipe.json
1517
1618# Build dependencies - this is the caching Docker layer!
19+ # --bin sadly doesn't support binaries of kind "example"
1720RUN cargo chef cook --release --recipe-path recipe.json
1821
1922# Build application
20- COPY . .
23+ COPY Cargo.toml Cargo.lock ./
24+
25+ COPY bin/dsigner/ ./bin/dsigner
26+ COPY crates/network ./crates/network
27+ COPY crates/signer ./crates/signer
28+ COPY crates/superalloy ./crates/superalloy
29+ COPY crates/utils ./crates/utils
30+ COPY modules/dcipher-proto ./modules/dcipher-proto
31+
2132RUN cargo build --release --example dsigner_grpc --all-features
2233
2334# We do not need the Rust toolchain to run the binary!
Original file line number Diff line number Diff line change @@ -8,16 +8,27 @@ WORKDIR /app
88
99FROM chef AS planner
1010COPY . .
11+ # chef prepare --bin sadly doesn't support binaries of kind "example"
1112RUN cargo chef prepare --recipe-path recipe.json
1213
1314FROM chef AS builder
1415COPY --from=planner /app/recipe.json recipe.json
1516
1617# Build dependencies - this is the caching Docker layer!
18+ # --bin sadly doesn't support binaries of kind "example"
1719RUN cargo chef cook --release --recipe-path recipe.json
1820
1921# Build application
20- COPY . .
22+ COPY Cargo.toml Cargo.lock ./
23+
24+ COPY bin/dsigner/ ./bin/dsigner
25+ COPY crates/config ./crates/config
26+ COPY crates/network ./crates/network
27+ COPY crates/signer ./crates/signer
28+ COPY crates/superalloy ./crates/superalloy
29+ COPY crates/utils ./crates/utils
30+ COPY modules/dcipher-proto ./modules/dcipher-proto
31+
2132RUN cargo build --release --example dsigner_legacy_http --all-features
2233
2334# We do not need the Rust toolchain to run the binary!
Original file line number Diff line number Diff line change 1- # Image building solidity contracts
2- # Base image for rust
1+ # Image must be built from the root
2+
33FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef
4- RUN apt-get update \
5- && apt-get install -y protobuf-compiler \
6- && rm -rf /var/lib/apt/lists/*
74WORKDIR /app
85
96FROM chef AS planner
107COPY . .
11- RUN cargo chef prepare --recipe-path recipe.json
8+ RUN cargo chef prepare --recipe-path recipe.json --bin monitoring
129
1310FROM chef AS builder
1411COPY --from=planner /app/recipe.json recipe.json
1512
1613# Build dependencies - this is the caching Docker layer!
17- RUN cargo chef cook --release --recipe-path recipe.json
14+ RUN cargo chef cook --release --recipe-path recipe.json --bin monitoring
1815
1916# Build application
20- COPY . .
21- RUN cargo build --release -p monitoring
17+ COPY Cargo.toml Cargo.lock ./
18+
19+ COPY bin/monitoring/ ./bin/monitoring
20+ COPY crates/agent-utils ./crates/agent-utils
21+ COPY crates/config ./crates/config
22+ COPY crates/generated ./crates/generated
23+ COPY crates/utils ./crates/utils
24+
25+ RUN cargo build --release -p monitoring --bin monitoring
2226
2327# We do not need the Rust toolchain to run the binary!
2428FROM debian:bookworm-slim AS runtime
Original file line number Diff line number Diff line change 1- # Image building solidity contracts
2- # Base image for rust
1+ # Image must be built from the root
2+
33FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef
44RUN apt-get update \
55 && apt-get install -y protobuf-compiler \
@@ -8,16 +8,25 @@ WORKDIR /app
88
99FROM chef AS planner
1010COPY . .
11- RUN cargo chef prepare --recipe-path recipe.json
11+ RUN cargo chef prepare --recipe-path recipe.json --bin onlyswaps-smoketest
1212
1313FROM chef AS builder
1414COPY --from=planner /app/recipe.json recipe.json
1515
1616# Build dependencies - this is the caching Docker layer!
17- RUN cargo chef cook --release --recipe-path recipe.json
17+ RUN cargo chef cook --release --recipe-path recipe.json --bin onlyswaps-smoketest
1818
1919# Build application
20- COPY . .
20+ COPY Cargo.toml Cargo.lock ./
21+
22+ COPY bin/onlyswaps-smoketest/ ./bin/onlyswaps-smoketest
23+ COPY crates/agent-utils ./crates/agent-utils
24+ COPY crates/config ./crates/config
25+ COPY crates/generated ./crates/generated
26+ COPY crates/onlyswaps-client ./crates/onlyswaps-client
27+ COPY crates/superalloy ./crates/superalloy
28+ COPY crates/utils ./crates/utils
29+
2130RUN cargo build --release -p onlyswaps-smoketest
2231
2332# We do not need the Rust toolchain to run the binary!
Original file line number Diff line number Diff line change 1+ # Image must be built from the root
2+
13FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef
24WORKDIR /app
35
46FROM chef AS planner
57COPY . .
6- RUN cargo chef prepare --recipe-path recipe.json
8+ RUN cargo chef prepare --recipe-path recipe.json --bin onlyswaps-solver
79
810FROM chef AS builder
911COPY --from=planner /app/recipe.json recipe.json
1012
1113# Build dependencies - this is the caching Docker layer!
12- RUN cargo chef cook --release --recipe-path recipe.json
14+ RUN cargo chef cook --release --recipe-path recipe.json --bin onlyswaps-solver
1315
1416# Build application
15- COPY . .
16- RUN cargo build --release -p onlyswaps-solver
17+ COPY Cargo.toml Cargo.lock ./
18+
19+ COPY bin/onlyswaps-solver/ ./bin/onlyswaps-solver
20+ COPY crates/agent-utils ./crates/agent-utils
21+ COPY crates/config ./crates/config
22+ COPY crates/generated ./crates/generated
23+ COPY crates/utils ./crates/utils
24+
25+ RUN cargo build --release -p onlyswaps-solver --bin onlyswaps-solver --all-features
1726
1827# We do not need the Rust toolchain to run the binary!
1928FROM debian:bookworm-slim AS runtime
Original file line number Diff line number Diff line change 1- # Image building solidity contracts
2- # Base image for rust
1+ # Image must be built from the root
2+
33FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef
44RUN apt-get update \
55 && apt-get install -y protobuf-compiler \
@@ -8,17 +8,27 @@ WORKDIR /app
88
99FROM chef AS planner
1010COPY . .
11- RUN cargo chef prepare --recipe-path recipe.json
11+ RUN cargo chef prepare --recipe-path recipe.json --bin onlyswaps-state-api
1212
1313FROM chef AS builder
1414COPY --from=planner /app/recipe.json recipe.json
1515
1616# Build dependencies - this is the caching Docker layer!
17- RUN cargo chef cook --release --recipe-path recipe.json
17+ RUN cargo chef cook --release --recipe-path recipe.json --bin onlyswaps-state-api
1818
1919# Build application
20- COPY . .
21- RUN cargo build --release -p onlyswaps-state-api
20+ COPY Cargo.toml Cargo.lock ./
21+
22+ COPY bin/onlyswaps-state-api/ ./bin/onlyswaps-state-api
23+ COPY crates/agent-utils ./crates/agent-utils
24+ COPY crates/config ./crates/config
25+ COPY crates/generated ./crates/generated
26+ COPY crates/omnievent ./crates/omnievent
27+ COPY crates/superalloy ./crates/superalloy
28+ COPY crates/utils ./crates/utils
29+ COPY modules/dcipher-proto ./modules/dcipher-proto
30+
31+ RUN cargo build --release -p onlyswaps-state-api --bin onlyswaps-state-api
2232
2333# We do not need the Rust toolchain to run the binary!
2434FROM debian:bookworm-slim AS runtime
You can’t perform that action at this time.
0 commit comments