Merge pull request #66 from sjinks/renovate/shivammathur-setup-php-2.x #150
This file contains 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: | |
push: | |
branches: | |
- "**" | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
ci: | |
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') || github.event_name == 'workflow_dispatch' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: | |
- CC: clang | |
CFLAGS: "-O2 -g3 -Wall -Werror -Wno-unknown-pragmas -Wno-implicit-const-int-float-conversion -Wno-unused-function" | |
- CC: gcc | |
CFLAGS: "-O2 -g3 -Wall -Werror -Wno-unknown-pragmas" | |
php: | |
- '7.1' | |
- '7.2' | |
- '7.3' | |
- '7.4' | |
- '8.0' | |
- '8.1' | |
- '8.2' | |
name: "Build and Test (PHP ${{ matrix.php }}, CC: ${{ matrix.compiler.CC }})" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the source code | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@c665c7a15b5295c2488ac8a87af9cb806cd72198 # 2.30.4 | |
with: | |
php-version: ${{ matrix.php }} | |
tools: none | |
- name: Build | |
run: phpize && ./configure CFLAGS="${{ matrix.compiler.CFLAGS }}" CC=${{ matrix.compiler.CC }} --silent && make --silent | |
- name: Run tests | |
run: make test | |
env: | |
NO_INTERACTION: "1" | |
REPORT_EXIT_STATUS: "1" |