From 49c9f1b74bc18bee755575f70da5c7552920eb24 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sun, 26 Nov 2023 05:24:02 +0100 Subject: [PATCH] GH Actions: fix the build Builds against PHP 5.4 on Windows are failing. The failure happens even before the test run at the "Composer install" step. These failures look to be unrelated to this package, but seem to be related to PHP 5.4 trying to make an unsecured connection to Packagist and this no longer being supported. There may be ways to work around this, but I haven't been able to find one other than downloading a new certificate bundle and using that (not tested). Considering PHP 5.4 is ancient, I'm proposing to just drop the test runs against PHP 5.4 in combination with Windows. --- .github/workflows/integrationtest.yml | 9 +++++---- .github/workflows/quicktest.yml | 19 +++++++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/integrationtest.yml b/.github/workflows/integrationtest.yml index c40ef159..90efd395 100644 --- a/.github/workflows/integrationtest.yml +++ b/.github/workflows/integrationtest.yml @@ -48,6 +48,11 @@ jobs: - php: '5.5' composer: 'v1' os: 'windows-latest' + # Installing on Windows with PHP 5.4 runs into all sorts of problems (which are not ours). + # Considering PHP 5.4 is ancient, I deem it acceptable to exclude the Windows PHP 5.4 builds. + # @link https://github.com/PHPCSStandards/composer-installer/pull/213 + - php: '5.4' + os: 'windows-latest' include: # Composer 2.3 drops support for PHP < 7.2, so for PHP 5.4 to 7.1, `v2` will install @@ -125,10 +130,6 @@ jobs: env: fail-fast: true - - name: "Conditionally disable tls (Composer 1.x/Windows/PHP 5.4)" - if: ${{ matrix.os == 'windows-latest' && matrix.composer == 'v1' && matrix.php == '5.4' }} - run: composer config -- disable-tls true - # Install dependencies and handle caching in one go. # @link https://github.com/marketplace/actions/install-php-dependencies-with-composer - name: Install Composer dependencies diff --git a/.github/workflows/quicktest.yml b/.github/workflows/quicktest.yml index c8348456..0618eab5 100644 --- a/.github/workflows/quicktest.yml +++ b/.github/workflows/quicktest.yml @@ -35,6 +35,21 @@ jobs: - 'ubuntu-latest' - 'windows-latest' + # Installing on Windows with PHP 5.4 runs into all sorts of problems (which are not ours). + # Exclude the Windows PHP 5.4 builds and replace them with PHP 5.5/5.6 for the same. + # @link https://github.com/PHPCSStandards/composer-installer/issues/181 + # @link https://github.com/PHPCSStandards/composer-installer/pull/213 + exclude: + - php: '5.4' + os: 'windows-latest' + include: + - php: '5.5' + composer: 'v2' + os: 'windows-latest' + - php: '5.6' + composer: 'v1' + os: 'windows-latest' + name: "Quick test" steps: @@ -52,10 +67,6 @@ jobs: env: fail-fast: true - - name: "Conditionally disable tls (Composer 1.x/Windows/PHP 5.4)" - if: ${{ matrix.os == 'windows-latest' && matrix.composer == 'v1' && matrix.php == '5.4' }} - run: composer config -- disable-tls true - # Install dependencies and handle caching in one go. # @link https://github.com/marketplace/actions/install-php-dependencies-with-composer - name: Install Composer dependencies