From c7e1137985cf13641d3efa692dbe881aabb9a4db Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Fri, 1 Mar 2024 12:21:39 +0100 Subject: [PATCH] Serialize on fetch --- build/Makefile | 8 ++++++++ cloudbuild.yaml | 20 ++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/build/Makefile b/build/Makefile index cd11e8f337..d9adf726a8 100644 --- a/build/Makefile +++ b/build/Makefile @@ -78,6 +78,14 @@ version: # Run all tests test: ensure-build-image test-quilkin test-examples test-docs +# In CI with split jobs that both fetch they will fail if run in parallel since +# cargo will be fighting with itself for some the same host directory that is +# mapped into the container, so instead just split it out to its own job +fetch-quilkin: ensure-build-image + docker run --rm $(common_rust_args) \ + --network=host \ + -e RUST_BACKTRACE=1 --entrypoint=cargo $(BUILD_IMAGE_TAG) fetch + check-quilkin: ensure-build-image docker run --rm $(common_rust_args) \ --entrypoint=cargo $(BUILD_IMAGE_TAG) deny check diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 5b5d931d68..016d4495c9 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -26,34 +26,46 @@ steps: - name: us-docker.pkg.dev/$PROJECT_ID/ci/make-docker dir: ./build args: - - test-quilkin - id: test-quilkin + - fetch-quilkin + id: fetch-quilkin waitFor: - fetch-git-submodules - pull-build-image + - name: us-docker.pkg.dev/$PROJECT_ID/ci/make-docker + dir: ./build + args: + - test-quilkin + id: test-quilkin + waitFor: + - fetch-quilkin - name: us-docker.pkg.dev/$PROJECT_ID/ci/make-docker dir: ./build args: - check-quilkin id: check-quilkin waitFor: - - fetch-git-submodules - - pull-build-image + - fetch-quilkin - name: us-docker.pkg.dev/$PROJECT_ID/ci/make-docker dir: ./build args: - test-examples id: test-examples + waitFor: + - fetch-quilkin - name: us-docker.pkg.dev/$PROJECT_ID/ci/make-docker dir: ./build args: - test-docs id: test-docs + waitFor: + - fetch-quilkin - name: us-docker.pkg.dev/$PROJECT_ID/ci/make-docker dir: ./build args: - build-image id: build + waitFor: + - fetch-quilkin # # Run the built images for 5 seconds in a few standard configurations, to test basic common scenarios