type definitions #5
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: tests | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
tests: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: true | |
matrix: | |
php: ['8.1','8.2','8.3'] | |
ffi: ['','ffi'] | |
steps: | |
- name: Setup PHP ${{ matrix.php }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
# PHP Extras | |
coverage: none | |
tools: composer, phpunit:10.5 | |
#ini-values: "memory_limit=512M" | |
extensions: ${{ matrix.ffi }} | |
- name: Install Libs | |
run: | | |
if [ 'ffi' == '${{ matrix.ffi }}' ] ; then | |
sudo apt install -y libopenblas-base liblapacke | |
wget https://github.com/rindow/rindow-matlib/releases/download/1.0.0/rindow-matlib_1.0.0_amd64.deb | |
sudo apt install -y ./rindow-matlib_1.0.0_amd64.deb | |
sudo update-alternatives --set librindowmatlib.so /usr/lib/rindowmatlib-serial/librindowmatlib.so | |
fi | |
- name: Checkout codes | |
uses: "actions/checkout@v4" | |
- name: Checkout math-matrix tests | |
run: | | |
( cd .. && git clone https://github.com/rindow/rindow-math-matrix ) | |
( cd ../rindow-math-matrix && git checkout 2.0.3 ) | |
#- name: Composer | |
# uses: php-actions/composer@v6 | |
# with: | |
# php_version: ${{ matrix.php }} | |
# php_extensions: ffi | |
- name: Composer | |
run: composer update | |
- name: PHP Static Analysys | |
uses: php-actions/phpstan@v3 | |
with: | |
php_version: ${{ matrix.php }} | |
path: src/ | |
#- name: PHPUnit Tests | |
# uses: php-actions/phpunit@v3 | |
# with: | |
# configuration: tests/phpunit.xml | |
# version: 10.5 | |
# php_version: ${{ matrix.php }} | |
# php_extensions: ffi | |
# filter: ReleaseTest | |
- name: PHPUnit Tests with ${{ matrix.ffi }}. | |
run: phpunit -c tests |