Windows and Linux Runners

I have a use case for the “runner tags” I’d like to use.

Here are my variables:

a) The “script:” portion is either BATCH files or SHELL SCRIPTS.
So I need to pick the the right type of machine to run the build on.

b) Some TESTS require special hardware to be present, ie: a circuit board

c) Some builds require special memory requirements, ie: an FPGA build takes 4 hours on a heafty machine, so the project might need to point to the “release heafty machine”

d) But other times - damn well any machine would work.

Any suggestions?

Hmm - I’ll answer my own - Tags are the way to make this work.

Setup/Background:

  • Create a pool of runners, give all linux machines the ‘linux-any’ tag.

  • Create a subset of machines with more ram, give those runners 2 tags: linux-any, and linux-extra-ram.

  • Possibly create a "windows-special-hardware’ tag on a windows machine.

In the specific job in the YML file, you specify: ‘tags: [ NAME, NAME, NAME ]’
Thus that job will only run on a runner that has that specific tag NAME.

Example:

  • All of your LInux runners might have the tag LINUXANY, where the one with special hardware would have the tag: linuxspecialhardware

  • You might have a runner with a dedicated tag: special-project-42, thus only jobs with a matching: special-project-42 will get run on that machine.

  • Note: The tags are an AND operation, if the job specifies: tags: [ dogs, cats ]
    then the job will only run on a machine with both the dog and cat tag.