update checkout action #27
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "*" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
required: | |
name: Required | |
needs: | |
- ci | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check results | |
run: | | |
[[ ${{ needs.ci.result }} == 'success' ]] || exit 1; | |
ci: | |
name: CI | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-20.04 | |
- macos-12 | |
php-version: | |
- "8.1" | |
- "8.2" | |
- "8.3" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install libclang for Linux | |
if: matrix.os == 'ubuntu-20.04' | |
run: sudo apt-get install -y llvm-10-dev libclang-10-dev | |
- name: Setup libclang for Macos | |
if: matrix.os == 'macos-12' | |
run: | | |
brew install llvm@13 | |
echo "LIBCLANG_PATH=$(brew --prefix llvm@13)/lib" >> $GITHUB_ENV | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
tools: php-config | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Create Linux extension file (.so) | |
if: matrix.os == 'ubuntu-20.04' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: php-extension-${{ matrix.os }}-php${{ matrix.php-version }} | |
path: target/debug/libphp_ext_fs_notify.so | |
- name: Create Macos extension file (.dylib) | |
if: matrix.os == 'macos-12' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: php-extension-${{ matrix.os }}-php${{ matrix.php-version }} | |
path: target/debug/libphp_ext_fs_notify.dylib |