Add Travis CI support
v3 cover Add Travis CI support
From: Lars Schneider <[email protected]>
diff to v2:
* fix commit message to express what systems the Travis CI's infrastructure "currently" uses (thanks Dscho)
* use case instead if syntax for OS detection (thanks Dscho)
* remove unnessary DARWIN flag (thanks Junio)
* use flag case_insensitive_fs to disable t9819-git-p4-case-folding based on the currently used filesytem (thanks Junio)
* replace stats call in t9815-git-p4-submit-fail with ls to improve portability (thanks Junio, Torsten, and Pete)
* use Travis lifecycle properly to make output foldable in Travis (see little triangle on the left of the output on the Travis website)
* set git test option "--quite" and run make with option "--quite" to reduce log output noise
Thanks,
Lars
Lars Schneider (3):
Add Travis CI support
git-p4: Improve test case portability for t9815 git-p4-submit-fail
git-p4: Skip t9819 test case on case insensitive file systems
.travis.yml | 46 ++++++++++++++++++++++++++++++++++++++++++ t/t9815-git-p4-submit-fail.sh | 7 ++----- t/t9819-git-p4-case-folding.sh | 6 ++++++ 3 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 .travis.yml
--
2.5.1
PATCH v3 1/3 Add Travis CI support
From: Lars Schneider <[email protected]>
The tests are currently executed on "Ubuntu 12.04 LTS Server Edition 64 bit" and on "OS X Mavericks" using gcc and clang.
Perforce and Git-LFS are installed and therefore available for the respective tests.
--- .travis.yml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .travis.yml
.travis.yml new file +46 -0
@@ -0,0 +1,46 @@ +language: c + +os: + - linux + - osx + +compiler: + - clang + - gcc + +before_install: + - > + export GIT_TEST_OPTS=" --quiet"; + case "${TRAVIS_OS_NAME:-linux}" in + linux) + wget -q https://package.perforce.com/perforce.pubkey -O - \ + | sudo apt-key add - + echo 'deb http://package.perforce.com/apt/ubuntu precise release' \ + | sudo tee -a /etc/apt/sources.list + wget -q https://packagecloud.io/gpg.key -O - | sudo apt-key add - + echo 'deb https://packagecloud.io/github/git-lfs/debian/ jessie main' \ + | sudo tee -a /etc/apt/sources.list + sudo apt-get update -qq + sudo apt-get install -y apt-transport-https + sudo apt-get install perforce-server git-lfs + ;; + osx) + brew_force_set_latest_binary_hash () { + FORUMULA=$1 + SHA=$(brew fetch --force $FORUMULA 2>&1 | grep ^SHA256: | cut -d ' ' -f 2) + sed -E -i.bak "s/sha256 \"[0-9a-f]{64}\"/sha256 \"$SHA\"/g" \ + /usr/local/Library/Taps/homebrew/homebrew-binary/$FORUMULA.rb + } + brew update + brew tap homebrew/binary + brew_force_set_latest_binary_hash perforce + brew_force_set_latest_binary_hash perforce-server + brew install git-lfs perforce-server perforce + ;; + esac + +install: make configure && ./configure + +before_script: make + +script: make --quiet test
Signature · 1 line
2.5.1
.travis.yml line 25
Quoted 3 lines · On 10/11/2015 19:55, [email protected] wrote:
.travis.yml new file +3
-0+ sudo apt-get update -qq + sudo apt-get install -y apt-transport-https + sudo apt-get install perforce-server git-lfs
Why no "-y" also in this line, or append these to the previous line?
Or maybe even better, like [1] does, also use "--qq" (which implies "-y") for "apt-get install"?
.travis.yml line 46
Quoted 5 lines
.travis.yml new file +5
-0+install: make configure && ./configure + +before_script: make + +script: make --quiet test
Semantically, it does not seem correct to me that configuarion goes to the install step. As "make test" will build git anyway, I'd instead propose to get rid of "install" and just say:
before_script: make configure && ./configure
script: make --quiet test
[1] https://github.com/git/git/pull/154/files
Regards,
Sebastian
Quoted 9 lines · Sebastian Schuberth
.travis.yml line 25
Quoted 3 lines · On 10/11/2015 19:55, [email protected] wrote:
.travis.yml new file +3
-0+ sudo apt-get update -qq + sudo apt-get install -y apt-transport-https + sudo apt-get install perforce-server git-lfsWhy no "-y" also in this line, or append these to the previous line?
Or maybe even better, like [1] does, also use "--qq" (which implies "-y") for "apt-get install"?
Agreed!
Quoted 9 lines
.travis.yml line 46
Quoted 6 lines
.travis.yml new file +5
-0+install: make configure && ./configure + +before_script: make + +script: make --quiet testSemantically, it does not seem correct to me that configuarion goes to the install step. As "make test" will build git anyway, I'd instead propose to get rid of "install" and just say:
Quoted 3 lines
before_script: make configure && ./configurescript: make --quiet test
I understand your point. I did this to make the "make" logs easily accessible (no option "--quite"). By default Travis CI automatically collapses the logs from all stages prior to the "script" stage. You can uncollapse these logs by clicking on the little triangle on the left border of the log. Therefore the "make" logs are available without noise.
Do you see value in "make" logs?
If yes then we could also do:before_script: make configure && ./configure && make
If no then I will take your suggestion.
Thanks,
Lars
Quoted 7 lines · Sebastian Schuberth
Semantically, it does not seem correct to me that configuarion goes to the install step. As "make test" will build git anyway, I'd instead propose to get rid of "install" and just say:
before_script: make configure && ./configurescript: make --quiet test
Very good point. Do we even need to do anything in the "install" target? We aim to be able to testable without any installed Git, and not running "make install" at all, ever, would be one way to make sure that works.
This is a slightly related tangent, but we saw a few build issues reported recently on customized configurations like NO_PTHREAD. If we are to start using automated tests, I wonder if we want to build (and optionally test) with various combinations of the customization options (e.g. NO_CURL, NO_OPENSSL, NO_MMAP, NO_IPV6, NO_PERL etc.)
Thanks.
Quoted 35 lines · On Sun, Oct 11, 2015 at 1:55 PM, <[email protected]> wrote:
From: Lars Schneider <[email protected]>
The tests are currently executed on "Ubuntu 12.04 LTS Server Edition 64 bit" and on "OS X Mavericks" using gcc and clang.
Perforce and Git-LFS are installed and therefore available for the respective tests.
Signed-off-by Lars Schneider <[email protected]>---
.travis.yml new file +19
-0@@ -0,0 +1,46 @@ +language: c + +os: + - linux + - osx + +compiler: + - clang + - gcc + +before_install: + - > + export GIT_TEST_OPTS=" --quiet"; + case "${TRAVIS_OS_NAME:-linux}" in + linux) + wget -q https://package.perforce.com/perforce.pubkey -O - \ + | sudo apt-key add - + echo 'deb http://package.perforce.com/apt/ubuntu precise release' \ + | sudo tee -a /etc/apt/sources.list
.travis.yml line 29
Quoted 10 lines
.travis.yml new file +10
-0+ wget -q https://packagecloud.io/gpg.key -O - | sudo apt-key add - + echo 'deb https://packagecloud.io/github/git-lfs/debian/ jessie main' \ + | sudo tee -a /etc/apt/sources.list + sudo apt-get update -qq + sudo apt-get install -y apt-transport-https + sudo apt-get install perforce-server git-lfs + ;; + osx) + brew_force_set_latest_binary_hash () { + FORUMULA=$1
Is this spelling intentional or is it a misspelling of "formula"?
Quoted 19 lines
.travis.yml new file +17
-1+ SHA=$(brew fetch --force $FORUMULA 2>&1 | grep ^SHA256: | cut -d ' ' -f 2) + sed -E -i.bak "s/sha256 \"[0-9a-f]{64}\"/sha256 \"$SHA\"/g" \ + /usr/local/Library/Taps/homebrew/homebrew-binary/$FORUMULA.rb + } + brew update + brew tap homebrew/binary + brew_force_set_latest_binary_hash perforce + brew_force_set_latest_binary_hash perforce-server + brew install git-lfs perforce-server perforce + ;; + esac + +install: make configure && ./configure + +before_script: make + +script: make --quiet test --2.5.1
Quoted 5 lines
.travis.yml line 29
Quoted 3 lines
.travis.yml new file +2
-0+ brew_force_set_latest_binary_hash () { + FORUMULA=$1Is this spelling intentional or is it a misspelling of "formula"?
This is a misspelling. I will fix it.
Thanks,
Lars
PATCH v3 2/3 git-p4: Improve test case portability for t9815 git-p4-submit-fail
In reply to [email protected]From: Lars Schneider <[email protected]>
Replace the stats command with the ls command to check file mode bits. The stats command is not available on Windows and has different command line options on OS X.
--- t/t9815-git-p4-submit-fail.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
t/t9815-git-p4-submit-fail.sh +2 -5
@@ -417,11 +417,8 @@ test_expect_success 'cleanup chmod after submit cancel' ' ! p4 fstat -T action text && test_path_is_file text+x && ! p4 fstat -T action text+x && - if test_have_prereq !CYGWIN - then - stat --format=%A text | egrep ^-r-- && - stat --format=%A text+x | egrep ^-r-x - fi + ls -l text | egrep ^-r-- && + ls -l text+x | egrep ^-r-x ) '
Signature · 1 line
2.5.1
PATCH v3 3/3 git-p4: Skip t9819 test case on case insensitive file systems
In reply to [email protected]From: Lars Schneider <[email protected]>
Windows and OS X file systems are case insensitive by default. Consequently the "git-p4-case-folding" test case does not apply to them.
--- t/t9819-git-p4-case-folding.sh | 6 ++++++ 1 file changed, 6 insertions(+)
t/t9819-git-p4-case-folding.sh +6 -0
@@ -4,6 +4,12 @@ test_description='interaction with P4 case-folding' . ./lib-git-p4.sh +if test_have_prereq CASE_INSENSITIVE_FS +then + skip_all='skipping P4 case-folding tests; case insensitive file system detected' + test_done +fi + test_expect_success 'start p4d with case folding enabled' ' start_p4d -C1 '
Signature · 1 line
2.5.1
Re: [PATCH v3 3/3] git-p4: Skip t9819 test case on case insensitive file systems
Looks good to me, Ack.
Quoted 35 lines · On 11 October 2015 at 18:55, <[email protected]> wrote:
From: Lars Schneider <[email protected]>
Windows and OS X file systems are case insensitive by default. Consequently the "git-p4-case-folding" test case does not apply to them.
Signed-off-by Lars Schneider <[email protected]>--- t/t9819-git-p4-case-folding.sh | 6 ++++++ 1 file changed, 6 insertions(+)t/t9819-git-p4-case-folding.sh +6
-1@@ -4,6 +4,12 @@ test_description='interaction with P4 case-folding' . ./lib-git-p4.sh +if test_have_prereq CASE_INSENSITIVE_FS +then + skip_all='skipping P4 case-folding tests; case insensitive file system detected' + test_done +fi + test_expect_success 'start p4d with case folding enabled' ' start_p4d -C1 ' --2.5.1
--
To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · [email protected] writes:
Lars Schneider (3):
Add Travis CI support
git-p4: Improve test case portability for t9815 git-p4-submit-fail
git-p4: Skip t9819 test case on case insensitive file systems
Can you split this into two separate series?
It seems Luke is happy with the p4 bits and I think it makes sense to have it as a separate series and apply sooner, while those who are interested in and well versed in Travis to help polishing the first one.
Thanks.
Quoted 4 lines · [email protected] writes:
Lars Schneider (3):
Add Travis CI support
git-p4: Improve test case portability for t9815 git-p4-submit-fail
git-p4: Skip t9819 test case on case insensitive file systems
Can you make this two separate series? It seems Luke is happy with the p4 bits and I think it makes sense to have it as a separate series and apply sooner, while those who are interested in and well versed in Travis to help polishing the first one.
Quoted 8 lines · Lars Schneider
Quoted 8 lines
.travis.yml line 46
Quoted 5 lines
.travis.yml new file +5
-0+install: make configure && ./configure + +before_script: make + +script: make --quiet testSemantically, it does not seem correct to me that configuarion goes to the install step. As "make test" will build git anyway, I'd instead propose to get rid of "install" and just say:
Quoted 5 lines
Quoted 3 lines
before_script: make configure && ./configurescript: make --quiet test
I understand your point. I did this to make the "make" logs easily accessible (no option "--quite"). By default Travis CI automatically collapses the logs from all stages prior to the "script" stage. You can uncollapse these logs by clicking on the little triangle on the left border of the log. Therefore the "make" logs are available without noise.
To make this more clear, I guess what you're referring to is the visual difference between [1] and [2], correct?
Quoted 4 lines
Do you see value in "make" logs?
If yes then we could also do:
before_script: make configure && ./configure && make
Reading through Travis' docs [3] again, "before_script" is documented to "return a non-zero exit code, the build is errored and stops immediately", while "script" is documented as "returns a non-zero exit code, the build is failed, but continues to run before being marked as failed". As it does not make much sense to continue the build or even start testing if the build failed, maybe it's indeed best to do:
before_script: make configure && ./configure && make
script: make --quiet test
[1] https://travis-ci.org/larsxschneider/git/jobs/84805733
[2] https://travis-ci.org/larsxschneider/git/jobs/84955658
[3] http://docs.travis-ci.com/user/customizing-the-build/
Signature · 1 line
Sebastian Schuberth
Quoted 11 lines · Sebastian Schuberth
Quoted 8 lines · Lars Schneider
Quoted 8 lines
.travis.yml line 46
Quoted 5 lines
.travis.yml new file +5
-0+install: make configure && ./configure + +before_script: make + +script: make --quiet testSemantically, it does not seem correct to me that configuarion goes to the install step. As "make test" will build git anyway, I'd instead propose to get rid of "install" and just say:
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
before_script: make configure && ./configurescript: make --quiet test
I understand your point. I did this to make the "make" logs easily accessible (no option "--quite"). By default Travis CI automatically collapses the logs from all stages prior to the "script" stage. You can uncollapse these logs by clicking on the little triangle on the left border of the log. Therefore the "make" logs are available without noise.
To make this more clear, I guess what you're referring to is the visual difference between [1] and [2], correct?
correct!
Quoted 13 lines
Quoted 5 lines
Do you see value in "make" logs?
If yes then we could also do:
before_script: make configure && ./configure && makeReading through Travis' docs [3] again, "
before_script" is documented to "return a non-zero exit code, the build is errored and stops immediately", while "script" is documented as "returns a non-zero exit code, the build is failed, but continues to run before being marked as failed". As it does not make much sense to continue the build or even start testing if the build failed, maybe it's indeed best to do:
Quoted 3 lines
before_script: make configure && ./configure && makescript: make --quiet test
Ok, then I will make it so :-)
Thanks,
Lars
Quoted 7 lines · Lars Schneider
Quoted 7 lines
Reading through Travis' docs [3] again, "
before_script" is documented to "return a non-zero exit code, the build is errored and stops immediately", while "script" is documented as "returns a non-zero exit code, the build is failed, but continues to run before being marked as failed". As it does not make much sense to continue the build or even start testing if the build failed, maybe it's indeed best to do:
Quoted 5 lines
Quoted 3 lines
before_script: make configure && ./configure && makescript: make --quiet test
Ok, then I will make it so :-)
Also, this has the added benefit of being quickly able to see how much time building vs testing took. As these two are the big blocks, we'd want to optimize both steps for time, and it's easier to see what we gain e.g. from a possible build-time improvement if these steps are listed individually in the Travis log.
Signature · 1 line
Sebastian Schuberth
Quoted 6 lines · Junio C Hamano
Quoted 4 lines · Sebastian Schuberth
Semantically, it does not seem correct to me that configuarion goes to the install step. As "make test" will build git anyway, I'd instead propose to get rid of "install" and just say:
Quoted 8 lines
Quoted 3 lines
before_script: make configure && ./configurescript: make --quiet test
Very good point. Do we even need to do anything in the "install" target? We aim to be able to testable without any installed Git, and not running "make install" at all, ever, would be one way to make sure that works.
The Travis CI "install" stage is independent of "make install". AFAIK you can use the Travis lifecycle stages pretty much as you want. However, I agree we should not use the "install" stage to avoid confusion.
Quoted 5 lines
This is a slightly related tangent, but we saw a few build issues reported recently on customized configurations like
NO_PTHREAD. If we are to start using automated tests, I wonder if we want to build (and optionally test) with various combinations of the customization options (e.g.NO_CURL,NO_OPENSSL,NO_MMAP,NO_IPV6,NO_PERLetc.)
This easy to do. However, the more we environment settings we define the longer the build runs. I created a test matrix that runs the following combinations:
{Linux | OSX} * {gcc | clang} * {Default, NO_PTHREAD, NO_CURL, NO_OPENSSL, NO_MMAP, NO_IPV6, NO_PERL}
These result in 28 (= 2*2*7) combinations. I created a build without the "Default" environment (=24 combination) here:
https://travis-ci.org/larsxschneider/git/builds/84978673
Should I add them them to the Travis CI patch?
Thanks,
Lars
Quoted 5 lines · Lars Schneider
Quoted 5 lines
This is a slightly related tangent, but we saw a few build issues reported recently on customized configurations like
NO_PTHREAD. If we are to start using automated tests, I wonder if we want to build (and optionally test) with various combinations of the customization options (e.g.NO_CURL,NO_OPENSSL,NO_MMAP,NO_IPV6,NO_PERLetc.)
Quoted 7 lines
This easy to do. However, the more we environment settings we define the longer the build runs. I created a test matrix that runs the following combinations:
{Linux | OSX} * {gcc | clang} * {Default,NO_PTHREAD,NO_CURL,NO_OPENSSL,NO_MMAP,NO_IPV6,NO_PERL}These result in 28 (= 2*2*7) combinations. I created a build without the "Default" environment (=24 combination) here:
https://travis-ci.org/larsxschneider/git/builds/84978673Should I add them them to the Travis CI patch?
I'd say it depends on how long such a matrix build would take in average. Personally, I'd prefer to not wait more than, say, 30 minutes for testing a PR. From your Travis build history it looks to me as if we already exceed that limit many fold, so I'd prefer to not use matrix builds unless we find ways to speed up the build in general, for example by using ccache [1].
[1] http://docs.travis-ci.com/user/caching/#ccache-cache
Signature · 1 line
Sebastian Schuberth
Quoted 1 line · Lars Schneider
{Linux | OSX} * {gcc | clang} * {Default,
NO_PTHREAD,NO_CURL,NO_OPENSSL,NO_MMAP,NO_IPV6,NO_PERL}
Another option would be to have a single "NO_*" build, that would activate all NO_PTHREAD, NO_CURL, NO_OPENSSL, NO_MMAP, NO_IPV6, NO_PERL at the same time. We'd miss issues with perl but no pthread or so, but this should catch most issues.
Signature · 2 lines
Matthieu Moy http://www-verimag.imag.fr/~moy/
Quoted 4 lines · Junio C Hamano
Quoted 4 lines
Semantically, it does not seem correct to me that configuarion goes to the install step. As "make test" will build git anyway, I'd instead propose to get rid of "install" and just say:
Quoted 8 lines
Quoted 3 lines
before_script: make configure && ./configurescript: make --quiet test
Very good point. Do we even need to do anything in the "install" target? We aim to be able to testable without any installed Git, and not running "make install" at all, ever, would be one way to make sure that works.
Note that Travis' "install" step is about installing dependencies for the application to build [1], not for installing the built application (i.e. what "make install" does). In any case, I still think configuring the application to built in this step is wrong.
Quoted 3 lines
we are to start using automated tests, I wonder if we want to build (and optionally test) with various combinations of the customization options (e.g.
NO_CURL,NO_OPENSSL,NO_MMAP,NO_IPV6,NO_PERLetc.)
I like that idea, but I think we should save that for a future improvement to .travis.yml.
[1] http://docs.travis-ci.com/user/installing-dependencies/
Signature · 1 line
Sebastian Schuberth
Quoted 18 lines · [email protected] writes:
.travis.yml new file +15
-0@@ -0,0 +1,46 @@ +language: c + +os: + - linux + - osx + +compiler: + - clang + - gcc + +before_install: + - > + export GIT_TEST_OPTS=" --quiet"; + case "${TRAVIS_OS_NAME:-linux}" in + linux)
.travis.yml line 25
Quoted 10 lines
.travis.yml new file +10
-0+ wget -q https://package.perforce.com/perforce.pubkey -O - \ + | sudo apt-key add - + echo 'deb http://package.perforce.com/apt/ubuntu precise release' \ + | sudo tee -a /etc/apt/sources.list + wget -q https://packagecloud.io/gpg.key -O - | sudo apt-key add - + echo 'deb https://packagecloud.io/github/git-lfs/debian/ jessie main' \ + | sudo tee -a /etc/apt/sources.list + sudo apt-get update -qq + sudo apt-get install -y apt-transport-https + sudo apt-get install perforce-server git-lfs
Sorry if this has been discussed already, but do you really need these "sudo" calls?
They trigger builds on the legacy Travis CI infrastructure:
No big deal, but getting rid of sudo would be cool, and documenting why it can't easily be done in commit message and/or comments would be nice otherwise.
Thanks for working on that!
Signature · 2 lines
Matthieu Moy http://www-verimag.imag.fr/~moy/
.travis.yml line 46
Quoted 4 lines · Le 11/10/2015 19:55, [email protected] a écrit :
.travis.yml new file +4
-0+ +before_script: make + +script: make --quiet test
Travis can be used in container mode but that would need getting rid of "sudo" command and only installing from white-listed sources
(https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json)
Anyway, even within the present VM mode, 1.5 cores are available, so it makes sense to add "-j2" to every make commands.
Quoted 34 lines · Matthieu Moy
Quoted 18 lines · [email protected] writes:
.travis.yml new file +15
-0@@ -0,0 +1,46 @@ +language: c + +os: + - linux + - osx + +compiler: + - clang + - gcc + +before_install: + - > + export GIT_TEST_OPTS=" --quiet"; + case "${TRAVIS_OS_NAME:-linux}" in + linux).travis.yml line 25
Quoted 10 lines
.travis.yml new file +10
-0+ wget -q https://package.perforce.com/perforce.pubkey -O - \ + | sudo apt-key add - + echo 'deb http://package.perforce.com/apt/ubuntu precise release' \ + | sudo tee -a /etc/apt/sources.list + wget -q https://packagecloud.io/gpg.key -O - | sudo apt-key add - + echo 'deb https://packagecloud.io/github/git-lfs/debian/ jessie main' \ + | sudo tee -a /etc/apt/sources.list + sudo apt-get update -qq + sudo apt-get install -y apt-transport-https + sudo apt-get install perforce-server git-lfsSorry if this has been discussed already, but do you really need these "sudo" calls?
Quoted 7 lines
They trigger builds on the legacy Travis CI infrastructure:
No big deal, but getting rid of sudo would be cool, and documenting why it can't easily be done in commit message and/or comments would be nice otherwise.
I would like to get rid of the "sudo" calls, too. Unfortunately I wasn't able to achieve this so far because these packages are not white listed on Travis CI (see Jean-Noël answer in this thread). I tried to download and install the *.deb files manually using dpkg without luck. Any idea or hint? Nevertheless I don't think this is a problem as Travis CI states that "sudo isn't possible (__right now__)" on the new infrastructure. They need to find a solutions because I believe many projects will run into this issue...
http://docs.travis-ci.com/user/migrating-from-legacy/?utm_source=legacy-notice&utm_medium=banner&utm_campaign=legacy-upgrade#Using-sudo-isn%E2%80%99t-possible-(right-now)
- Lars
Quoted 39 lines · Lars Schneider
Quoted 37 lines · Matthieu Moy
Quoted 18 lines · [email protected] writes:
.travis.yml new file +15
-0@@ -0,0 +1,46 @@ +language: c + +os: + - linux + - osx + +compiler: + - clang + - gcc + +before_install: + - > + export GIT_TEST_OPTS=" --quiet"; + case "${TRAVIS_OS_NAME:-linux}" in + linux).travis.yml line 25
Quoted 10 lines
.travis.yml new file +10
-0+ wget -q https://package.perforce.com/perforce.pubkey -O - \ + | sudo apt-key add - + echo 'deb http://package.perforce.com/apt/ubuntu precise release' \ + | sudo tee -a /etc/apt/sources.list + wget -q https://packagecloud.io/gpg.key -O - | sudo apt-key add - + echo 'deb https://packagecloud.io/github/git-lfs/debian/ jessie main' \ + | sudo tee -a /etc/apt/sources.list + sudo apt-get update -qq + sudo apt-get install -y apt-transport-https + sudo apt-get install perforce-server git-lfsSorry if this has been discussed already, but do you really need these "sudo" calls?
They trigger builds on the legacy Travis CI infrastructure:
Quoted 8 lines
Quoted 3 lines
No big deal, but getting rid of sudo would be cool, and documenting why it can't easily be done in commit message and/or comments would be nice otherwise.
I would like to get rid of the "sudo" calls, too. Unfortunately I wasn't able to achieve this so far because these packages are not white listed on Travis CI (see Jean-Noël answer in this thread). I tried to download and install the *.deb files manually using dpkg without luck. Any idea or hint? Nevertheless I don't think this is a problem as Travis CI states that "sudo isn't possible (
__rightnow__)" on the new infrastructure. They need to find a solutions because I believe many projects will run into this issue...
http://docs.travis-ci.com/user/migrating-from-legacy/?utm_source=legacy-notice&utm_medium=banner&utm_campaign=legacy-upgrade#Using-sudo-isn%E2%80%99t-possible-(right-now)- Lars
There's another hope. The requirements can be installed in the user's HOME and cached between builds. In this case, no need for sudo. Obviously, that rules out using apt and dpkg.
Jean-Noël
Quoted 3 lines · Lars Schneider
I would like to get rid of the "sudo" calls, too. Unfortunately I wasn't able to achieve this so far because these packages are not white listed on Travis CI (see Jean-Noël answer in this thread).
I think this would deserve a mention in the commit message, but I won't insist on that.
Signature · 2 lines
Matthieu Moy http://www-verimag.imag.fr/~moy/
Quoted 10 lines · Jean-Noël Avila
.travis.yml line 46
Quoted 4 lines · Le 11/10/2015 19:55, [email protected] a écrit :
.travis.yml new file +4
-0+ +before_script: make + +script: make --quiet testTravis can be used in container mode but that would need getting rid of "sudo" command and only installing from white-listed sources
(https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json)
Quoted 3 lines
Anyway, even within the present VM mode, 1.5 cores are available, so it makes sense to add "-j2" to every make commands.
I was reluctant to this because I feared problems. Especially while running tests in parallel. However, the result looks quite good.
make -j2 9min 11sec:
https://travis-ci.org/larsxschneider/git/jobs/85478022
make 17min 20sec:
https://travis-ci.org/larsxschneider/git/jobs/85432398
If there is no argument against running test in parallel then I will add it to the next roll.
Thanks,
Lars
Quoted 2 lines · Lars Schneider
I was reluctant to this because I feared problems. Especially while running tests in parallel.
Isn't the point of using a CI tool to notice problems? ;-)
More seriously, running tests in parallel shouldn't be a problem since each test runs in its own directory with HOME set to this private directory, so two diffent tests should not interfer. If there's an issue with parallel tests, we probably prefer discovering them than avoiding them.
Quoted 5 lines
make -j2 9min 11sec:
https://travis-ci.org/larsxschneider/git/jobs/85478022make 17min 20sec:
https://travis-ci.org/larsxschneider/git/jobs/85432398
Since the tests are essentially IO-bound and not CPU-bound, it may even make sense to use -j3 here.
Signature · 2 lines
Matthieu Moy http://www-verimag.imag.fr/~moy/
Quoted 5 lines · Matthieu Moy
Quoted 2 lines · Lars Schneider
I was reluctant to this because I feared problems. Especially while running tests in parallel.
Quoted 7 lines
Isn't the point of using a CI tool to notice problems? ;-)
More seriously, running tests in parallel shouldn't be a problem since each test runs in its own directory with HOME set to this private directory, so two diffent tests should not interfer. If there's an issue with parallel tests, we probably prefer discovering them than avoiding them.
OK. Great!
Quoted 8 lines
Quoted 5 lines
make -j2 9min 11sec:
https://travis-ci.org/larsxschneider/git/jobs/85478022make 17min 20sec:
https://travis-ci.org/larsxschneider/git/jobs/85432398Since the tests are essentially IO-bound and not CPU-bound, it may even make sense to use -j3 here.
Hehe you're right.
make -j3 6min 2sec
https://travis-ci.org/larsxschneider/git/jobs/85497307
just for fun I tried a few more values and -j5 seems to be the best with 4min 27sec
https://travis-ci.org/larsxschneider/git/jobs/85501015
-j6 is slower again. Do you see a reason not to use "-j5"?
Thanks,
Lars
Hi,
Quoted 5 lines · Matthieu Moy
Quoted 2 lines · Lars Schneider
I was reluctant to this because I feared problems. Especially while running tests in parallel.
Quoted 7 lines
Isn't the point of using a CI tool to notice problems? ;-)
More seriously, running tests in parallel shouldn't be a problem since each test runs in its own directory with HOME set to this private directory, so two diffent tests should not interfer. If there's an issue with parallel tests, we probably prefer discovering them than avoiding them.
I vividly remember pulling my hair out over BuildHive (i.e. the Java-based Jenkins alternative to Travis) failures that turned out to be
resource-related: I simply overloaded the BuildHive node.
So I assumed that the problems Lars referred to would not be problems of Git, or the test suite, but of overwhelming a free service with an unreasonable load.
Quoted 8 lines
Quoted 5 lines
make -j2 9min 11sec:
https://travis-ci.org/larsxschneider/git/jobs/85478022make 17min 20sec:
https://travis-ci.org/larsxschneider/git/jobs/85432398Since the tests are essentially IO-bound and not CPU-bound, it may even make sense to use -j3 here.
I would like to caution against overloading Travis. They are really nice to us, we should try to be nice to them, too.
Ciao,
Dscho
Quoted 7 lines · Johannes Schindelin
Quoted 2 lines · Matthieu Moy
Since the tests are essentially IO-bound and not CPU-bound, it may even make sense to use -j3 here.
I would like to caution against overloading Travis. They are really nice to us, we should try to be nice to them, too.
Right.
Using a bit of parallelism shouldn't harm (we put a heavier load on them, but for a shorter time), so using -j2 or -j3 seems OK to me, but I wouldn't go higher to remain gentle with Travis CI.
Note: I'm writting this without having a real idea of what consequence of -jN have on their infrastructure, take my writing as wild guess, not as real arguments.
Signature · 2 lines
Matthieu Moy http://www-verimag.imag.fr/~moy/