From 2b2b3dff77a255cf78e4f262a608e9b8628a3557 Mon Sep 17 00:00:00 2001 From: John Smith Date: Thu, 22 Jun 2023 20:18:45 -0400 Subject: [PATCH] speed up builds --- .gitlab-ci.yml | 62 +++++++++++--------------------------------------- 1 file changed, 13 insertions(+), 49 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 436a9c56..9523d93e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,74 +5,38 @@ variables: GIT_SUBMODULE_STRATEGY: normal stages: - - build - test - - package - distribute before_script: - earthly bootstrap -build_amd64: - stage: build - only: - - main - - merge_requests - image: earthly/earthly:v0.6.30 - tags: - - linux - - amd64 - script: - - earthly +build-linux-amd64 - when: manual - test_amd64: stage: test - needs: - - job: build_amd64 + image: earthly/earthly:v0.6.30 only: - - main + - test-caching + - merge_requests tags: - linux - amd64 + before_script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY script: - - earthly +unit-tests-linux-amd64 - -package_amd64: - stage: package - needs: - - job: test_amd64 - only: - - main - tags: - - linux - - amd64 - script: - - earthly +package-linux-amd64 - + - earthly --ci --remote-cache=veilid/main-branch-cache:cache +unit-tests-linux-amd64 + when: manual distribute_amd64: stage: distribute needs: - - job: package_amd64 + - job: test_amd64 only: - - main + - test-caching tags: - linux - amd64 + before_script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY script: - - earthly +package-linux-amd64 - - /home/gitlab-runner/distribute-packages.sh - - -#earthly-arm64: -# stage: linux-arm64 -# only: -# - main -# - merge_requests -# image: earthly/earthly:v0.6.30 -# tags: -# - linux -# - amd64 -# script: -# - earthly --ci -P +package-linux-arm64 + - earthly --remote-cache=veilid/main-branch-cache:cache +package-linux-amd64 + # - /home/gitlab-runner/distribute-packages.sh