diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 23a81de01..53636563c 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -3,7 +3,7 @@ The release pipeline `Main` (main.yml) and its subroutines defined in the other yamls form a high-level description for the underlying self-hosted build system in `/docker`. In other words, this is a sort of terminal, a "thin-client" with a display and a keyboard for our docker mainframe. We minimize -vendor-lockin and duplication with other frameworks by limiting everything here to only what is +vendor-lockin and duplication with other services by limiting everything here to only what is essential for driving the docker builder. Though we slightly relax the above by specifying details of the actual CI pipeline, the diff --git a/.github/workflows/bake.yml b/.github/workflows/bake.yml index 044086856..73f6b06a4 100644 --- a/.github/workflows/bake.yml +++ b/.github/workflows/bake.yml @@ -121,7 +121,7 @@ jobs: docker/bake.sh "${{matrix.bake_target}}" # Optionally extract an inner artifact - - name: Extract Artifact + - name: Extract Inner Artifact if: > !failure() && !cancelled() && fromJSON(inputs.artifact)[matrix.bake_target].dst @@ -139,7 +139,7 @@ jobs: docker cp "$cid:$src" "_artifact/$dst" # Optionally extract the image itself as an artifact. - - name: Extract Image + - name: Extract Image Artifact if: > !failure() && !cancelled() && fromJSON(inputs.artifact)[matrix.bake_target].dst diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 57579f1a9..811311bf3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,8 @@ jobs: [ {"cargo_profile": "release-debuginfo", "rust_toolchain": "nightly"}, {"cargo_profile": "release-max-perf", "rust_toolchain": "stable"}, - {"cargo_profile": "release-max-perf", "feat_set": "none"} + {"cargo_profile": "release-max-perf", "feat_set": "none"}, + {"cargo_profile": "test", "rust_toolchain": "stable", "feat_set": "none"} ] outputs: @@ -56,12 +57,17 @@ jobs: set -e cat < ./buildkitd.toml [system] - platformsCacheMaxAge = "504h" - + platformsCacheMaxAge = "504h" [worker.oci] - enabled = true - rootless = true - gc = false + enabled = true + rootless = true + gc = true + [[worker.oci.gcpolicy]] + reservedSpace = "384GB" + maxUsedSpace = "768GB" + keepDuration = "504h" + filters = ["label!=cache==pin"] + all = true EOF docker buildx create \ @@ -160,7 +166,7 @@ jobs: !failure() && !cancelled() name: Publish - needs: [init, test, package] + needs: [package, test] uses: ./.github/workflows/publish.yml with: docker_repo: ${{vars.DOCKER_REPO}} diff --git a/docker/Dockerfile.cargo b/docker/Dockerfile.cargo index b11f0482c..38e9511be 100644 --- a/docker/Dockerfile.cargo +++ b/docker/Dockerfile.cargo @@ -7,9 +7,6 @@ ARG RUSTUP_HOME ARG CARGO_HOME ARG CARGO_TARGET ARG CARGO_TARGET_DIR -ARG cargo_tgt_dst -ARG cargo_tgt_sub -ARG cargo_tgt_cache ARG cargo_profile ARG cargo_features ARG cargo_spec_features @@ -27,11 +24,6 @@ RUN \ --mount=type=cache,dst=${RUSTUP_HOME}/downloads,sharing=shared,ro \ --mount=type=cache,dst=${CARGO_HOME}/registry,sharing=shared,ro \ --mount=type=cache,dst=${CARGO_HOME}/git,sharing=shared,ro \ ---mount=type=cache,dst=${CARGO_TARGET_DIR},id=${cargo_tgt_dst},sharing=locked \ ---mount=type=cache,dst=${CARGO_TARGET_DIR}/${cargo_tgt_sub}/deps,id=${cargo_tgt_cache}/deps,sharing=locked \ ---mount=type=cache,dst=${CARGO_TARGET_DIR}/${cargo_tgt_sub}/build,id=${cargo_tgt_cache}/build,sharing=locked \ ---mount=type=cache,dst=${CARGO_TARGET_DIR}/${cargo_tgt_sub}/incremental,id=${cargo_tgt_cache}/incremental,sharing=locked \ ---mount=type=cache,dst=${CARGO_TARGET_DIR}/${cargo_tgt_sub}/.fingerprint,id=${cargo_tgt_cache}/fingerprint,sharing=locked \ <