Skip to content
Snippets Groups Projects
Commit 310d26da authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

feat: push to eicweb during build, ghcr at end

parent 1f23bd64
No related branches found
No related tags found
1 merge request!807feat: push to eicweb during build, ghcr at end
......@@ -145,7 +145,11 @@ spack env activate --dir ${SPACK_ENV}
spack add juggler@git.${JUGGLER_VERSION}
spack add eicrecon@git.${EICRECON_VERSION}
spack concretize --fresh --force --quiet
make --jobs ${jobs} --keep-going --directory /opt/spack-environment SPACK_ENV=${SPACK_ENV} BUILDCACHE_MIRROR_ONLY_PACKAGE="eics3rw" BUILDCACHE_MIRROR_DEPENDENCIES="eicweb ghcr"
make --jobs ${jobs} --keep-going --directory /opt/spack-environment \
SPACK_ENV=${SPACK_ENV} \
BUILDCACHE_OCI_PROMPT="eicweb" \
BUILDCACHE_OCI_FINAL="ghcr" \
BUILDCACHE_S3_FINAL="eics3rw"
ccache --show-stats
ccache --zero-stats
EOF
......
......@@ -7,8 +7,10 @@ export SPACK_COLOR = always
SPACK_ENV ?= dev
BUILDCACHE_MIRROR_ONLY_PACKAGE :=
BUILDCACHE_MIRROR_DEPENDENCIES :=
BUILDCACHE_S3_PROMPT :=
BUILDCACHE_S3_FINAL :=
BUILDCACHE_OCI_PROMPT :=
BUILDCACHE_OCI_FINAL :=
BUILDCACHE_OCI_BASE_IMAGE := ghcr.io/eic/debian:stable-slim
.PHONY: all clean
......@@ -20,13 +22,15 @@ include $(SPACK_ENV)/spack.mk
endif
$(SPACK_ENV)/push: $(addprefix $(SPACK_ENV)/push/,$($(SPACK_ENV)/SPACK_PACKAGE_IDS))
$(foreach buildcache, $(BUILDCACHE_MIRROR_ONLY_PACKAGE), $(SPACK) buildcache update-index $(buildcache) ;)
$(foreach buildcache, $(BUILDCACHE_MIRROR_DEPENDENCIES), $(SPACK) buildcache update-index $(buildcache) ;)
$(foreach buildcache, $(BUILDCACHE_S3_FINAL), $(SPACK) buildcache push --unsigned $(buildcache) ;)
$(foreach buildcache, $(BUILDCACHE_S3_FINAL), $(SPACK) buildcache update-index $(buildcache) ;)
$(foreach buildcache, $(BUILDCACHE_S3_PROMPT), $(SPACK) buildcache update-index $(buildcache) ;)
$(foreach buildcache, $(BUILDCACHE_OCI_FINAL), $(SPACK) buildcache push --unsigned --base-image $(BUILDCACHE_OCI_BASE_IMAGE) $(buildcache) ;)
$(SPACK_ENV)/push/%: $(SPACK_ENV)/install/%
@mkdir -p $(dir $@)
$(foreach buildcache, $(BUILDCACHE_MIRROR_ONLY_PACKAGE), $(SPACK) buildcache push --only=package --unsigned $(buildcache) /$(HASH) ;) # push $(SPEC)
$(foreach buildcache, $(BUILDCACHE_MIRROR_DEPENDENCIES), $(SPACK) buildcache push --unsigned --base-image $(BUILDCACHE_OCI_BASE_IMAGE) $(buildcache) /$(HASH) | grep -v "Using cached archive" ;) # push $(SPEC)
$(foreach buildcache, $(BUILDCACHE_S3_PROMPT), $(SPACK) buildcache push --unsigned --only=package $(buildcache) /$(HASH) ;) # push $(SPEC)
$(foreach buildcache, $(BUILDCACHE_OCI_PROMPT), $(SPACK) buildcache push --unsigned --base-image $(BUILDCACHE_OCI_BASE_IMAGE) $(buildcache) /$(HASH) | grep -v "Using cached archive" ;) # push $(SPEC)
@touch $@
$(SPACK_ENV)/spack.lock: $(SPACK_ENV)/spack.yaml Makefile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment