chore(deps): update actions/checkout action to v4.1.4 #134
Workflow file for this run
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: | |
push: | |
workflow_dispatch: | |
env: | |
CFLAGS: "-O2 -Wall -Werror" | |
jobs: | |
ci: | |
permissions: | |
contents: read | |
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') || github.event_name == 'workflow_dispatch' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
php: | |
- '7.4' | |
- '8.0' | |
- '8.1' | |
- '8.2' | |
- '8.3' | |
- 'nightly' | |
features: | |
- "--with-cap --without-capng" | |
- "--without-cap --with-capng" | |
name: "Build and Test (PHP ${{ matrix.php }}, ${{ matrix.features }})" | |
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: Install build dependencies | |
run: sudo apt-get -qq update && sudo apt-get -qq install libcap-dev libcap-ng-dev | |
- name: Add error matcher | |
run: echo "::add-matcher::$(pwd)/.github/problem-matcher-gcc.json" | |
- name: Build | |
run: phpize && ./configure ${{ matrix.features }} --silent && make --silent | |
working-directory: chuid | |
- name: Copy posix extension | |
run: | | |
if [ -f "$(php-config --extension-dir)/posix.so" ]; then | |
cp $(php-config --extension-dir)/posix.so chuid/modules | |
fi | |
- name: Update PHP test runner if necessary | |
run: | | |
if ! php -r 'exit((int)(PHP_VERSION_ID < 80200));'; then | |
cp -f helpers/run-tests.php chuid/run-tests.php | |
fi | |
- name: Set DOCUMENT_ROOT for CGI tests | |
run: echo "DOCUMENT_ROOT=$(pwd)/chuid" >> "${GITHUB_ENV}" | |
- name: Run tests | |
run: sudo -E make test | |
env: | |
NO_INTERACTION: "1" | |
REPORT_EXIT_STATUS: "1" | |
working-directory: chuid |