speed up builds

This commit is contained in:
John Smith 2023-06-22 20:18:45 -04:00
parent dfc22aee8e
commit 2b2b3dff77

View File

@ -5,74 +5,38 @@ variables:
GIT_SUBMODULE_STRATEGY: normal GIT_SUBMODULE_STRATEGY: normal
stages: stages:
- build
- test - test
- package
- distribute - distribute
before_script: before_script:
- earthly bootstrap - 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: test_amd64:
stage: test stage: test
needs: image: earthly/earthly:v0.6.30
- job: build_amd64
only: only:
- main - test-caching
- merge_requests
tags: tags:
- linux - linux
- amd64 - amd64
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script: script:
- earthly +unit-tests-linux-amd64 - earthly --ci --remote-cache=veilid/main-branch-cache:cache +unit-tests-linux-amd64
when: manual
package_amd64:
stage: package
needs:
- job: test_amd64
only:
- main
tags:
- linux
- amd64
script:
- earthly +package-linux-amd64
distribute_amd64: distribute_amd64:
stage: distribute stage: distribute
needs: needs:
- job: package_amd64 - job: test_amd64
only: only:
- main - test-caching
tags: tags:
- linux - linux
- amd64 - amd64
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script: script:
- earthly +package-linux-amd64 - earthly --remote-cache=veilid/main-branch-cache:cache +package-linux-amd64
- /home/gitlab-runner/distribute-packages.sh # - /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