From 62fae569ad086ea8b5f3154c47da2e1e8c3e7e5f Mon Sep 17 00:00:00 2001 From: Henrique Borba Date: Tue, 25 Jul 2023 14:24:57 -0300 Subject: [PATCH] feat: Base CI file --- .github/workflows/main.yml | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..45c055b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,58 @@ +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" + build: + 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: Compile PHP + run: | + apt-get install -y wget + wget -O php.tar.gz https://www.php.net/distributions/php-8.2.0.tar.gz + tar -xf php.tar.gz --strip-components=1 + rm php.tar.gz + ./configure \ + --prefix=/usr/local/php \ + --with-config-file-path=/usr/local/php/etc \ + --enable-debug \ + --enable-mbstring \ + --with-curl \ + --with-openssl \ + --with-libxml \ + --with-pdo-mysql \ + --with-pdo-sqlite \ + --with-sqlite3 \ + --with-zlib \ + --with-bz2 \ + --with-jpeg \ + --with-webp \ + --with-xpm \ + --with-freetype \ + --with-zip \ + && make -j$(nproc) \ + && make install + + - name: Install extension + run: | + cd ${{ github.workspace }} + ${{ github.workspace }}/php/bin/phpize + ./configure + make install + echo "extension=ndarray.so" > ${{ github.workspace }}/php/etc/conf.d/ndarray.ini + + - name: Run Tests + run: | + cd ${{ github.workspace }} + make test \ No newline at end of file