diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index bd7f06c..3447649 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -1,25 +1,25 @@ name: 'Package' on: - pull_request: + pull_request: jobs: - package: - name: 'Package' - runs-on: 'ubuntu-20.04' - steps: - - name: 'Check out repository' - uses: 'actions/checkout@v2' - with: - path: 'ext' + package: + name: 'Package' + runs-on: 'ubuntu-22.04' + steps: + - name: 'Check out repository' + uses: 'actions/checkout@v4' + with: + path: 'ext' - - name: 'Install dependencies' - run: 'sudo apt-get -y install php7.4-dev libjudy-dev' + - name: 'Install dependencies' + run: 'sudo apt-get -y install php8.1-dev libjudy-dev' - - name: 'Package and verify package' - run: './ext/.github/workflows/package/package.sh' + - name: 'Package and verify package' + run: './ext/.github/workflows/package/package.sh' - - name: 'Archive package' - uses: 'actions/upload-artifact@v2' - with: - path: 'ext/memprof.tgz' + - name: 'Archive package' + uses: 'actions/upload-artifact@v3' + with: + path: 'ext/memprof.tgz' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 05a78c7..3757566 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,66 +1,72 @@ name: 'Tests' on: - push: - branches: - - v3 - pull_request: - schedule: - - cron: '30 8 * * 1' + push: + branches: + - v3 + pull_request: + schedule: + - cron: '30 8 * * 1' jobs: - tests: - name: 'Tests' - strategy: - matrix: - include: - - php: '8.1.0' - os: 'ubuntu-20.04' - expect_native: 1 - werror: 1 + tests: + name: 'Tests' + strategy: + matrix: + include: + - php: '8.1.0' + os: 'ubuntu-20.04' + expect_native: 1 + werror: 1 + xdebug: '3.1.2' - - php: '8.0.0' - os: 'ubuntu-20.04' - expect_native: 1 + - php: '8.1.0' + os: 'macos-13' + xdebug: '3.1.2' - - php: '8.1.0' - os: 'macos-10.15' + - php: '8.0.0' + os: 'ubuntu-20.04' + expect_native: 1 + xdebug: '3.1.2' - - php: '7.4.0' - os: 'ubuntu-20.04' - expect_native: 1 + - php: '7.4.0' + os: 'ubuntu-20.04' + expect_native: 1 + xdebug: '3.1.2' - - php: '7.3.0' - os: 'ubuntu-20.04' - expect_native: 1 + - php: '7.3.0' + os: 'ubuntu-20.04' + expect_native: 1 + xdebug: '3.1.2' - runs-on: ${{ matrix.os }} - continue-on-error: ${{ !!matrix.experimental }} - env: - PHP_VERSION: ${{ matrix.php }} - PHP_TAG: ${{ matrix.tag }} - MEMORY_CHECK: ${{ matrix.memcheck }} - WERROR: ${{ matrix.werror }} - MEMPROF_EXPECT_NATIVE_TRACKING: ${{ matrix.expect_native }} - steps: - - name: 'Check out repository' - uses: 'actions/checkout@v2' - with: - path: 'ext' + runs-on: ${{ matrix.os }} + continue-on-error: ${{ !!matrix.experimental }} + env: + PHP_VERSION: ${{ matrix.php }} + PHP_TAG: ${{ matrix.tag }} + MEMORY_CHECK: ${{ matrix.memcheck }} + WERROR: ${{ matrix.werror }} + MEMPROF_EXPECT_NATIVE_TRACKING: ${{ matrix.expect_native }} + XDEBUG_VERSION: ${{ matrix.xdebug }} + steps: + - name: 'Check out repository' + uses: 'actions/checkout@v4' + with: + path: 'ext' - - uses: actions/cache@v2 - with: - path: ~/build-cache/php - key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.memcheck }} + - uses: 'actions/cache@v3' + with: + path: '~/build-cache/php' + key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.memcheck }} - - name: 'Build PHP' - run: './ext/.github/workflows/test/build-php.sh' + - name: 'Build PHP' + run: './ext/.github/workflows/test/build-php.sh' - - name: 'Install xdebug' - run: './ext/.github/workflows/test/build-xdebug.sh' + - name: 'Install xdebug' + run: './ext/.github/workflows/test/build-xdebug.sh' - - name: 'Build extension' - run: './ext/.github/workflows/test/build-extension.sh' + - name: 'Build extension' + run: './ext/.github/workflows/test/build-extension.sh' - - name: 'Run tests' - run: './ext/.github/workflows/test/tests.sh' + - name: 'Run tests' + run: './ext/.github/workflows/test/tests.sh' diff --git a/.github/workflows/test/build-xdebug.sh b/.github/workflows/test/build-xdebug.sh index cf313e6..c48a863 100755 --- a/.github/workflows/test/build-xdebug.sh +++ b/.github/workflows/test/build-xdebug.sh @@ -5,7 +5,7 @@ set -e export PATH="$HOME/php/bin:$PATH" hash -r -git clone --depth 1 --branch "3.1.2" "https://github.com/xdebug/xdebug.git" +git clone --depth 1 --branch "${XDEBUG_VERSION}" "https://github.com/xdebug/xdebug.git" cd xdebug diff --git a/tests/dump-pprof.phpt b/tests/dump-pprof.phpt index feb6acb..9d1f9b2 100644 --- a/tests/dump-pprof.phpt +++ b/tests/dump-pprof.phpt @@ -24,4 +24,4 @@ binary=php://stdout 0x0000000000000038 memprof_dump_pprof --- --- profile -%s +%a