-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Images: * Fix building OpenSSL * Install CMake, Git and ccache from distribution - ccache is from epel, and needs to be installed after it * Document EL8 migration * fix pushing images by getting the labels right * use multiple targets rather than env vars in makefile CI: * enable multi-arch docker * don’t truncate docker logs * parallelize GHA CI * drop schedule * merge edge & pr jobs * upload artifacts rather than publish to ghcr --------- Co-authored-by: Hongli Lai <[email protected]>
- Loading branch information
1 parent
05f458d
commit 6de0615
Showing
5 changed files
with
153 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,69 @@ | ||
VERSION = 3.0.7 | ||
VERSION = 4.0.0 | ||
ifneq ($VERSION, edge) | ||
MAJOR_VERSION := $(shell awk -v OFS=. -F. '{print $$1,$$2}' <<< $(VERSION)) | ||
endif | ||
ifeq ($(GITHUB_ACTIONS),true) | ||
IMG_REPO = ghcr.io | ||
else | ||
IMG_REPO = docker.io | ||
endif | ||
OWNER = phusion | ||
DISABLE_OPTIMIZATIONS = 0 | ||
IMAGE = $(OWNER)/holy-build-box | ||
IMAGE = $(IMG_REPO)/$(OWNER)/holy-build-box | ||
|
||
.PHONY: build_amd64 test_amd64 tags_amd64 push_amd64 build_arm64 test_arm64 tags_arm64 push_arm64 export_amd64 export_arm64 release | ||
|
||
.PHONY: build test tags push release | ||
build_amd64: | ||
docker buildx build --load --platform "linux/amd64" --rm -t $(IMAGE):$(VERSION)-amd64 --pull --build-arg DISABLE_OPTIMIZATIONS=$(DISABLE_OPTIMIZATIONS) . | ||
|
||
build: | ||
docker buildx build --platform "linux/amd64" --rm -t $(IMAGE)-amd64:$(VERSION) -f Dockerfile --pull --build-arg DISABLE_OPTIMIZATIONS=$(DISABLE_OPTIMIZATIONS) . | ||
docker buildx build --platform "linux/arm64" --rm -t $(IMAGE)-arm64:$(VERSION) -f Dockerfile --pull --build-arg DISABLE_OPTIMIZATIONS=$(DISABLE_OPTIMIZATIONS) . | ||
build_arm64: | ||
docker buildx build --load --platform "linux/arm64" --rm -t $(IMAGE):$(VERSION)-arm64 --pull --build-arg DISABLE_OPTIMIZATIONS=$(DISABLE_OPTIMIZATIONS) . | ||
|
||
test: | ||
test_amd64: | ||
docker run -it --platform "linux/amd64" --rm -e SKIP_FINALIZE=1 -e DISABLE_OPTIMIZATIONS=1 -v $$(pwd)/image:/hbb_build:ro rockylinux:8 bash /hbb_build/build.sh | ||
|
||
test_arm64: | ||
docker run -it --platform "linux/arm64" --rm -e SKIP_FINALIZE=1 -e DISABLE_OPTIMIZATIONS=1 -v $$(pwd)/image:/hbb_build:ro rockylinux:8 bash /hbb_build/build.sh | ||
|
||
tags: | ||
tags_amd64: | ||
ifdef MAJOR_VERSION | ||
docker tag $(IMAGE):$(VERSION)-arm64 $(IMAGE):$(MAJOR_VERSION)-arm64 | ||
docker tag $(IMAGE):$(VERSION)-amd64 $(IMAGE):$(MAJOR_VERSION)-amd64 | ||
docker tag $(IMAGE):$(VERSION)-arm64 $(IMAGE):latest-arm64 | ||
docker tag $(IMAGE):$(VERSION)-amd64 $(IMAGE):latest-amd64 | ||
endif | ||
|
||
push: tags | ||
tags_arm64: | ||
ifdef MAJOR_VERSION | ||
docker tag $(IMAGE):$(VERSION)-arm64 $(IMAGE):$(MAJOR_VERSION)-arm64 | ||
docker tag $(IMAGE):$(VERSION)-arm64 $(IMAGE):latest-arm64 | ||
endif | ||
|
||
push_amd64: tags_amd64 | ||
docker push $(IMAGE):$(VERSION)-amd64 | ||
docker push $(IMAGE):$(VERSION)-arm64 | ||
ifdef MAJOR_VERSION | ||
docker push $(IMAGE):$(MAJOR_VERSION)-amd64 | ||
docker push $(IMAGE):$(MAJOR_VERSION)-arm64 | ||
docker push $(IMAGE):latest-amd64 | ||
endif | ||
|
||
push_arm64: tags_arm64 | ||
docker push $(IMAGE):$(VERSION)-arm64 | ||
ifdef MAJOR_VERSION | ||
docker push $(IMAGE):$(MAJOR_VERSION)-arm64 | ||
docker push $(IMAGE):latest-arm64 | ||
endif | ||
|
||
release: push | ||
export_amd64: tags_amd64 | ||
docker save -o hbb_amd64.tar $(IMAGE):$(VERSION)-amd64 | ||
|
||
export_arm64: tags_arm64 | ||
docker save -o hbb_arm64.tar $(IMAGE):$(VERSION)-arm64 | ||
|
||
release: push_amd64 push_arm64 | ||
docker manifest create $(IMAGE):$(VERSION) $(IMAGE):$(VERSION)-amd64 $(IMAGE):$(VERSION)-arm64 | ||
docker manifest push $(IMAGE):$(VERSION) | ||
ifdef MAJOR_VERSION | ||
docker manifest create $(IMAGE):$(MAJOR_VERSION) $(IMAGE):$(MAJOR_VERSION)-amd64 $(IMAGE):$(MAJOR_VERSION)-arm64 | ||
docker manifest create $(IMAGE):latest $(IMAGE):latest-amd64 $(IMAGE):latest-arm64 | ||
docker manifest push $(IMAGE):$(MAJOR_VERSION) | ||
endif | ||
docker manifest push $(IMAGE):$(VERSION) | ||
docker manifest push $(IMAGE):latest | ||
@echo "*** Don't forget to create a tag. git tag rel-$(VERSION) && git push origin rel-$(VERSION)" | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.