-
Notifications
You must be signed in to change notification settings - Fork 2
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
Move to ghactions #13
Conversation
Winpty causes assertion error in CI: https://github.com/antmicro/litex-conda-misc-1/runs/1510103359?check_suite_focus=true Disabling it fixed Windows builds.
There were problems with these delete/checkout operations https://github.com/antmicro/litex-conda-misc-1/runs/1479196864?check_suite_focus=true
This reverts commit f170a02.
Upload resulted in an error when there was already package in this version in channel https://github.com/antmicro/litex-conda-misc-1/runs/1616885674?check_suite_focus=true
We need Conda environment set when script is executed.
We use this simple counter condition to determine if all jobs were queued and completed. Not queued jobs aren't returned in API call.
Since we are sourcing common.sh we should already be inside Conda environment with pexpect installed
ghactions API call we're using limits number of jobs returned in one call. If jobs exceed this number they are grouped into "pages". Page handling code shall be added when we exceed this number.
These functions split the output logs into foldable groups
5db1e04
to
f462e7b
Compare
f462e7b
to
99e8cd3
Compare
aee6984
to
7696131
Compare
LGTM now. |
I'd say I saw some intermediate state of this PR, where the README was "properly" updated. However, some modifications seem gone, and not present after the merge. For example:
was
Overall, the addition of I would strongly discourage adding Git for Windows' internal tools to the PATH: https://github.com/litex-hub/litex-conda-ci/blob/master/action.yml#L13. See actions/runner-images#1525. What is the motivation for doing so? |
Readme clearly needs to be fixed, thank you for pointing that out. |
@tjurtsch I'm not sure that's the best strategy... Let me explain: Since GitHub Actions were created, there have been two types: "JavaScript/TypeScript" and "Docker". JavaScript/TypeScript Actions can be executed on any environment (Ubuntu, Windows or macOS), because all environments include nodejs and someone decided that was the "best" language for scripting. However, those have one very obvious problem: the JS package ecosystem is a mess that fights against any optimal use of files. Unless you want all users of the Action to retrieve hundreds of dependencies, you need to "compile" them. At the same time, GitHub Actions does not support semver filters when specifying Actions, and it can neither use releases. All "releases" need to be a branch in the repo. As a result, you are forced to setting up some CI for handling the releases of your JS Actions, you cannot just tag and push. Alternatively, you need developers to "compile" locally before pushing (so they need nodejs on their workstations/laptops). Docker Actions are nicer because you can wrap any scripting language (say bash or python) in a container, and you can avoid using a browser language for CI. Unfortunately, Docker Actions are only supported on Ubuntu (neither Windows nor macOS), which is not acceptable in many projects. Moreover, the docker images are fixed in Docker Actions. You cannot let the user pass the image as an argument. The interesting feature of Docker Actions is that you can call existing containers using that syntax. See, for instance: https://github.com/tmeissner/formal_hw_verification/blob/master/.github/workflows/Test.yml#L41-L45. However, you can only call containers which existed before the job was started. That is, you cannot build a container image in one step and use it in the next one using this syntax. You need to use the regular Obviously, users complained a lot about the hard to understand limitations, and they recently came up with Composite Actions (the type you used). Those are nice... except they don't allow to compose anything. You cannot call other Actions (use As a result, I think you should first evaluate whether you'll be able to describe the logic that you currently use in your scripts, considering the constraints above. If you are already following the submodule approach and that works, maybe you should stick with that. I would suggest the following: rework the existing Composite Action for installing this repo in CI and maybe call it |
Wow, this is quite an extensive explanation. TBH realizing how many limitations this Composite Action has was very disappointing for me too. It's hard to understand why other Actions can't be called. However, in this case I see the biggest value of using such an action in dumping the submodule usage. Bumping those is pretty annoying if you have to do it in four repositories. Using its branches to test any changes also isn't the best experience. Because You're right that current situation needs to be fixed, because this Action shouldn't use scripts from the repository it runs in. At least there should be I must say that your proposal with an action simply installing all scripts definitely makes sense and would also enhance the experience of the Maybe there could be two actions in this repository:
It seems to make sense as both actions share some scripts. The problem of accessing two entrypoints without copying the scripts would be solved. What do you think about such an idea? |
@ajelinski, just to make it clear: you are already doing a nice job and all your ideas are sensible. I've been using GitHub Actions workflows for 18 moths, and I currently maintain JS, Docker and Composite actions. I want to help with this background/know-how I have. However, I help handle CI in several orgs, and am not familiar with all the details of the CI infrastructure in SymbiFlow/litex-hub/antmicro (yet). I might be missing relevant constraints, such as what you said about having too many jobs. Therefore, we need to help each other. Can you please provide a reference of the four repositories you mentioned, so I can have a look and get a better picture? I can guess which repos you mean, but I prefer to be given a specific scope to focus on. Maybe we can rethink some of those steps, in coherence with reshaping this repo. |
Sorry for the delayed answer @umarcor. Everything is clear, I hope your help will make The four repositories that I use
They all use BTW. Using separate jobs in the workflows to build each package instead of using a job with a matrix gives us possibility to properly define intra-repository package dependencies. Unfortunately it results in duplicating a similar job multiple times but it seems inevitable if we want to use |
This submodule implements generic scripts that will be used by CI repos (compilers, misc, prog, eda).
This PR replaced another PR from remote branch #12