Skip to content

Commit

Permalink
add publish
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikbosch committed Jun 11, 2024
1 parent 4c17f6d commit 0731897
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

name: Publish

on:
push:
branches: [ "main" ]
tags: [ "**" ]

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@v2

- 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 --release

- name: Create extension file (.so)
uses: actions/upload-artifact@v4
with:
name: php-extension-${{ matrix.os }}-${{ matrix.php-version }}
path: target/release/libphp_ext_fs_notify.so

0 comments on commit 0731897

Please sign in to comment.