# [PATCH] travis-ci: run gcc-7 on linux-gcc jobs

4 messages from 2018-05-13 to 2018-05-21. Participants: Nguyễn Thái Ngọc Duy, Thomas Braun, Junio C Hamano.
Thread: https://gitlist.dev/t/48479

## Nguyễn Thái Ngọc Duy, 2018-05-13 09:17

Subject: [PATCH] travis-ci: run gcc-7 on linux-gcc jobs
Message-ID: <20180513091752.14003-1-pclouds@gmail.com>
URL: https://gitlist.dev/e/20180513091752.14003-1-pclouds%40gmail.com

```
Switch from gcc-4.8 to gcc-7. Newer compilers come with more warning
checks (usually in -Wextra).  Since -Wextra is enabled in developer
mode (which is also enabled in travis), this lets travis report more
warnings before other people do it.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 .travis.yml        | 3 +++
 ci/lib-travisci.sh | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 5f5ee4f3bd..a77f5f5bd5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,10 +16,13 @@ compiler:
 
 addons:
   apt:
+    sources:
+    - ubuntu-toolchain-r-test
     packages:
     - language-pack-is
     - git-svn
     - apache2
+    - gcc-7
 
 matrix:
   include:
diff --git a/ci/lib-travisci.sh b/ci/lib-travisci.sh
index 109ef280da..ef2848fd45 100755
--- a/ci/lib-travisci.sh
+++ b/ci/lib-travisci.sh
@@ -99,6 +99,9 @@ export DEFAULT_TEST_TARGET=prove
 export GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
 export GIT_TEST_OPTS="--verbose-log -x"
 export GIT_TEST_CLONE_2GB=YesPlease
+if [ "$jobname" = linux-gcc ]; then
+	export CC=gcc-7
+fi
 
 case "$jobname" in
 linux-clang|linux-gcc)
-- 
2.17.0.705.g3525833791


```

## Thomas Braun, 2018-05-13 12:45

Subject: Re: [PATCH] travis-ci: run gcc-7 on linux-gcc jobs
Message-ID: <10b243d8-fc81-a172-768d-9b47e94a24b0@virtuell-zuhause.de>
URL: https://gitlist.dev/e/10b243d8-fc81-a172-768d-9b47e94a24b0%40virtuell-zuhause.de
In-Reply-To: <20180513091752.14003-1-pclouds@gmail.com>

```
Am 13.05.2018 um 11:17 schrieb Nguyễn Thái Ngọc Duy:
> Switch from gcc-4.8 to gcc-7. Newer compilers come with more warning
> checks (usually in -Wextra).  Since -Wextra is enabled in developer
> mode (which is also enabled in travis), this lets travis report more
> warnings before other people do it.
> 
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
>  .travis.yml        | 3 +++
>  ci/lib-travisci.sh | 3 +++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/.travis.yml b/.travis.yml
> index 5f5ee4f3bd..a77f5f5bd5 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -16,10 +16,13 @@ compiler:
>  
>  addons:
>    apt:
> +    sources:
> +    - ubuntu-toolchain-r-test
>      packages:
>      - language-pack-is
>      - git-svn
>      - apache2
> +    - gcc-7

You could also use gcc-8 here as that is already present according to [1].

[1]:
https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages

>  matrix:
>    include:
> diff --git a/ci/lib-travisci.sh b/ci/lib-travisci.sh
> index 109ef280da..ef2848fd45 100755
> --- a/ci/lib-travisci.sh
> +++ b/ci/lib-travisci.sh
> @@ -99,6 +99,9 @@ export DEFAULT_TEST_TARGET=prove
>  export GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
>  export GIT_TEST_OPTS="--verbose-log -x"
>  export GIT_TEST_CLONE_2GB=YesPlease
> +if [ "$jobname" = linux-gcc ]; then
> +	export CC=gcc-7
> +fi
>  
>  case "$jobname" in
>  linux-clang|linux-gcc)
> 


```

## Nguyễn Thái Ngọc Duy, 2018-05-19 04:32

Subject: [PATCH v2] travis-ci: run gcc-8 on linux-gcc jobs
Message-ID: <20180519043234.9260-1-pclouds@gmail.com>
URL: https://gitlist.dev/e/20180519043234.9260-1-pclouds%40gmail.com
In-Reply-To: <20180513091752.14003-1-pclouds@gmail.com>

```
Switch from gcc-4.8 to gcc-8. Newer compilers come with more warning
checks (usually in -Wextra).  Since -Wextra is enabled in developer
mode (which is also enabled in travis), this lets travis report more
warnings before other people do it.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 v2 switches from gcc-7 to gcc-8. I initially ignored gcc 8 because it
 was too new. But it built 'pu' ok and 8.1 was already out so the
 first wave of bugs should have been gone by now.

 .travis.yml        | 3 +++
 ci/lib-travisci.sh | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 5f5ee4f3bd..4d4e26c9df 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,10 +16,13 @@ compiler:
 
 addons:
   apt:
+    sources:
+    - ubuntu-toolchain-r-test
     packages:
     - language-pack-is
     - git-svn
     - apache2
+    - gcc-8
 
 matrix:
   include:
diff --git a/ci/lib-travisci.sh b/ci/lib-travisci.sh
index 109ef280da..ceecc889ca 100755
--- a/ci/lib-travisci.sh
+++ b/ci/lib-travisci.sh
@@ -99,6 +99,9 @@ export DEFAULT_TEST_TARGET=prove
 export GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
 export GIT_TEST_OPTS="--verbose-log -x"
 export GIT_TEST_CLONE_2GB=YesPlease
+if [ "$jobname" = linux-gcc ]; then
+	export CC=gcc-8
+fi
 
 case "$jobname" in
 linux-clang|linux-gcc)
-- 
2.17.0.705.g3525833791


```

## Junio C Hamano, 2018-05-21 06:46

Subject: Re: [PATCH v2] travis-ci: run gcc-8 on linux-gcc jobs
Message-ID: <xmqqmuwt1p6f.fsf@gitster-ct.c.googlers.com>
URL: https://gitlist.dev/e/xmqqmuwt1p6f.fsf%40gitster-ct.c.googlers.com
In-Reply-To: <20180519043234.9260-1-pclouds@gmail.com>

```
Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:

>  v2 switches from gcc-7 to gcc-8. I initially ignored gcc 8 because it
>  was too new. But it built 'pu' ok and 8.1 was already out so the
>  first wave of bugs should have been gone by now.

I also liked the choice to ignore v8 for the same reason, but if it
is already mature (or maturing enough), let's use it.

```
