-
Notifications
You must be signed in to change notification settings - Fork 33
Github action runner notes
Akhil Kumar edited this page Sep 19, 2022
·
5 revisions
Every time we make a new stride in improving our build setup we learn 10's of lessons. The objective of this page is to register those notes in our social memory.
- action runners allow reusing workflows to avoid duplication of yaml scripts and promote DRY. But still there are many pitfalls:
- We want to use a single yaml script to perform multi-platform builds. But there are concepts which are not flexible. Consider or windows, linux and linux-docker reusable workflows. We have tried our best to use a single script by using "inputs" but that breaks the DRY principle because now we get repeated usage of "with" clause in the master script. A big missing gap is some ability to declare reusable variables in the caller workflow and pass them to the called workflow.
- we acheived some of it by exploting the "default" value of inputs so we now have one file with defaults for windows and another for defaults with linux. this way the main difference between the 3 scripts linked above is just the default value for variables. On the flip-side it means that every change has to be mecahnically copied to 3 scripts now. It would be so nice if yaml files can be "included" into other yaml files. cause then the core of our script would be maintained at one place and would be reused by main scripts.
- notice that the only difference between linux and linux-docker is that the second one needs a container while first one does not. Currently there is no way to make that optional.
-
Self hosted runners Notes:
- the ".path" file in the action_runner root directory can be used to add change the "PATH" that the steps run from the runner sees. e.g we needed nvcc in path to be able to compile CUDA kernels
- on windows with "Local system account" there is bug where in cache gets written to c:\windows\syswow64... but is searched in c:\windows\system32... the workarround is to not use "Local system account" and use a regular user account to run the service
-
Why does the vcpkg cache rebuilds so many times ?
- see here. There a veriety of things that can change to recomoute the hash including cmake version.
-
surprizes
- It is suprising that env values can not be passed from caller workflow to called workflow this makes us repeat inputs
- it is suprising that input values and defaults can not be expressions and only fixed values are allowed.