Trigger build mess up config

Hi, first, thanks for your work for travis.

I think I found regression (?) in the Trigger Build feature. What I recall from the past is it was working OK but now seems to be broken.

So I have repository connected to travis and it contains .travis.yml file which triggers the build.

Now. After the build failed, I wanted to try different options to find what is wrong. I’ve chosen More Options -> Trigger Build, selected the branch, pasted new config into the Config field, and executed the build. My yml is simple, beside definition of the OS it has only before_script and script sections.

And in the View Config tab I actually see that my custom config is concatenated to the config from the repo. So in principle the before_script has the part from repo and from custom yaml, same for the script and env parts. Which, specially the part ‘before_scripts’ breaks the build.

And I think I was using this feature in the past, and it worked. I was able to overwrite the repo provided config. Is it regression? Shouldn’t the custom config completely overwrite the one from repository?

I guess you can see my config, so here it is: Travis CI - Test and Deploy with Confidence

or just here:

API

{
  "language": "cpp",
  "compiler": "gcc",
  "os": "linux",
  "dist": "focal",
  "env": {
    "global": [
      "MAKEFLAGS=\"-j 2\""
    ]
  },
  "before_script": [
    "sudo apt-get update",
    "sudo apt-get install -y libcppunit-dev lcov",
    "mkdir .aux_deps",
    "wget https://root.cern/download/root_v6.22.06.Linux-ubuntu20-x86_64-gcc9.3.tar.gz",
    "tar zxf root_v6.22.06.Linux-ubuntu20-x86_64-gcc9.3.tar.gz -C .aux_deps",
    ". ./.aux_deps/root/bin/thisroot.sh",
    "root-config --cflags",
    "root-config --features",
    "mkdir build && cd build",
    "cmake .. -DCMAKE_BUILD_TYPE=Release"
  ],
  "script": [
    "make",
    "make test"
  ]
}

REPO

language: cpp
compiler: gcc
os: linux
dist: focal

env:
  global:
    - MAKEFLAGS="-j 2"

before_script:
    - sudo apt-get update
    - sudo apt-get install -y libcppunit-dev lcov
    - mkdir .aux_deps
    - wget https://root.cern/download/root_v6.22.06.Linux-ubuntu20-x86_64-gcc9.3.tar.gz
    - tar zxf root_v6.22.06.Linux-ubuntu20-x86_64-gcc9.3.tar.gz -C .aux_deps
    - . ./.aux_deps/root/bin/thisroot.sh
    - root-config --cflags
    - root-config --features
    - mkdir build && cd build
    - cmake .. -DCMAKE_BUILD_TYPE=Release
script:
    - make
    - make test

BUILD CONFIG

{
  "language": "cpp",
  "os": [
    "linux"
  ],
  "dist": "focal",
  "compiler": [
    "gcc"
  ],
  "env": {
    "global": [
      {
        "MAKEFLAGS": "\"-j 2\""
      },
      {
        "MAKEFLAGS": "\"-j 2\""
      }
    ]
  },
  "before_script": [
    "sudo apt-get update",
    "sudo apt-get install -y libcppunit-dev lcov",
    "mkdir .aux_deps",
    "wget https://root.cern/download/root_v6.22.06.Linux-ubuntu20-x86_64-gcc9.3.tar.gz",
    "tar zxf root_v6.22.06.Linux-ubuntu20-x86_64-gcc9.3.tar.gz -C .aux_deps",
    ". ./.aux_deps/root/bin/thisroot.sh",
    "root-config --cflags",
    "root-config --features",
    "mkdir build && cd build",
    "cmake .. -DCMAKE_BUILD_TYPE=Release",
    "sudo apt-get update",
    "sudo apt-get install -y libcppunit-dev lcov",
    "mkdir .aux_deps",
    "wget https://root.cern/download/root_v6.22.06.Linux-ubuntu20-x86_64-gcc9.3.tar.gz",
    "tar zxf root_v6.22.06.Linux-ubuntu20-x86_64-gcc9.3.tar.gz -C .aux_deps",
    ". ./.aux_deps/root/bin/thisroot.sh",
    "root-config --cflags",
    "root-config --features",
    "mkdir build && cd build",
    "cmake .. -DCMAKE_BUILD_TYPE=Release"
  ],
  "script": [
    "make",
    "make test",
    "make",
    "make test"
  ]
}

Regards and happy 2021,
Rafał

Hey @rlalik,

First off Happy 2021! I hope you had a great New Years. In your script: hook in your .travis.yml, try doing:

script:
  - CXX=/usr/bin/g++-6 CC=/usr/bin/gcc-6 cmake .
  - cmake --build .

See if that changes anything. Happy New Year, and looking forward to resolving this for you!

Looks like this is a bug with config validation, where lists are concatenated rather than replaced.

I am not sure what it should change. It is a different script, but the problem with concatenating lists is still there. This is what I am reporting. Not problem with my build.

Imprint