docs: update keepachangelog reference from 1.0.0 to 1.1.0 #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| linux: | |
| name: PHP ${{ matrix.php }} - libxl ${{ matrix.libxl }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.3', '8.4', '8.5'] | |
| libxl: ['5.1.0'] | |
| include: | |
| - php: '8.4' | |
| libxl: '4.6.0' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| tools: phpize, php-config | |
| - name: Cache LibXL | |
| id: cache-libxl | |
| uses: actions/cache@v5 | |
| with: | |
| path: libxl-${{ matrix.libxl }} | |
| key: libxl-lin-${{ matrix.libxl }}-v1 | |
| - name: Download LibXL | |
| if: steps.cache-libxl.outputs.cache-hit != 'true' | |
| run: | | |
| curl -fsSL "https://www.libxl.com/download/libxl-lin-${{ matrix.libxl }}.tar.gz" -o libxl.tar.gz | |
| tar xzf libxl.tar.gz | |
| # tarball extracts as libxl-X.Y.Z.0, normalize to libxl-X.Y.Z | |
| extracted=$(ls -d libxl-* | grep -v tar | head -1) | |
| if [ "$extracted" != "libxl-${{ matrix.libxl }}" ]; then | |
| mv "$extracted" "libxl-${{ matrix.libxl }}" | |
| fi | |
| ls libxl-${{ matrix.libxl }}/include_c/libxl.h | |
| - name: Build extension | |
| run: | | |
| phpize | |
| ./configure \ | |
| --with-excel \ | |
| --with-libxl-incdir=${{ github.workspace }}/libxl-${{ matrix.libxl }}/include_c \ | |
| --with-libxl-libdir=${{ github.workspace }}/libxl-${{ matrix.libxl }}/lib64 | |
| WARNINGS=$(make -j$(nproc) 2>&1 | tee /dev/stderr | grep -c 'warning:' || true) | |
| if [ "$WARNINGS" -gt 0 ]; then | |
| echo "::error::Build produced $WARNINGS warning(s)" | |
| exit 1 | |
| fi | |
| - name: Run tests | |
| if: matrix.libxl == '5.1.0' | |
| run: | | |
| export LD_LIBRARY_PATH="${{ github.workspace }}/libxl-${{ matrix.libxl }}/lib64" | |
| export TEST_PHP_EXECUTABLE=$(which php) | |
| export TEST_PHP_ARGS="-d extension=$(pwd)/modules/excel.so" | |
| export NO_INTERACTION=1 | |
| RESULT=$(php run-tests.php --show-diff -g FAIL,BORK,LEAK,XLEAK tests/ 2>&1) | |
| echo "$RESULT" | |
| FAILED=$(echo "$RESULT" | grep 'Tests failed' | grep -oP '\d+' | head -1) | |
| if [ "$FAILED" -gt 0 ]; then | |
| echo "::error::$FAILED test(s) failed" | |
| exit 1 | |
| fi | |
| asan: | |
| name: PHP ${{ matrix.php }} - ASAN | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.4'] | |
| env: | |
| ASAN_OPTIONS: exitcode=139:verify_asan_link_order=0:detect_odr_violation=0 | |
| UBSAN_OPTIONS: print_stacktrace=1 | |
| USE_ZEND_ALLOC: 0 | |
| USE_TRACKED_ALLOC: 1 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y llvm clang re2c bison autoconf | |
| - name: Build PHP with ASAN | |
| run: | | |
| git clone --depth=1 --branch=PHP-${{ matrix.php }} https://github.com/php/php-src.git /tmp/php-src | |
| cd /tmp/php-src | |
| ./buildconf --force | |
| CC=clang CXX=clang++ \ | |
| CFLAGS="-fsanitize=address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC" \ | |
| LDFLAGS="-fsanitize=address" \ | |
| ./configure \ | |
| --enable-debug \ | |
| --enable-zts \ | |
| --disable-all \ | |
| --enable-cli \ | |
| --prefix=/tmp/php-asan | |
| make -j$(nproc) | |
| make install | |
| - name: Cache LibXL | |
| id: cache-libxl | |
| uses: actions/cache@v5 | |
| with: | |
| path: libxl-5.1.0 | |
| key: libxl-lin-5.1.0-v1 | |
| - name: Download LibXL | |
| if: steps.cache-libxl.outputs.cache-hit != 'true' | |
| run: | | |
| curl -fsSL "https://www.libxl.com/download/libxl-lin-5.1.0.tar.gz" -o libxl.tar.gz | |
| tar xzf libxl.tar.gz | |
| extracted=$(ls -d libxl-* | grep -v tar | head -1) | |
| if [ "$extracted" != "libxl-5.1.0" ]; then | |
| mv "$extracted" "libxl-5.1.0" | |
| fi | |
| - name: Build extension with ASAN | |
| run: | | |
| export PATH="/tmp/php-asan/bin:$PATH" | |
| phpize | |
| CC=clang CXX=clang++ \ | |
| CFLAGS="-fsanitize=address -DZEND_TRACK_ARENA_ALLOC" \ | |
| LDFLAGS="-fsanitize=address" \ | |
| ./configure \ | |
| --with-excel \ | |
| --with-libxl-incdir=${{ github.workspace }}/libxl-5.1.0/include_c \ | |
| --with-libxl-libdir=${{ github.workspace }}/libxl-5.1.0/lib64 \ | |
| --with-php-config=/tmp/php-asan/bin/php-config | |
| make -j$(nproc) | |
| - name: Run tests under ASAN | |
| run: | | |
| export LD_LIBRARY_PATH="${{ github.workspace }}/libxl-5.1.0/lib64" | |
| export LD_PRELOAD=$(clang -print-file-name=libclang_rt.asan-x86_64.so):$(dpkg -L libstdc++-dev | grep 'libstdc++.so$' | head -1 || echo /usr/lib/x86_64-linux-gnu/libstdc++.so) | |
| export TEST_PHP_EXECUTABLE=/tmp/php-asan/bin/php | |
| export TEST_PHP_ARGS="-d extension=$(pwd)/modules/excel.so" | |
| export NO_INTERACTION=1 | |
| /tmp/php-asan/bin/php run-tests.php --show-diff --asan -g FAIL,BORK,LEAK,XLEAK tests/ 2>&1 | tee /tmp/test-output.txt || true | |
| if grep -qP 'Tests failed\s*:\s*[1-9]' /tmp/test-output.txt; then | |
| echo "::error::Tests failed under ASAN" | |
| exit 1 | |
| fi |