Skip to content

Commit 39e0604

Browse files
committed
3
Signed-off-by: bakhtin <[email protected]>
1 parent f2cf431 commit 39e0604

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

.github/workflows/reprotest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Calculate SHA256
3939
id: sha256
4040
run: |
41-
sha256sum target/x86_64-unknown-linux-gnu/reproducible/rbuilder-operator > rbuilder-operator.sha256
41+
sha256sum target/rbuilder-operator > rbuilder-operator.sha256
4242
echo "hash=$(cat rbuilder-operator.sha256 | cut -d' ' -f1)" >> $GITHUB_OUTPUT
4343
echo "Binary SHA256 on ${{ matrix.machine }}: $(cat rbuilder-operator.sha256)"
4444
- name: Upload the hash

Makefile

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,26 +106,41 @@ docker-image-test-relay: ## Build a test relay Docker image
106106

107107
##@ Debian Packages
108108

109+
# Define binary paths for smart dependencies
110+
BID_SCRAPER_BIN := target/$(if $(BUILD_TARGET),$(BUILD_TARGET)/)$(BUILD_PROFILE)/bid-scraper
111+
RBUILDER_OPERATOR_BIN := target/$(if $(BUILD_TARGET),$(BUILD_TARGET)/)$(BUILD_PROFILE)/rbuilder-operator
112+
RBUILDER_REBALANCER_BIN := target/$(if $(BUILD_TARGET),$(BUILD_TARGET)/)$(BUILD_PROFILE)/rbuilder-rebalancer
113+
109114
.PHONY: install-cargo-deb
110115
install-cargo-deb:
111116
@command -v cargo-deb >/dev/null 2>&1 || cargo install [email protected] --locked
112117

118+
# Build individual binaries only if they don't exist - delegate to existing build targets
119+
$(BID_SCRAPER_BIN): build-bid-scraper
120+
@# Binary built by build-bid-scraper target
121+
122+
$(RBUILDER_OPERATOR_BIN): build-rbuilder-operator
123+
@# Binary built by build-rbuilder-operator target
124+
125+
$(RBUILDER_REBALANCER_BIN): build-rbuilder-rebalancer
126+
@# Binary built by build-rbuilder-rebalancer target
127+
113128
.PHONY: build-deb-bid-scraper
114-
build-deb-bid-scraper: install-cargo-deb build-bid-scraper ## Build bid-scraper Debian package
129+
build-deb-bid-scraper: install-cargo-deb $(BID_SCRAPER_BIN) ## Build bid-scraper Debian package
115130
cargo deb --profile $(BUILD_PROFILE) --no-build --no-dbgsym --no-strip \
116131
-p bid-scraper \
117132
$(if $(BUILD_TARGET),--target $(BUILD_TARGET)) \
118133
$(if $(VERSION),--deb-version "1~$(VERSION)")
119134

120135
.PHONY: build-deb-rbuilder-operator
121-
build-deb-rbuilder-operator: install-cargo-deb build-rbuilder-operator ## Build rbuilder-operator Debian package
136+
build-deb-rbuilder-operator: install-cargo-deb $(RBUILDER_OPERATOR_BIN) ## Build rbuilder-operator Debian package
122137
cargo deb --profile $(BUILD_PROFILE) --no-build --no-dbgsym --no-strip \
123138
-p rbuilder-operator \
124139
$(if $(BUILD_TARGET),--target $(BUILD_TARGET)) \
125140
$(if $(VERSION),--deb-version "1~$(VERSION)")
126141

127142
.PHONY: build-deb-rbuilder-rebalancer
128-
build-deb-rbuilder-rebalancer: install-cargo-deb build-rbuilder-rebalancer ## Build rbuilder-rebalancer Debian package
143+
build-deb-rbuilder-rebalancer: install-cargo-deb $(RBUILDER_REBALANCER_BIN) ## Build rbuilder-rebalancer Debian package
129144
cargo deb --profile $(BUILD_PROFILE) --no-build --no-dbgsym --no-strip \
130145
-p rbuilder-rebalancer \
131146
$(if $(BUILD_TARGET),--target $(BUILD_TARGET)) \

docker/Dockerfile.reproducible

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ COPY . .
1414
RUN SOURCE_DATE=1730000000 make build && make build-deb
1515

1616
FROM scratch AS artifacts
17-
COPY --from=builder /build/target/x86_64-unknown-linux-gnu/reproducible/* /
17+
COPY --from=builder /build/target/x86_64-unknown-linux-gnu/reproducible/ /

0 commit comments

Comments
 (0)