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

Run workflows in Mono Docker containers #3091

Merged
merged 1 commit into from
Jun 28, 2020

Conversation

DasSkelett
Copy link
Member

@DasSkelett DasSkelett commented Jun 28, 2020

Motivation

The CI builds still take quite a long time to finish, since installing Mono takes around 10 minutes.
@techman83 had the excellent idea of running the builds in Docker containers from the images published here.
Downloading the images should be way faster than installing and pre-compiling it.

Changes

There exists a container keyword for workflow jobs: https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontainer
If I understood the documentation correctly, it makes all steps of this job run in the specified container after pulling it from the Docker hub.
Let's see if it works.

Also realized that I messed up the Discord notifications in #3089 since the env var is named differently.

@DasSkelett DasSkelett added Enhancement New features or functionality Pull request Infrastructure Issues affecting everything around CKAN (the GitHub repos, build process, CI, ...) Mono Issues specific for Mono labels Jun 28, 2020
@DasSkelett

This comment has been minimized.

@DasSkelett
Copy link
Member Author

DasSkelett commented Jun 28, 2020

Well, that was fast 😮

Added the apt-get update to the wrong line in release.yml though.

Copy link
Member

@HebaruSan HebaruSan left a comment

Choose a reason for hiding this comment

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

🏃

@HebaruSan HebaruSan self-requested a review June 28, 2020 18:54
@DasSkelett DasSkelett force-pushed the feature/workflow-in-container branch from eb0cdc5 to 90b0480 Compare June 28, 2020 18:57
Copy link
Member

@HebaruSan HebaruSan left a comment

Choose a reason for hiding this comment

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

🚴

@HebaruSan HebaruSan merged commit 04a3e0b into KSP-CKAN:master Jun 28, 2020
@DasSkelett DasSkelett deleted the feature/workflow-in-container branch June 28, 2020 19:08
@DasSkelett
Copy link
Member Author

DasSkelett commented Jun 28, 2020

The workflow is not valid. .github/workflows/deploy.yml (Line: 15, Col: 14): Unrecognized named-value: 'env'. Located at position 1 within expression: env.RELEASE_MONO_VERSION

Almost...

You can only use the env context in the value of the with and name keys, or in a step's if conditional.

@DasSkelett
Copy link
Member Author

Hmm, I could either specify the mono version directly in the image: line, since it's the only place we use it,
or create a matrix with a single item.

@techman83
Copy link
Member

This is really neat! That makes the builds way faster and less prone to issues with installing all the mono packages across so many versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New features or functionality Infrastructure Issues affecting everything around CKAN (the GitHub repos, build process, CI, ...) Mono Issues specific for Mono
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants