Skip to content

GH Actions/tests: run tests against multiple libxml versions #849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 7, 2025

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Feb 27, 2025

Description

Background/Context

As @asispts hasn't been responding to the open feedback on PR #798 anymore AND the change proposed in #798 should go into the same release as PR #797 was merged in (to safeguard the changes from that PR) AND I haven't got permission to update the PR branch, I'm opening a new PR which supersedes PR #798.

Commits

GH Actions/tests: run tests against libxml >= 2.12

I've cherrypicked and squashed the pertinent changes from #798. Props @asispts.

GH Actions/test: iterate on libxml installation steps

This commit updates the initial implementation for updating libxml2 on the fly for select PHP versions.

Compared to the original implementation, the following changes were made:

  • Use a libxml_minor flag in the matrix to indicate whether libxml should be updated for a particular job or not.
    This libxml_minor flag also allows for specifying a specific minor to use for the update.
    This flag is now set on the linux PHP 8.0 and PHP 8.3 builds.
    Take note: PHP 8.4 is explicitly not used, as the tests are not run in this job for that version (they are run in the coverage job instead).
    In effect that meant that installing libxml on PHP 8.4 in the workflow, as per the original PR, wasn't safeguarding anything as without tests running, the tests couldn't fail.
  • Based on the libxml_minor flag, update the job name to make it clear when a particular job uses a non-default libxml version.
  • On the fly figure out what the latest relevant tag is for a certain libxml minor.
    This makes the workflow more flexible by:
    • Allowing for different minors.
    • Prevents having a specific patch version hard-coded in the workflow (maintenance issue).
  • Splits the sudo apt-get update command off to its own step as it is prone to intermittent failures.
  • Splits the "Install" step into two steps: one to download and compile, one to install the newly compiled libxml version.
    Doing this allows for caching the result of the compile step, diminishing the impact on the actions run time of compiling libxml.
  • Adds an (unconditional) "debug" step to allow for verifying which libxml version is being used in each job.

Suggested changelog entry

N/A

Related issues/external references

Follow up on #797 which fixed #767

Closes #798

@jrfnl jrfnl added this to the 3.12.0 milestone Feb 27, 2025
@jrfnl
Copy link
Member Author

jrfnl commented Feb 27, 2025

Note to self: branch protection will need to be updated before this can be merged.

asispts and others added 2 commits March 7, 2025 01:08
This commit updates the initial implementation for updating `libxml2` on the fly for select PHP versions.

Compared to the original implementation, the following changes were made:
* Use a `libxml_minor` flag in the matrix to indicate whether `libxml` should be updated for a particular job or not.
    This `libxml_minor` flag also allows for specifying a specific minor to use for the update.
    This flag is now set on the linux PHP 8.0 and PHP 8.3 builds.
    _Take note: PHP 8.4 is explicitly not used, as the tests are not run in this job for that version (they are run in the `coverage` job instead)._
    _In effect that meant that installing `libxml` on PHP 8.4 in the workflow, as per the original PR, wasn't safeguarding anything as without tests running, the tests couldn't fail._
* Based on the `libxml_minor` flag, update the job name to make it clear when a particular job uses a non-default `libxml` version.
* On the fly figure out what the latest relevant tag is for a certain `libxml` minor.
    This makes the workflow more flexible by:
    - Allowing for different minors.
    - Prevents having a specific patch version hard-coded in the workflow (maintenance issue).
* Splits the `sudo apt-get update` command off to its own step as it is prone to intermittent failures.
* Splits the "Install" step into two steps: one to download and compile, one to install the newly compiled `libxml` version.
    Doing this allows for caching the result of the compile step, diminishing the impact on the actions run time of compiling `libxml`.
* Adds an (unconditional) "debug" step to allow for verifying which `libxml` version is being used in each job.
@jrfnl jrfnl force-pushed the feature/ghactions-test-libxml-update branch from f650e11 to f7157d5 Compare March 7, 2025 00:08
@jrfnl jrfnl merged commit d0848bf into master Mar 7, 2025
59 checks passed
@jrfnl jrfnl deleted the feature/ghactions-test-libxml-update branch March 7, 2025 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests: make testBrokenRulesetMultiError() test compatible with LibXML 2.12+
3 participants