RFR: Add Windows support in GitHub actions

Jorn Vernee jvernee at openjdk.org
Thu Apr 11 17:11:23 UTC 2024


We currently don't run test in GitHub action on Windows. This can mean that a build failure on Windows may be missed (as seen recently). This PR adds support for running tests on Windows to the GitHub actions workflow.

Some notes about the changes:
- We can not build jtreg on Windows, so I've added a separate job which builds it on Ubuntu and then caches it. Then the main test job restores it from this cache. (FWIW, this cache is private/can not be downloaded outside of the actions)
- The `oracle-actions/setup-java` action we use gives us back a Windows path on Windows, which I don't think we can easily handle in bash, so I've created a Windows specific step for extracting the downloaded toolchain JDK
- Added caches also for LLVM/libclang and the toolchain JDK, so we don't have to download them all the time, and testing is faster.
- For that reason, I've added a step that creates a trimmed-down 'image' of the LLVM package with only the bits that we need, so that we can only cache those bits, instead of the entire LLVM package.

-------------

Commit messages:
 - use cache to restore jtreg in main job
 - rename step
 - Don'trebuild jtreg on cache hit
 - Trim down LLVM package for cache
 - cache jtreg too
 - remove actions files again
 - Try to use separate action scripts
 - Try add Windows support to GHA

Changes: https://git.openjdk.org/jextract/pull/235/files
  Webrev: https://webrevs.openjdk.org/?repo=jextract&pr=235&range=00
  Stats: 116 lines in 1 file changed: 78 ins; 7 del; 31 mod
  Patch: https://git.openjdk.org/jextract/pull/235.diff
  Fetch: git fetch https://git.openjdk.org/jextract.git pull/235/head:pull/235

PR: https://git.openjdk.org/jextract/pull/235


More information about the jextract-dev mailing list