Merge pull request #14 from Frederick888/php84 into master #25
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: Build and Test | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| push: | |
| branches: | |
| - "master" | |
| tags-ignore: | |
| - "*" | |
| env: | |
| NO_INTERACTION: 1 | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| php-version: ["8.4", "8.3", "8.2", "8.1", "8.0", "7.4", "7.3"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cancel Previous Runs | |
| if: contains(matrix.os, 'ubuntu') && contains(matrix.php-version, '8.4') | |
| uses: styfle/cancel-workflow-action@0.11.0 | |
| with: | |
| access_token: ${{ github.token }} | |
| - name: Install Linux Dependencies | |
| if: contains(matrix.os, 'ubuntu') | |
| run: sudo apt-get install -y autoconf build-essential gcc g++ valgrind | |
| - name: Install PHP | |
| id: install_php | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| tools: phpize | |
| - name: Build | |
| run: | | |
| phpize | |
| ./configure --enable-bencode | |
| make -j$(nproc) | |
| - name: Test | |
| run: | | |
| chmod 600 ./.valgrindrc | |
| make test TESTS="-m" |