texpresso icon indicating copy to clipboard operation
texpresso copied to clipboard

feat: Add CI, update INSTALL.md

Open merv1n34k opened this issue 5 months ago • 9 comments

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, but texlive CI 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 for texpresso-frontend, I am not sure what will be most elegant way to do it, thinking something like passing option --headless to texpresso might be a solution, but other ideas are welcome.~ Edit: see comment below
  • ~tectonic installation 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.md might need some rewording or more clarification (should be done in this/following PR)

merv1n34k avatar Jul 28 '25 14:07 merv1n34k

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.

merv1n34k avatar Jul 29 '25 07:07 merv1n34k

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.

merv1n34k avatar Jul 29 '25 08:07 merv1n34k

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.

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.

let-def avatar Aug 03 '25 23:08 let-def

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.

I can look at that when I have some free time, don't worry about making the various distros pass.

let-def avatar Aug 03 '25 23:08 let-def

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.

merv1n34k avatar Aug 04 '25 06:08 merv1n34k

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!)

merv1n34k avatar Aug 04 '25 06:08 merv1n34k

@let-def is there something I should implement in this PR as well?

merv1n34k avatar Sep 14 '25 09:09 merv1n34k

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.

let-def avatar Sep 17 '25 01:09 let-def

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.

merv1n34k avatar Sep 17 '25 07:09 merv1n34k