Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuang-Minh Nguyen <qmnguyen@gitlab.com>2022-11-16 08:10:33 +0300
committerQuang-Minh Nguyen <qmnguyen@gitlab.com>2022-11-16 17:04:12 +0300
commitebdb0956ed38217e438dd6d33c92a2bdeb4aa776 (patch)
treec83c9b6e02725bcad77d69c331d3af90f8e2c66e
parent678ad8677626f88cb60a11608dd28d4ec29acc0c (diff)
Add caching to test:macos jobqmnguyen0711/add-caching-to-macos-job
Recently, test:macos CI job doesn't have caching mechanim. It has to rebuild everything from scratch before able to run the test suite. After we enable test:macos by default in merge train, this compiling time may become a problem. This commit adds caching to test:macos job. To achieve this, I added architecture env to the cache key of build artifacts. As the frequency of macos job is low, we also don't need a dedicated build job in the build stage.
-rw-r--r--.gitlab-ci.yml17
1 files changed, 11 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3666ade9f..d73dc277b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,14 +5,14 @@ stages:
- qa
default:
- image: registry.gitlab.com/gitlab-org/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}-golang-${GO_VERSION}:git-2.36
+ image: registry.gitlab.com/gitlab-org/gitlab-build-images/${OS_VERSION}-ruby-${RUBY_VERSION}-golang-${GO_VERSION}:git-2.36
tags:
- gitlab-org
variables:
FF_USE_FASTZIP: "true"
FF_NETWORK_PER_BUILD: "true"
- DEBIAN_VERSION: "bullseye"
+ OS_VERSION: "debian-bullseye"
UBI_VERSION: "8.6"
# We use Gitaly's Git version by default.
GIT_VERSION: "default"
@@ -53,7 +53,7 @@ include:
files:
- .gitlab-ci.yml
- Makefile
- prefix: git-${GIT_VERSION}
+ prefix: ${OS_VERSION}-git-${GIT_VERSION}
paths:
- _build/deps
- _build/tools
@@ -65,7 +65,7 @@ include:
files:
- .gitlab-ci.yml
- ruby/Gemfile.lock
- prefix: debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}
+ prefix: ${OS_VERSION}-ruby-${RUBY_VERSION}
paths:
- ${BUNDLE_PATH}
policy: pull
@@ -76,7 +76,7 @@ include:
files:
- .gitlab-ci.yml
- go.sum
- prefix: go-${GO_VERSION}
+ prefix: ${OS_VERSION}-go-${GO_VERSION}
paths:
- ${GOCACHE}
- ${GOMODCACHE}
@@ -318,8 +318,14 @@ test:macos:
- shared-macos-amd64
needs: []
stage: test
+ cache:
+ - <<: *cache_deps_configuration
+ policy: pull-push
+ - <<: *cache_gems_configuration
+ policy: pull-push
variables:
<<: *test_variables
+ OS_VERSION: "macos-12-xcode-14"
PGDATA: /usr/local/var/postgres
PGHOST: localhost
PGUSER: gitlab
@@ -338,7 +344,6 @@ test:macos:
- pg_ctl -D /usr/local/var/postgres start > /tmp/postgres.log
- pg_ctl status
- createdb -U $PGUSER $POSTGRES_DB
- - make -j$(nproc) build prepare-tests
script:
- make test-go
after_script: