Skip to content

Add support for Android and iOS. - #3931

Open
freakboy3742 wants to merge 2 commits into
tornadoweb:masterfrom
freakboy3742:mobile-support
Open

freakboy3742 wants to merge 2 commits into
tornadoweb:masterfrom
freakboy3742:mobile-support

Conversation

@freakboy3742

Copy link
Copy Markdown

Adds a build configuration, plus some test skips, to support running tornado on iOS and Android.

This is mostly of interest for Electron-style apps - i.e., apps that are a single-site web browser and a web server wrapped into one bundle. Toga's Positron plugin recently added support for Panel apps, which use Tornado as a web server.

The CI configuration is a fairly vanilla cibuildwheel configuration for iOS. This will generate ARM64 device, ARM64 simulator and x86-64 simulator wheels on iOS; and ARM64 and x86-64 wheels for Android. This configuration will only run the test suite with the iOS ARM64 simulator, and the Android x86-64 emulator. This approach is consistent with the approach taken with other projects:

  • it's not possible to run iOS device wheels in CI
  • x86-64 iOS simulator resources are slow
  • it's not possible to run the Android ARM64 emulator in CI.

The test skips are required because:

  1. iOS and Android don't support the use of subprocesses
  2. iOS and Android don't support the getpass module in the standard library
  3. There are path length limits on sockets that the test configuration hits.

@bdarnell

Copy link
Copy Markdown
Member

Interesting. I don't think android and ios can ever be more than "experimental" platforms to us, but this was less invasive than I expected so I'm open to it.

How long do the new CI jobs take to run?

I'm a little worried about having quirky platforms that are only tested in build.yml and not test.yml (build.yml is not run on ever PR, only when we're preparing a release build, which is an awkward time to find out that something's broken). We don't test every cpu architecture in test.yml but the different CPU architectures have never been a problem for us. If it's not too expensive I'd like to add a job for each platform (just one python version) to test.yml like we've done for windows and mac.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants