Camera #121
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: VISU CI | |
on: | |
push: | |
branches: [ '*' ] | |
pull_request: | |
branches: [ '*' ] | |
jobs: | |
ubuntu: | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: ['ubuntu-latest'] | |
php-versions: ['8.1', '8.2'] | |
phpunit-versions: ['9.6'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: :glfw | |
coverage: xdebug | |
tools: cs2pr, phpunit:${{ matrix.phpunit-versions }} | |
- name: Install dependenies | |
run: sudo apt-get update && sudo apt-get install -y php-dev build-essential cmake libglfw3-dev xvfb libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev gdb | |
- name: Build PHP-GLFW | |
run: > | |
git clone https://github.com/mario-deluna/php-glfw && | |
cd php-glfw && | |
sudo phpize && | |
./configure --enable-glfw && | |
make -j$(nproc) && | |
sudo make install && | |
cd ../ && | |
grep -qxF 'extension=glfw.so' /etc/php/${{ matrix.php-versions }}/cli/php.ini || | |
echo 'extension=glfw.so' >> /etc/php/${{ matrix.php-versions }}/cli/php.ini | |
- name: Run composer install | |
run: composer install | |
#- name: Install PHPUnit | |
# run: composer require "phpunit/phpunit" | |
- name: Run PHPUnit | |
run: xvfb-run --auto-servernum phpunit | |
- name: Run PHPStan | |
if: ${{ matrix.php-versions == '8.2' }} | |
run: php vendor/bin/phpstan analyse src --error-format=github -l8 | |