From 3310914fd2cf4421a9e3c7bd8f1328344252025a Mon Sep 17 00:00:00 2001 From: Asis Pattisahusiwa <79239132+asispts@users.noreply.github.com> Date: Sat, 25 Jan 2025 17:36:12 +0700 Subject: [PATCH 01/10] Run tests against libxml >= 2.12 --- .github/workflows/test.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3d9d758301..42f2b3b30b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,6 +51,9 @@ jobs: # Keys: # - custom_ini: Whether to run with specific custom ini settings to hit very specific # code conditions. + + # Don't cancel in-progress matrix jobs + fail-fast: false matrix: os: ['ubuntu-latest', 'windows-latest'] php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] @@ -93,6 +96,20 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + # A temporary solution + - name: Install libxml2 >= 2.12 (PHP 8.1+ on linux only) + if: ${{ matrix.os == 'ubuntu-latest' && contains(fromJSON('["8.1", "8.2", "8.3"]'), matrix.php) }} + run: | + sudo apt-get update + sudo apt-get install -y wget build-essential + wget https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.9.tar.xz + tar -xf libxml2-2.12.9.tar.xz + cd libxml2-2.12.9 + ./configure --prefix=/usr/local + make + sudo make install + sudo ldconfig + - name: Setup ini config id: set_ini shell: bash From bcc81fcbe62164b7917437b798f1734b126c5a7f Mon Sep 17 00:00:00 2001 From: Asis Pattisahusiwa <79239132+asispts@users.noreply.github.com> Date: Sat, 25 Jan 2025 21:50:12 +0700 Subject: [PATCH 02/10] Fix yaml format --- .github/workflows/test.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 42f2b3b30b..b64148b87f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -96,19 +96,19 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # A temporary solution - - name: Install libxml2 >= 2.12 (PHP 8.1+ on linux only) - if: ${{ matrix.os == 'ubuntu-latest' && contains(fromJSON('["8.1", "8.2", "8.3"]'), matrix.php) }} - run: | - sudo apt-get update - sudo apt-get install -y wget build-essential - wget https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.9.tar.xz - tar -xf libxml2-2.12.9.tar.xz - cd libxml2-2.12.9 - ./configure --prefix=/usr/local - make - sudo make install - sudo ldconfig + # A temporary solution + - name: Install libxml2 >= 2.12 (PHP 8.1+ on linux only) + if: ${{ matrix.os == 'ubuntu-latest' && contains(fromJSON('["8.1", "8.2", "8.3"]'), matrix.php) }} + run: | + sudo apt-get update + sudo apt-get install -y wget build-essential + wget https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.9.tar.xz + tar -xf libxml2-2.12.9.tar.xz + cd libxml2-2.12.9 + ./configure --prefix=/usr/local + make + sudo make install + sudo ldconfig - name: Setup ini config id: set_ini From ceb01ebd943cbc078a7c4e0958fdf39f90a7b4f5 Mon Sep 17 00:00:00 2001 From: Asis Pattisahusiwa <79239132+asispts@users.noreply.github.com> Date: Mon, 27 Jan 2025 20:36:43 +0700 Subject: [PATCH 03/10] Remove fail-fast --- .github/workflows/test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b64148b87f..f72b8214f0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,9 +51,6 @@ jobs: # Keys: # - custom_ini: Whether to run with specific custom ini settings to hit very specific # code conditions. - - # Don't cancel in-progress matrix jobs - fail-fast: false matrix: os: ['ubuntu-latest', 'windows-latest'] php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] From b54082e3fb5d844e449d316f3f0f4e2e328e7202 Mon Sep 17 00:00:00 2001 From: Asis Pattisahusiwa <79239132+asispts@users.noreply.github.com> Date: Mon, 27 Jan 2025 20:46:31 +0700 Subject: [PATCH 04/10] Install libxml2 via homebrew --- .github/workflows/test.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f72b8214f0..f335e82a00 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -93,19 +93,15 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # A temporary solution - - name: Install libxml2 >= 2.12 (PHP 8.1+ on linux only) - if: ${{ matrix.os == 'ubuntu-latest' && contains(fromJSON('["8.1", "8.2", "8.3"]'), matrix.php) }} + # This is a temporary solution. + # Once ubuntu-latest includes the latest libxml2 version, this step can be removed. + - name: Install latest libxml2 on PHP 8.4 (linux only) + if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.4' }} run: | - sudo apt-get update - sudo apt-get install -y wget build-essential - wget https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.9.tar.xz - tar -xf libxml2-2.12.9.tar.xz - cd libxml2-2.12.9 - ./configure --prefix=/usr/local - make - sudo make install - sudo ldconfig + export HOMEBREW_NO_ANALYTICS=1 + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH + brew install libxml2 - name: Setup ini config id: set_ini From e25ee62f386f33fecb4404f67eacd3423fe630e5 Mon Sep 17 00:00:00 2001 From: Asis Pattisahusiwa <79239132+asispts@users.noreply.github.com> Date: Mon, 27 Jan 2025 20:55:34 +0700 Subject: [PATCH 05/10] Separate install libxml2 steps --- .github/workflows/test.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f335e82a00..e8637b3c40 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -95,12 +95,18 @@ jobs: # This is a temporary solution. # Once ubuntu-latest includes the latest libxml2 version, this step can be removed. - - name: Install latest libxml2 on PHP 8.4 (linux only) + - name: Install homebrew if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.4' }} run: | export HOMEBREW_NO_ANALYTICS=1 - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + + # This is a temporary solution. + # Once ubuntu-latest includes the latest libxml2 version, this step can be removed. + - name: Install latest libxml2 on PHP 8.4 (linux only) + if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.4' }} + run: | brew install libxml2 - name: Setup ini config From be3c27f51fb377b80174bb57977e78eef5625b81 Mon Sep 17 00:00:00 2001 From: Asis Pattisahusiwa <79239132+asispts@users.noreply.github.com> Date: Mon, 27 Jan 2025 21:07:57 +0700 Subject: [PATCH 06/10] Fix yaml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e8637b3c40..008f22171b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -99,7 +99,7 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.4' }} run: | export HOMEBREW_NO_ANALYTICS=1 - echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH + echo '/home/linuxbrew/.linuxbrew/bin' >> $GITHUB_PATH /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # This is a temporary solution. From 19bf218ef93461b6652d0b4ed09bee598e6dc2e8 Mon Sep 17 00:00:00 2001 From: Asis Pattisahusiwa <79239132+asispts@users.noreply.github.com> Date: Mon, 27 Jan 2025 21:36:14 +0700 Subject: [PATCH 07/10] Update steps --- .github/workflows/test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 008f22171b..6abf72952f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -101,9 +101,6 @@ jobs: export HOMEBREW_NO_ANALYTICS=1 echo '/home/linuxbrew/.linuxbrew/bin' >> $GITHUB_PATH /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - - # This is a temporary solution. - # Once ubuntu-latest includes the latest libxml2 version, this step can be removed. - name: Install latest libxml2 on PHP 8.4 (linux only) if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.4' }} run: | From 0ce96c6cac0f527a1825f08a0e8d75087613e310 Mon Sep 17 00:00:00 2001 From: Asis Pattisahusiwa <79239132+asispts@users.noreply.github.com> Date: Mon, 27 Jan 2025 21:44:57 +0700 Subject: [PATCH 08/10] Use double quote --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6abf72952f..79ce1e768a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -99,7 +99,7 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.4' }} run: | export HOMEBREW_NO_ANALYTICS=1 - echo '/home/linuxbrew/.linuxbrew/bin' >> $GITHUB_PATH + echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - name: Install latest libxml2 on PHP 8.4 (linux only) if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.4' }} From ad85bfa1ed8b9e6801a95b0d73616c43d40e6a75 Mon Sep 17 00:00:00 2001 From: Asis Pattisahusiwa <79239132+asispts@users.noreply.github.com> Date: Tue, 28 Jan 2025 21:01:13 +0700 Subject: [PATCH 09/10] Update comment and fix yaml --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 79ce1e768a..b8a622ac3d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -94,12 +94,12 @@ jobs: uses: actions/checkout@v4 # This is a temporary solution. - # Once ubuntu-latest includes the latest libxml2 version, this step can be removed. + # Once ubuntu-latest includes libxml2 >= v2.12.0, this and the following steps can be removed. - name: Install homebrew if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.4' }} run: | export HOMEBREW_NO_ANALYTICS=1 - echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH + echo "/home/linuxbrew/.linuxbrew/bin" >> "$GITHUB_PATH" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - name: Install latest libxml2 on PHP 8.4 (linux only) if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.4' }} From 1d715e394c7c89f2981a9edccb9d2f5a866e0b22 Mon Sep 17 00:00:00 2001 From: Asis Pattisahusiwa <79239132+asispts@users.noreply.github.com> Date: Wed, 29 Jan 2025 06:15:05 +0700 Subject: [PATCH 10/10] Use pre-installed homebrew --- .github/workflows/test.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8a622ac3d..62b799ce55 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -94,17 +94,11 @@ jobs: uses: actions/checkout@v4 # This is a temporary solution. - # Once ubuntu-latest includes libxml2 >= v2.12.0, this and the following steps can be removed. - - name: Install homebrew - if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.4' }} - run: | - export HOMEBREW_NO_ANALYTICS=1 - echo "/home/linuxbrew/.linuxbrew/bin" >> "$GITHUB_PATH" - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + # Once ubuntu-latest includes libxml2 >= v2.12.0, this step can be removed. - name: Install latest libxml2 on PHP 8.4 (linux only) if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.4' }} run: | - brew install libxml2 + /home/linuxbrew/.linuxbrew/bin/brew install libxml2 - name: Setup ini config id: set_ini