-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
.github: build vs-build with NO_GETTEXT #3040
.github: build vs-build with NO_GETTEXT #3040
Conversation
Hmm. It looks as if we require
How about using the same |
Will have a look at this tomorrow towards the end of the day! |
Actually, I thought about it, and it might be a perfect time to get a GitHub Action started for that. Let me try that. |
Took long enough: https://github.com/git-for-windows/setup-git-for-windows-sdk. It does not yet implement caching, but I think that'll be next. |
Very fancy, love it! 🚀 Let me try 👀 |
Are you familiar with Typescript, Jest & Mocking? I would love to have somebody look over this (I have a feeling that this is hodgepodge code, and could be done much more elegantly): https://github.com/git-for-windows/setup-git-for-windows-sdk/blob/f6f78470e56fadd03f2175101f627aacd6362602/__tests__/downloader.test.ts#L51-L77 |
Here it is: git-for-windows/setup-git-for-windows-sdk#8 |
Done in git-for-windows/setup-git-for-windows-sdk#11 😊 hope that helps! |
The good news: I cherry-picked this commit into gitgitgadget#878. The bad news: the Action does not yet do what it is supposed to do... |
28c9dbc
to
ef908c3
Compare
Just added your shiny new GH Action in ef908c3 and it seems to work: https://github.com/git-for-windows/git/pull/3040/checks?check_run_id=1928729677 |
In our continuous builds, Windows is the odd cookie that requires a complete development environment to be downloaded because it is not installed by default. Side note: technically, there _is_ a development environment: MSYS2. But it differs from Git for Windows' SDK in subtle points, enough so to prevent Git's test suite from running without failures. Traditionally, we support downloading this environment (which we nicknamed `git-sdk-64-minimal`) via a PowerShell scriptlet that accesses the build artifacts of a dedicated Azure Pipeline (which packages a tiny subset of the full Git for Windows SDK, containing just enough to build Git and run its test suite). This PowerShell script is unfortunately not very robust and sometimes due to network issues. Instead of doing all of this in Git's own `.github/workflows/`, let's offload this logic to the brand-new GitHub Action at https://github.com/marketplace/actions/setup-git-for-windows-sdk This Action not only downloads and extracts git-sdk-64-minimal _outside_ the worktree (making it no longer necessary to meddle with `.gitignore`), it also adds the `bash.exe` to the `PATH` and sets the environment variable `MSYSTEM` (an implementation detail that Git's workflow should never have needed to know about). This allows us to convert all those funny PowerShell tasks that wanted to call git-sdk-64-minimal's `bash.exe`: they all are now regular `bash` scriptlets. This finally lets us get rid of the funny quoting and escaping where we had to pay attention not only to quote and escape in the Bash scriptlets properly, but also to add a second level of escaping (with backslashes for double quotes and backticks for dollar signs) so that PowerShell would not do unintended things. Further, this Action uses a fast caching strategy native to GitHub Actions that is not only very fast, but should accelerate the download across CI runs: git-sdk-64-minimal is usually updated once per 24h, and needs to be cached only once within that period. With this we can drop the homerolled caching where we try to accelerate the test phase by uploading git-sdk-64-minimal as a workflow artifact after using it to build Git, and then download it as workflow artifact in the test phase. Even better: the `vs-test` job no longer needs to depend on the `windows-build` job. The only reason it depended on it was to ensure that the workflow artifact was available. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
We use a `.bat` script to copy the DLLs in the `vs-build` job, and those type of scripts are native to CMD, not to PowerShell. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The GitHub Actions to upload/download workflow artifacts saw a major upgrade since Git's GitHub workflow was established. Let's use it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Git's test suite is excruciatingly slow on Windows, mainly due to the fact that it executes a lot of shell script code, and that's simply not native to Windows. To help with that, we established the pattern where the artifacts are first built in one job, and then multiple test jobs run in parallel using the artifacts built in the first job. We take pains in transferring only the build outputs, and letting `actions/checkout` fill in the rest of the files. One major downside of that strategy is that the test jobs might fail to check out the intended revision (e.g. because the branch has been updated while the build was running, as is frequently the case with the `seen` branch). Let's transfer also the files tracked by Git, and skip the checkout step in the test jobs. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
We already build Git for Windows with `NO_GETTEXT` when compiling with GCC. Let's do the same with Visual C, too. Signed-off-by: Dennis Ameling <dennis@dennisameling.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
By upgrading from v1 to v2 of `actions/checkout`, we avoid fetching all the tags and the entire history: v2 only fetches one revision by default. This should make things a lot faster. Note that `actions/checkout@v2` seems to be incompatible with running in containers: actions/checkout#151. Therefore, we stick with v1 there. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
What would you think of force-pushing gitgitgadget#878's branch to this PR, since it essentially includes your work (but splits concerns into multiple commits, and also adds additional speed-ups)? |
@dennisameling if you're okay with going forward with this, I can do it for you... I just don't want to step on your toes. |
Hi @dscho, I've been swamped with work in the last days, sorry. Please, if you have time, feel free to go ahead with this one 😊 I hope to have some time during the weekend as well if that helps! |
@dscho I think it's easier to just close this PR and create a new one from your branch https://github.com/dscho/git/tree/use-setup-git-for-windows-sdk-action. What do you think? Please feel free to close this one 👍🏼 |
Force-pushing the branch to this PR would have the advantage for me that I would save me some time... 😄 |
62be51c
to
c7774e7
Compare
Git for Windows's vs-build job supports both Windows x64 and arm64. This commit re-enables that support after changes were done to the gitgitgadget repo.
4303366
to
fc590b3
Compare
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
.github: build vs-build with NO_GETTEXT
As discussed in #3017 (comment), removes the dependency on
git-sdk-64-minimal
invs-build
by changing toNO_GETTEXT
.