macos CI #52
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: | |
pull_request: | |
jobs: | |
linux: | |
name: Linux CI (PHP ${{ matrix.php }} on ${{ matrix.os }} [${{ matrix.arch }}]) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
arch: | |
- x64 | |
os: | |
- ubuntu-22.04 | |
php: | |
- '8.2' | |
- '8.3' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
ini-values: extension=ardillo | |
- name: Fetch libui-ng | |
run: git submodule update --init | |
- name: Build extension | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev xvfb | |
phpize | |
./configure | |
make -j | |
sudo make install | |
ls -al modules | |
- name: Check for PHP startup warnings | |
run: | | |
xvfb-run -a php -ddisplay_errors=stderr -ddisplay_startup_errors=1 -derror_reporting=-1 -r ';' 2>/tmp/php-startup-warnings | |
if [ -s /tmp/php-startup-warnings ]; then | |
echo 'The PHP extension was successfully installed, but PHP raised these warnings:' >&2 | |
cat /tmp/php-startup-warnings >&2 | |
exit 1 | |
fi | |
echo "PHP didn't raise any warnings at startup." | |
- name: Inspect extension | |
run: xvfb-run -a php --ri ardillo | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ardillo_php-${{ matrix.php }}_${{ matrix.os }}_${{ matrix.arch }}.so | |
path: modules/ardillo.so | |
windows: | |
name: Windows CI (PHP ${{ matrix.php }} on ${{ matrix.os }} [${{ matrix.arch }}]) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
arch: | |
- x64 | |
os: | |
- windows-2022 | |
php: | |
- '8.2' | |
- '8.3' | |
ts: | |
- nts | |
- ts | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: php/setup-php-sdk@v0.8 | |
id: setup-php | |
with: | |
version: ${{ matrix.php }} | |
arch: ${{ matrix.arch }} | |
ts: ${{ matrix.ts }} | |
- name: Fetch libui-ng | |
run: git submodule update --init | |
- name: Setup MSVC | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: ${{ matrix.arch }} | |
toolset: ${{ steps.setup-php.outputs.toolset }} | |
- name: Build extension | |
run: | | |
phpize | |
cmd.exe /c configure.bat | |
nmake | |
nmake install | |
- name: Check for PHP startup warnings | |
run: php -dextension=ardillo -ddisplay_errors=stderr -ddisplay_startup_errors=1 -derror_reporting=-1 -r ';' | |
- name: Inspect extension | |
run: php -dextension=ardillo --ri ardillo | |
- name: Prepare artifacts | |
run: | | |
md artifacts | |
Get-ChildItem -Recurse -Filter "php_ardillo.dll" | ForEach-Object {Copy-Item -Path $_.FullName -Destination "artifacts"} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ardillo_php-${{ matrix.php }}_${{ matrix.os }}_${{ matrix.arch }}_${{ matrix.ts }}.dll | |
path: artifacts/php_ardillo.dll | |
macos: | |
name: MacOS CI (PHP ${{ matrix.php }} on ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- macos-12 | |
- macos-13 | |
- macos-14 | |
php: | |
- '8.2' | |
- '8.3' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
ini-values: extension=ardillo | |
- name: Fetch libui-ng | |
run: git submodule update --init | |
- name: Build extension | |
run: | | |
phpize | |
./configure | |
make -j | |
make install | |
ls -al modules | |
- name: Check for PHP startup warnings | |
run: | | |
php -ddisplay_errors=stderr -ddisplay_startup_errors=1 -derror_reporting=-1 -r ';' | |
- name: Inspect extension | |
run: php --ri ardillo | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ardillo_php-${{ matrix.php }}_${{ matrix.os }}.so | |
path: modules/ardillo.so |