Skip to content

Commit

Permalink
Try this
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Feb 5, 2025
1 parent 67725a3 commit 34ee554
Showing 1 changed file with 26 additions and 13 deletions.
39 changes: 26 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
skip_tests: true

# yamllint disable-line rule:line-length
name: "PHP: ${{ matrix.php }} ${{ matrix.custom_ini && ' with custom ini settings' || '' }}${{ matrix.update_libxml && ' with updated libxml' || '' }} (${{ matrix.os == 'ubuntu-latest' && 'Linux' || 'Win' }})"
name: "PHP: ${{ matrix.php }} ${{ matrix.custom_ini && ' with custom ini settings' || '' }}${{ matrix.update_libxml && ' with libxml ${{ matrix.libxml_minor }}' || '' }} (${{ matrix.os == 'ubuntu-latest' && 'Linux' || 'Win' }})"

continue-on-error: ${{ matrix.php == '8.5' }}

Expand All @@ -99,24 +99,34 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

# Updating the lists can fail intermittently, typically after Microsoft has released a new package.
# This should not be blocking for this job, so ignore any errors from this step.
# Ref: https://github.com/dotnet/core/issues/4167
- name: Update the available packages list
continue-on-error: true
run: sudo apt-get update

# Once ubuntu-latest includes libxml2 >= v2.12.0, this step can be removed.
# - name: Update to latest libxml2 (linux only)
# if: ${{ matrix.update_libxml }}
# run: |
# /home/linuxbrew/.linuxbrew/bin/brew install libxml2

- name: Install libxml2 >= 2.12 (PHP 8.1+ on linux only)
# - name: Install libxml2 >= 2.12 (PHP 8.1+ on linux only)
# if: ${{ matrix.update_libxml }}
# run: |
# sudo apt-get install -y wget build-essential
# wget https://download.gnome.org/sources/libxml2/${{ matrix.libxml_minor }}/libxml2-${{ matrix.libxml_patch }}.tar.xz
# tar -xf libxml2-${{ matrix.libxml_patch }}.tar.xz
# cd libxml2-${{ matrix.libxml_patch }}
# ./configure --prefix=/usr/local
# make
# sudo make install
# sudo ldconfig

- name: Install xmllint
if: ${{ matrix.update_libxml }}
run: |
sudo apt-get update
sudo apt-get install -y wget build-essential
wget https://download.gnome.org/sources/libxml2/${{ matrix.libxml_minor }}/libxml2-${{ matrix.libxml_patch }}.tar.xz
tar -xf libxml2-${{ matrix.libxml_patch }}.tar.xz
cd libxml2-${{ matrix.libxml_patch }}
./configure --prefix=/usr/local
make
sudo make install
sudo ldconfig
run: sudo apt-get install --no-install-recommends -y libxml2-utils

- name: Setup ini config
id: set_ini
Expand All @@ -140,9 +150,12 @@ jobs:
coverage: none
tools: cs2pr

- name: "DEBUG: show libxml version"
- name: "DEBUG: show libxml version (php)"
run: php -r 'echo "libxml version = ", LIBXML_DOTTED_VERSION, PHP_EOL;'

- name: "DEBUG: show libxml version (xmllint)"
run: xmllint --version

# This action also handles the caching of the dependencies.
- name: Set up node
if: ${{ matrix.custom_ini == false }}
Expand Down

0 comments on commit 34ee554

Please sign in to comment.