mirror of
https://github.com/ubuntu/wsl-setup.git
synced 2025-10-26 12:03:29 +01:00
No description
Looks like we can go quite far with GitHub hosted runners these days (since they made large runners generally available). I devised an integration test workflow for `wsl-setup` that: - Downloads and caches the daily-live/current image from cdimages.ubuntu.com - In parallel, it builds the wsl-setup debian package from git - When above are done: * sets up a WSL instance, * installs the deb built by CI, * clean up cloud-init state, * writes some cloud-init user data, * does some actions to prevent the test from being stuck in case cloud-init fails, * runs the initial setup via WSL itself (with just `wsl -d DISTRO`) and * runs some assertions based on the results of having wsl-setup installed. To support development time, part of the assertions are placed in a separate shell script that we can run inside a VM, LXD container or WSL instance at development time (though some can only pass on WSL), assertions which are really coupled to the contents of the package, thus we should pay attention to them when changing the package. Unfortunately I'm not bold enough to put those assertions in an override_build step of debian/rules because I that could result in unnecessary breakages. My image caching system saves more bandwidth than time. I was pleased to see that CI was taking less than 30s to download a WSL image (building the deb takes much longer, there's probably some caching opportunity in the callee side?). The cache key is the image checksum read from the SHA256SUMS file hosted aside from the image. I had to learn a few tricks to make the cache working cross OSes. The WSL instance is created from the cached image with `wsl --install --from-file ... --no-launch ...` so we can further customise it with other `wsl -d DISTRO -- <COMMANDS>` without those counting as if the OOBE script was run, that is, WSL keeps track of that instance as still non-initialized. This whole scheme allows us to: - claim that the package builds both source and binary outputs - claim that the installed package behaves as expected on a target - smoke test the latest images, preventing late breakages if breaking changes appear in them without us noticing. --- UDENG-7866 |
||
|---|---|---|
| .github/workflows | ||
| cloud/cloud.cfg.d | ||
| debian | ||
| systemd/system | ||
| test | ||
| update-motd.d | ||
| wsl | ||
| LICENSE | ||
| README.md | ||
| wait-for-cloud-init | ||
| wsl-setup | ||
wsl-setup
WSL integration setup. This project helps setting up a working WSL environment with systemd enabled by default.