feat: Add CI, update INSTALL.md
This PR adds rough CI for most source tests, see below.
Add .github/workflows/ci.yml workflow which runs test for 4 systems:
- macOS 14.0
- Ubuntu 24.04
- Fedora 40
- Arch
The tests are new make targets: test-texlive and test-tectonic which essentially are tests for texpresso-xetex engine with -texlive and -tectonic options.
CI is run under 10 mins and provide additional summary report per job, per test (see Actions -> selected CI -> Summary)
Also, this updates installation instructions for INSTALL.md and cosmetic changes in README.md.
Caveats:
- ~Linux errors on
-texlive: I don't know the reason, buttexliveCI is currently passing only on macOS, the issue is most likely with missing font or package (should be fixed in this/following PR)~ - Debian 12 was not tested and omitted in CI (should be done in the following PR)
- ~
make test-*does not have test fortexpresso-frontend, I am not sure what will be most elegant way to do it, thinking something like passing option--headlesstotexpressomight be a solution, but other ideas are welcome.~ Edit: see comment below - ~
tectonicinstallation is different for every distro, as well as some packages might be redundant and steal "extra" time for CI. CI config should be refined and optimised (should be done in this/following PR)~ INSTALL.mdmight need some rewording or more clarification (should be done in this/following PR)
The last commit adds initialize only mode, which closes application once run a single cycle.
Basically, it added -initalize flag to texpresso which will invoke texpresso_main without loop, and also persistent_state have initialize_only value, which is used by texpresso_main to quit its loop one the system is initialized.
Passing SDL_VIDEODRIVER=dummy variable will emulate video driver, so no actual window will be rendered.
I think that caveats 1 and 4 are connected as some packages/system configs are missing, I am not sure what linux distros want, so help will be appreciated.
I am not sure how important Debian CI is, IMO, these 4 systems should cover the most of system-specific issues.
INSTALL.md seems OK, can be improved after we merge detectonic to main.
The last commit adds initialize only mode, which closes application once run a single cycle.
Basically, it added
-initalizeflag totexpressowhich will invoketexpresso_mainwithout loop, and alsopersistent_statehaveinitialize_onlyvalue, which is used bytexpresso_mainto quit its loop one the system is initialized.Passing
SDL_VIDEODRIVER=dummyvariable will emulate video driver, so no actual window will be rendered.
The -initialize flag makes sense (but maybe we should call it -test-initialize? to avoid confusing users, unless it has some purpose outside of pure testing), but I was thinking that using commands on stdin might be more general and allow for testing more specific behaviors in the future.
For instance echo '(exit)' | texpresso ... could be used for a similar effect, to exit immediately after initializing the main loop. Or echo '(cycle)'$'\n''(exit)' for faking a single cycle of the main loop. These commands do not exist, it is just some idea for a more generic design.
I think that caveats 1 and 4 are connected as some packages/system configs are missing, I am not sure what linux distros want, so help will be appreciated.
I am not sure how important Debian CI is, IMO, these 4 systems should cover the most of system-specific issues.
INSTALL.mdseems OK, can be improved after we mergedetectonictomain.
I can look at that when I have some free time, don't worry about making the various distros pass.
For instance echo '(exit)' | texpresso ... could be used for a similar effect, to exit immediately after initializing the main loop. >Or echo '(cycle)'$'\n''(exit)' for faking a single cycle of the main loop. These commands do not exist, it is just some idea for >a more generic design.
I like the idea! However, if we will use read from stdin only for this purpose it seems a bit too much, but for more comprehensive testing it could be better. We can implement this in the future version.
I can look at that when I have some free time, don't worry about making the various distros pass.
There was an issue with bunch of needless packages. Now CI takes approx 3 mins (except for macOS - 7 min). And every job successful (Yay!)
@let-def is there something I should implement in this PR as well?
Apologies. The PR is fine, I just have to find the time to review and merge it; plus I am bit wary of replacing the main branch with "detectonic", though this is not directly related to the PR.
Sorry making you wait.
No worries, we're not in a hurry.
I was asking just if it's worth implementing something in this PR, or maybe focus on other features.
If you have an idea what can be discussed/implemented feel free to ask.