build: use fromJSON to parse runner repo vars, don't add deps on self-hosted#2564
Conversation
dffe304 to
7dac311
Compare
fromJSON to parse runner repo varsfromJSON to parse runner repo vars, don't add deps on self-hosted
| readme.txt | ||
| build-switch: | ||
| runs-on: ${{ vars.LINUX_RUNNER || 'ubuntu-latest' }} | ||
| runs-on: ${{ (vars.LINUX_RUNNER && fromJSON(vars.LINUX_RUNNER)) || 'ubuntu-latest' }} |
There was a problem hiding this comment.
For this we would need a third machine - should we just aim to reuse COMPAT and PERF? and make it a requirements that those machines are also setup to build WiiU and Switch?
There was a problem hiding this comment.
we wouldn't need a third machine, we'd just need a third var
if we wanted to use a different machine that is more in line with whatever ubuntu-latest is at any given point we'd have that option, but we can also just set that var to be the same as either compat or perf
There was a problem hiding this comment.
it also may be possible (since these jobs use docker) to run this on either perf or compat, in which case we could have
LINUX_RUNNER: ['self-hosted', 'linux']
LINUX_PERFORMANCE_RUNNER: ['self-hosted', 'linux', 'perf']
LINUX_COMPATIBILITY_RUNNER: ['self-hosted', 'linux', 'compat']
There was a problem hiding this comment.
Ah that's a good point! This last plan sounds good :D forgot that its just vars we can set to anything
There was a problem hiding this comment.
I wonder if it might be worth moving the linux runners to use docker images as well -- one for 22.04 and one for 20.04 just for the sake of it running on any linux machine without having to setup deps on it.
There was a problem hiding this comment.
For example the images here: https://github.com/devcontainers/images/tree/main/src/cpp - which is what I used for the code spaces
This isn't the prettiest, and I still wish we could have found a cleaner way to do this (preferably without json parsing), but this should do the trick for now.
repo variables should be set using the following format:
MAC_RUNNER:
['self-hosted', 'macOS']Build Artifacts