Adding WASI to CI

Now that WASI is a tier 2 platform, I would like to add it to CI as a non-required check. I quickly put together a GitHub Action workflow to measure the time it would take to build and run the test suite and it appears to be about 10 minutes (thanks to not having various tests related to subprocesses being disabled due to lack of support in WASI). Compare that to our other tests and it would definitely not be the slowest CI check we run. Arbitrarily grabbing gh-67044: Always quote or escape \r and \n in csv.writer() by serhiy-storchaka · Pull Request #115741 · python/cpython · GitHub as an example (from lowest to WASI):

  1. 21 minutes: CIFuzz (memory)
  2. 20 minutes: CIFuzz (undefined)
  3. 19 minutes: CIFuzz (address)
  4. 17 minutes: Windows (free-threading) / build and test (x86)
  5. 16 minutes: Windows (free-threading) / build and test (x64)
  6. 14 minutes: Windows / build and test (x86)
  7. 13 minutes: macOS (free-threading) / build and test (macos-13)
  8. 11 minutes: macOS / build and test (macos-13)
  9. 10 minutes: WASI

Another benefit to having WASI in CI is it is a cross-build, so it will lessen our chances of breaking in that as well.

The SC said they were good with adding a WASI check if if didn’t make overall CI slower which this timing suggests it won’t.

Anyone have issues if I add WASI to CI? I would only do it for main/3.13 since that’s when tier 2 was established.


I opened GH-115976: Add WASI to CI by brettcannon · Pull Request #116516 · python/cpython · GitHub for the CI job and it completed in 9 minutes w/ only a partial cache (I changed the key for the config.cache entry for the WASI host build).

I’m going to check on Discord if anyone wants to review the PR, otherwise I will merge it.


And now the PR is merged!