git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Lars Schneider" <larsxschneider@gmail.com>,
	"Jonathan Nieder" <jrnieder@gmail.com>,
	git@vger.kernel.org, "SZEDER Gábor" <szeder.dev@gmail.com>
Subject: [PATCHv2 2/3] travis-ci: create the cache directory early in the build process
Date: Sun, 31 Dec 2017 11:12:04 +0100	[thread overview]
Message-ID: <20171231101205.7466-3-szeder.dev@gmail.com> (raw)
In-Reply-To: <20171231101205.7466-1-szeder.dev@gmail.com>

It seems that Travis CI creates the cache directory for us anyway,
even when a previous cache doesn't exist for the current build job.
Alas, this behavior is not explicitly documented, therefore we don't
rely on it and create the cache directory ourselves in those build
jobs that read/write cached data (currently only the prove state).

In the following commit we'll start to cache additional data in every
build job, and will access the cache much earlier in the build
process.

Therefore move creating the cache directory to 'ci/lib-travisci.sh' to
make sure that it exists at the very beginning of every build job.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---
 ci/lib-travisci.sh | 2 ++
 ci/run-tests.sh    | 1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/ci/lib-travisci.sh b/ci/lib-travisci.sh
index 9d379db8a..197aa14c1 100755
--- a/ci/lib-travisci.sh
+++ b/ci/lib-travisci.sh
@@ -27,6 +27,8 @@ skip_branch_tip_with_tag () {
 # and installing dependencies.
 set -ex
 
+mkdir -p "$HOME/travis-cache"
+
 skip_branch_tip_with_tag
 
 if test -z "$jobname"
diff --git a/ci/run-tests.sh b/ci/run-tests.sh
index f0c743de9..ccdfc2b9d 100755
--- a/ci/run-tests.sh
+++ b/ci/run-tests.sh
@@ -5,6 +5,5 @@
 
 . ${0%/*}/lib-travisci.sh
 
-mkdir -p $HOME/travis-cache
 ln -s $HOME/travis-cache/.prove t/.prove
 make --quiet test
-- 
2.16.0.rc0.67.g3a46dbca7


  parent reply	other threads:[~2017-12-31 10:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-27 16:49 [PATCH 0/2] Travis CI: skip commits with successfully built and tested trees SZEDER Gábor
2017-12-27 16:49 ` [PATCH 1/2] travis-ci: don't try to create the cache directory unnecessarily SZEDER Gábor
2017-12-27 19:46   ` Jonathan Nieder
2017-12-28 11:04     ` SZEDER Gábor
2017-12-28 18:13       ` Jonathan Nieder
2017-12-27 16:49 ` [PATCH 2/2] travis-ci: record and skip successfully built trees SZEDER Gábor
2017-12-27 19:15   ` Lars Schneider
2017-12-27 23:00     ` SZEDER Gábor
2017-12-27 23:24       ` SZEDER Gábor
2017-12-28 11:16       ` Lars Schneider
2017-12-29 20:03         ` SZEDER Gábor
2017-12-29 20:16           ` SZEDER Gábor
2017-12-30 19:17             ` Lars Schneider
2017-12-27 19:35   ` Lars Schneider
2017-12-28 10:31     ` SZEDER Gábor
2017-12-28 11:12       ` Lars Schneider
2017-12-28 19:01       ` Junio C Hamano
2017-12-31 10:12 ` [PATCHv2 0/3] Travis CI: skip commits with successfully built and tested trees SZEDER Gábor
2017-12-31 10:12   ` [PATCHv2 1/3] travis-ci: print the "tip of branch is exactly at tag" message in color SZEDER Gábor
2017-12-31 10:12   ` SZEDER Gábor [this message]
2017-12-31 10:12   ` [PATCHv2 3/3] travis-ci: record and skip successfully built trees SZEDER Gábor
2017-12-31 11:27   ` [PATCHv2 0/3] Travis CI: skip commits with successfully built and tested trees Lars Schneider

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171231101205.7466-3-szeder.dev@gmail.com \
    --to=szeder.dev@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=larsxschneider@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).