diff --git a/containers/jug/dev.Dockerfile b/containers/jug/dev.Dockerfile index 6a50ef9da3302e462df5f64a38788f73b475fbdd..e234e4a6ba4ff58ef571ce19b21b7c0f451c6edc 100644 --- a/containers/jug/dev.Dockerfile +++ b/containers/jug/dev.Dockerfile @@ -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 diff --git a/spack-environment/Makefile b/spack-environment/Makefile index 708b95293f709db2b639fadb9da364fa99ebe3d8..6195ba40d0e107394e9d0bd12424f3527b7d033d 100644 --- a/spack-environment/Makefile +++ b/spack-environment/Makefile @@ -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