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

build: use fromJSON to parse runner repo vars, don't add deps on self-hosted #2564

Merged

Conversation

briaguya-ai
Copy link
Contributor

@briaguya-ai briaguya-ai commented Mar 1, 2023

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

@briaguya-ai briaguya-ai changed the title build: use fromJSON to parse runner repo vars build: use fromJSON to parse runner repo vars, don't add deps on self-hosted Mar 1, 2023
@@ -124,7 +128,7 @@ jobs:
soh.appimage
readme.txt
build-switch:
runs-on: ${{ vars.LINUX_RUNNER || 'ubuntu-latest' }}
runs-on: ${{ (vars.LINUX_RUNNER && fromJSON(vars.LINUX_RUNNER)) || 'ubuntu-latest' }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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']

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah that's a good point! This last plan sounds good :D forgot that its just vars we can set to anything

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example the images here: https://github.com/devcontainers/images/tree/main/src/cpp - which is what I used for the code spaces

@briaguya-ai briaguya-ai merged commit 72777a0 into HarbourMasters:develop Mar 2, 2023
leggettc18 pushed a commit to leggettc18/Shipwright that referenced this pull request Mar 10, 2023
@briaguya-ai briaguya-ai deleted the json-runner-parsing branch April 11, 2023 12:41
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

Successfully merging this pull request may close these issues.

None yet

2 participants