Skip to content

CI: build and run the test suite on Android - #235

Open
DTW-Thalion wants to merge 1 commit into
gnustep:masterfrom
DTW-Thalion:ci/android-suite
Open

CI: build and run the test suite on Android#235
DTW-Thalion wants to merge 1 commit into
gnustep:masterfrom
DTW-Thalion:ci/android-suite

Conversation

@DTW-Thalion

@DTW-Thalion DTW-Thalion commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

libs-back is built and tested only on the systems it already runs on. This workflow cross-compiles the dependencies, tools-make, libs-base, libs-gui and libs-back for x86_64-linux-android at API 31 and runs Tests on an emulator.

The dependencies are cached on the hash of deps.sh, so the 9 minutes they take are paid only when it changes. tests.sh compiles each test, stages every library under the soname the loader asks for, deploys a GNUstep tree the bundle can be found in, and reads the result against expected-failures.txt.

The emulator image is cached on the ABI and the API level: creating it costs 86 to 116 seconds and restoring it 15. It is saved by a step of its own, since actions/cache writes nothing when the job has failed. A concurrency block cancels a run a newer push has superseded.

pkg-config is pointed at the cross prefix. Unset, it answers nothing on a runner with no host cairo, and every test including cairo.h fails to build while the rest reports healthy counts.

Measured against a branch carrying the android server: 286 assertions passed, 0 failed, nothing unbuilt, in about 4 minutes.

@DTW-Thalion
DTW-Thalion requested a review from fredkiefer as a code owner August 9, 2026 22:52
@fredkiefer

Copy link
Copy Markdown
Member

I am really not sure whether we want even more test environments. You already had this discussion with Richard on libs-base and I would prefer to wait out the results from this. For me it would be better to have just three jobs running after each commit and have a separate weekly task running that tests more environments.

@DTW-Thalion
DTW-Thalion marked this pull request as draft August 11, 2026 16:24
libs-back is built and tested only on the systems it already runs on. This adds a workflow that cross-compiles the dependencies, tools-make, libs-base, libs-gui and libs-back for x86_64-linux-android at API 31, and runs the whole of Tests on an emulator.

deps.sh cross-builds the dependencies and they are cached on the hash of that script, so the 9 minutes they take are paid only when the script changes. back.sh builds the four libraries in order, since Source/GNUmakefile.preamble links -lgnustep-gui. tests.sh compiles each test with the cross toolchain, stages every library under the soname the loader asks for, deploys a GNUstep tree the backend bundle can be found in, and reads the result against expected-failures.txt.

The emulator image is cached on the ABI and the API level. Creating it costs 86 to 116 seconds and restoring it 15 to 16. It is saved by a step of its own rather than from a post step, since actions/cache writes nothing when the job has failed and a red suite would otherwise leave the image to be created again on every later run.

A concurrency block cancels a run that a newer push has superseded.

pkg-config is pointed at the cross prefix. Unset, it answers nothing on a runner that installs no host cairo, and every test that includes cairo.h fails to build while the rest of the suite compiles, runs and reports healthy counts.

The counts, the compiler output for anything that did not build, and the build logs are uploaded whatever the run concluded.

Measured against a branch carrying the android server: 286 assertions passed, 0 failed, nothing left unbuilt, in a run of about 4 minutes.
@DTW-Thalion
DTW-Thalion marked this pull request as ready for review August 11, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants