Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container infrastructure: APT packages not installed for jobs created with matrix.include #5405

Closed
fwalch opened this issue Jan 4, 2016 · 1 comment

Comments

@fwalch
Copy link

fwalch commented Jan 4, 2016

For the following .travis.yml, APT packages will not be installed for the job created by matrix.include:

sudo: false
language: c
os:
  - linux
compiler: gcc-4.4
matrix:
  include:
    - compiler: gcc-4.5

addons:
  apt:
    packages:
      - gcc-4.4
      - gcc-4.5

script:
  - which $CC

Log (note that "Installing APT Packages (BETA)" is missing):

...
$ export CC=gcc-4.5
$ gcc-4.5 --version
/home/travis/build.sh: line 45: gcc-4.5: command not found

This can be fixed by adding os: linux to the matrix.include job:

diff --git a/.travis.yml b/.travis.yml
index a8f2082..b03875c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,7 +5,8 @@ os:
 compiler: gcc-4.4
 matrix:
   include:
-    - compiler: gcc-4.5
+    - os: linux
+      compiler: gcc-4.5

 addons:
   apt:

Log:

Installing APT Packages (BETA)
...
$ export CC=gcc-4.5
$ gcc-4.5 --version
gcc-4.5 (Ubuntu/Linaro 4.5.3-12ubuntu2) 4.5.3
@BanzaiMan
Copy link
Contributor

matrix.include jobs do not inherit from the outside. If you want the APT addon, you can do:

sudo: false
language: c
os:
  - linux
compiler: gcc-4.4
matrix:
  include:
    - compiler: gcc-4.5
      addons:
        apt:
          packages:
            - gcc-4.4
            - gcc-4.5


addons:
  apt:
    packages:
      - gcc-4.4
      - gcc-4.5

script:
  - which $CC

jayvdb added a commit to jayvdb/pywikibot-core that referenced this issue May 19, 2016
travis-ci/travis-ci#5405

Change-Id: Iaaa562a145b3aca8737af4ac3fc2418496d2747a
jayvdb added a commit to jayvdb/pywikibot-core that referenced this issue May 19, 2016
travis-ci/travis-ci#5405

Change-Id: Iaaa562a145b3aca8737af4ac3fc2418496d2747a
jayvdb added a commit to jayvdb/pywikibot-core that referenced this issue May 19, 2016
The installation of apt packages was inadvertantly disabled in August 2015
with 8004cdf due to travis-ci/travis-ci#5405 .

Bug: T135701
Change-Id: Iaaa562a145b3aca8737af4ac3fc2418496d2747a
jayvdb added a commit to jayvdb/pywikibot-core that referenced this issue May 20, 2016
The installation of apt packages was inadvertantly disabled in August 2015
with 8004cdf due to travis-ci/travis-ci#5405 .

Bug: T135701
Change-Id: Iaaa562a145b3aca8737af4ac3fc2418496d2747a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants