Skip to content

NDArray::poisson() 'Argument #2 ($lam) must be of type float, float g… #61

NDArray::poisson() 'Argument #2 ($lam) must be of type float, float g…

NDArray::poisson() 'Argument #2 ($lam) must be of type float, float g… #61

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- "master"
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
test:
name: PHP 8.2
# The type of runner that the job will run on
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install PHP requirements
run: |
sudo apt-get update && \
sudo apt-get install -y \
build-essential \
autoconf \
libssl-dev \
libxml2-dev \
libsqlite3-dev \
zlib1g-dev \
libonig-dev \
libbz2-dev \
libcurl4-openssl-dev \
libjpeg-dev \
libpng-dev \
libzip-dev \
libwebp-dev \
libxpm-dev \
libfreetype6-dev \
liblapacke-dev \
libopenblas-dev
- name: Compile PHP
run: |
sudo mkdir /src
cd /src
sudo apt-get install -y wget
sudo wget -O php.tar.gz https://www.php.net/distributions/php-8.2.0.tar.gz
sudo tar -xf php.tar.gz --strip-components=1
sudo rm php.tar.gz
sudo ./configure \
--prefix=/usr/local/php \
--with-config-file-path=/usr/local/php/etc \
--enable-debug \
--with-jpeg \
--with-webp \
--with-freetype \
&& sudo make -j$(nproc) \
&& sudo make install
- name: Install extension
run: |
cd ${{ github.workspace }}
phpize
./configure
sudo make install
sudo mkdir /usr/local/php/etc
sudo mkdir /usr/local/php/etc/conf.d
sudo chmod 0777 /usr/local/php/etc/conf.d
sudo echo "extension=ndarray.so" > /usr/local/php/etc/conf.d/ndarray.ini
- name: Run Tests
run: |
export USE_ZEND_ALLOC=0
sudo make test
# This workflow contains a single job called "build"
test_leak:
name: PHP 8.2 - Leak Test
# The type of runner that the job will run on
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install PHP requirements
run: |
sudo apt-get update && \
sudo apt-get install -y \
build-essential \
autoconf \
libssl-dev \
libxml2-dev \
libsqlite3-dev \
zlib1g-dev \
libonig-dev \
libbz2-dev \
libcurl4-openssl-dev \
libjpeg-dev \
libpng-dev \
libzip-dev \
libwebp-dev \
libxpm-dev \
libfreetype6-dev \
liblapacke-dev \
libopenblas-dev
- name: Compile PHP
run: |
sudo mkdir /src
cd /src
sudo apt-get install -y wget
sudo wget -O php.tar.gz https://www.php.net/distributions/php-8.2.0.tar.gz
sudo tar -xf php.tar.gz --strip-components=1
sudo rm php.tar.gz
sudo ./configure \
--prefix=/usr/local/php \
--with-config-file-path=/usr/local/php/etc \
--enable-debug \
--with-jpeg \
--with-webp \
--with-freetype \
&& sudo make -j$(nproc) \
&& sudo make install
- name: Install extension
run: |
cd ${{ github.workspace }}
phpize
./configure
sudo make install
sudo mkdir /usr/local/php/etc
sudo mkdir /usr/local/php/etc/conf.d
sudo chmod 0777 /usr/local/php/etc/conf.d
sudo echo "extension=ndarray.so" > /usr/local/php/etc/conf.d/ndarray.ini
- name: Run Tests
run: |
export NDARRAY_FREEBUFFER=1
export USE_ZEND_ALLOC=1
sudo make test