Different Linux jobs mapping to Gcc versions
Hi,
I have noticed while using the Ubuntu1804 image that both Gcc 7 and Gcc 8 are installed. This is interesting for CI on my github repos, since I can use either of these. However, my test runs are long-running, so I'd split Gcc 7 and Gcc 8 into different jobs, rather than try to do it in a single Ubuntu1804 job.
After reading https://www.appveyor.com/docs/build-environment/#using-multiple-ima..., I thought I'd try this, although my .appveyor.yml does have Windows images too. This is what I tried, with the duplicate GCC_VERSION on the Ubuntu1804 image
image:
- Ubuntu1804
- Ubuntu
- Visual Studio 2019 Preview
- Visual Studio 2017
clone_depth: 10
configuration: Release
platform: AnyCPU
for:
- matrix:
only:
- image: Ubuntu
environment:
GCC_VERSION: 5
- matrix:
only:
- image: Ubuntu1804
environment:
GCC_VERSION: 7
GCC_VERSION: 8
- matrix:
only:
- image: Visual Studio 2017
environment:
VC_VERSION: 15.0
VC_PRERELEASE_ARGS:
- matrix:
only:
- image: Visual Studio 2019 Preview
environment:
VC_VERSION: 16
VC_PRERELEASE_ARGS: "--VisualC.discoverprereleases"
Note that this is my normal structure, except for the duplicate GCC_VERSION environment variable under Ubuntu1804.
This fails, however, during parsing:
Error parsing appveyor.yml: (Line: 20, Col: 7, Idx: 330) - (Line: 20, Col: 18, Idx: 341): Duplicate key
Is there any way I can achieve this?
(I'm very comfortable setting up the update-alternatives scripts once I can configure the job structure of the project in AppVeyor.)
I'd really like to see a list of jobs such as
Ubuntu1804 (gcc 7)
Ubuntu1804 (gcc 8)
Ubuntu
Visual Studio 2019 Preview
Visual Studio 2017
appearing in my projects.
Many thanks,
Mark
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Wasa Pleshakov on 08 Jun, 2019 07:37 PM
I would suggest you create a matrix this way:
Here are 2 jobs with the sameUbuntu1804
image.And then you can specify environment variables per each job:
Also I would suggest you to use particular ubuntu images:
ubuntu1804
andubuntu1604
. Sinceubuntu
image is just an alias forubuntu1604
image as a default for those who dont care about OS version. We have a plan to switch this alias to point atubuntu1804
image.2 Posted by markfinal on 08 Jun, 2019 07:54 PM
Thanks! That worked, once I also removed the explicit image: node too, or I got a combinational explosion of jobs.
And thanks for the tip for the planned switch of the Ubuntu alias.
Mark.
markfinal closed this discussion on 08 Jun, 2019 07:55 PM.