This commit is contained in:
Michael Graeb
2022-11-10 16:39:55 -08:00
parent 541b3c8952
commit 0f66f5cb1b
+107 -114
View File
@@ -14,75 +14,75 @@ env:
RUN: ${{ github.run_id }}-${{ github.run_number }} RUN: ${{ github.run_id }}-${{ github.run_number }}
jobs: jobs:
php-5_5-linux-x64: # php-5_5-linux-x64:
name: php-linux-x64 (5.5) # name: php-linux-x64 (5.5)
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- name: Setup PHP with Xdebug # - name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2 # uses: shivammathur/setup-php@v2
with: # with:
coverage: xdebug # coverage: xdebug
php-version: 5.5 # php-version: 5.5
ini-values: xdebug.overload_var_dump=0, memory_limit=4G, phar.readonly=false # ini-values: xdebug.overload_var_dump=0, memory_limit=4G, phar.readonly=false
- name: Checkout # - name: Checkout
uses: actions/checkout@v2 # uses: actions/checkout@v2
with: # with:
submodules: recursive # submodules: recursive
- name: Install ancient PHPUnit # - name: Install ancient PHPUnit
run: composer require --dev --ignore-platform-reqs phpunit/phpunit "4.8.36" # run: composer require --dev --ignore-platform-reqs phpunit/phpunit "4.8.36"
- name: Install dependencies # - name: Install dependencies
run: composer update --no-interaction # run: composer update --no-interaction
- name: Build for PHP 5.5 # - name: Build for PHP 5.5
env: # env:
CC: clang # CC: clang
CXX: clang++ # CXX: clang++
run: | # run: |
phpize # phpize
./configure # ./configure
make # make
php-linux-x64: # php-linux-x64:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
strategy: # strategy:
fail-fast: false # fail-fast: false
matrix: # matrix:
version: # version:
- "5.6" # - "5.6"
- "7.0" # - "7.0"
- "7.1" # - "7.1"
- "7.2" # - "7.2"
- "7.3" # - "7.3"
- "7.4" # - "7.4"
- "8.0" # - "8.0"
steps: # steps:
- name: Setup PHP with Xdebug # - name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2 # uses: shivammathur/setup-php@v2
with: # with:
coverage: xdebug # coverage: xdebug
php-version: ${{matrix.version}} # php-version: ${{matrix.version}}
ini-values: xdebug.overload_var_dump=0, memory_limit=4G, phar.readonly=false # ini-values: xdebug.overload_var_dump=0, memory_limit=4G, phar.readonly=false
- name: Checkout # - name: Checkout
uses: actions/checkout@v2 # uses: actions/checkout@v2
with: # with:
submodules: recursive # submodules: recursive
- name: Install dependencies # - name: Install dependencies
run: composer update --no-interaction # run: composer update --no-interaction
- name: Run tests # - name: Run tests
env: # env:
CC: clang # CC: clang
CXX: clang++ # CXX: clang++
run: | # run: |
phpize # phpize
./configure # ./configure
make # make
make test # make test
# linux-arm: # linux-arm:
@@ -98,59 +98,52 @@ jobs:
# chmod a+x builder # chmod a+x builder
# ./builder build -p ${{ env.PACKAGE_NAME }} --target=linux-${{ matrix.arch }} --spec=downstream # ./builder build -p ${{ env.PACKAGE_NAME }} --target=linux-${{ matrix.arch }} --spec=downstream
# windows-vc16: windows:
# runs-on: windows-latest runs-on: windows-2019
# strategy: defaults:
# matrix: run:
# arch: [x64] shell: cmd # TODO: does this matter?
# steps:
# - uses: ilammy/msvc-dev-cmd@v1
# with:
# arch: ${{ matrix.arch }}
# uwp: false
# spectre: true
# - name: Build ${{ env.PACKAGE_NAME }} + consumers
# run: |
# python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
# python builder.pyz build -p ${{ env.PACKAGE_NAME }} --spec=downstream
# windows-vc14:
# runs-on: windows-latest
# strategy:
# matrix:
# arch: [x86, x64]
# steps:
# - uses: ilammy/msvc-dev-cmd@v1
# with:
# toolset: 14.0
# arch: ${{ matrix.arch }}
# uwp: false
# spectre: true
# - name: Build ${{ env.PACKAGE_NAME }} + consumers
# run: |
# python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
# python builder.pyz build -p ${{ env.PACKAGE_NAME }} downstream
macos:
runs-on: macos-${{ matrix.version }}
strategy: strategy:
matrix: matrix:
version: [10.15] arch: [x64] # TODO: add x86
steps: steps:
# Force PHP to 8.0 - id: setup-php-sdk
# Doing this because tests fail in PHP 8.1 (default on macos Github Runner as of Dec 2021) uses: cmb69/[email protected]
# due to the old version of PHPUnit we're using. with:
# We're using an old PHPUnit because it's compatible our min supported PHP 5.5. version: '8.0'
# Quick fix is to force PHP version back to 8.0, which can still run our tests without error. arch: x64
# A real solution is to get our tests working on all PHP versions ts: ts
# (maybe don't use PHPUnit, maybe raise our min supported PHP version so we can upgrade, - uses: ilammy/msvc-dev-cmd@v1
# or maybe use PHPUnit-Polyfills so we can use a modern PHPUnit with old PHP) with:
- name: Setup PHP 8.0 arch: ${{ matrix.arch }}
uses: shivammathur/setup-php@v2 toolset: ${{steps.setup-php-sdk.outputs.toolset}}
with: - name: Build ${{ env.PACKAGE_NAME }}
php-version: '8.0' run: |
- name: Build PHP 8 extension and test phpize
run: | configure
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')" nmake
chmod a+x builder nmake test
./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream
# macos:
# runs-on: macos-${{ matrix.version }}
# strategy:
# matrix:
# version: [10.15]
# steps:
# # Force PHP to 8.0
# # Doing this because tests fail in PHP 8.1 (default on macos Github Runner as of Dec 2021)
# # due to the old version of PHPUnit we're using.
# # We're using an old PHPUnit because it's compatible our min supported PHP 5.5.
# # Quick fix is to force PHP version back to 8.0, which can still run our tests without error.
# # A real solution is to get our tests working on all PHP versions
# # (maybe don't use PHPUnit, maybe raise our min supported PHP version so we can upgrade,
# # or maybe use PHPUnit-Polyfills so we can use a modern PHPUnit with old PHP)
# - name: Setup PHP 8.0
# uses: shivammathur/setup-php@v2
# with:
# php-version: '8.0'
# - name: Build PHP 8 extension and test
# run: |
# python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
# chmod a+x builder
# ./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream