Set up GitHub Actions (#104)

This commit is contained in:
Cees-Jan Kiewiet 2021-08-22 15:42:52 +02:00 committed by GitHub
parent 5f5281da24
commit 4608148622
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 46 deletions

37
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,37 @@
name: CI
on:
push:
pull_request:
jobs:
tests:
name: Tests (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- 8.0
- 7.4
- 7.3
- 7.2
- 7.1
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- run: |
# install 'libuv'
mkdir libuv
curl -L https://github.com/libuv/libuv/archive/v1.6.1.tar.gz | tar xzf -
cd libuv-1.6.1 && ./autogen.sh && ./configure --prefix=$(readlink -f `pwd`/../libuv) && make && make install
cd ..
# install 'php-uv'
phpize && ./configure --with-uv=$(readlink -f `pwd`/libuv)
make
sudo make install
echo "extension = uv.so" >> $(php -r 'echo php_ini_loaded_file();')
- run: php run-tests.php -p `which php` --offline --show-diff --set-timeout 120

View File

@ -1,33 +0,0 @@
language: php
sudo: true
php:
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- nightly
env:
global:
- REPORT_EXIT_STATUS=1
before_script:
- sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
before_install:
- chmod +x travis-install.sh
install: ./travis-install.sh
script:
- php run-tests.php -p `which php` --offline --show-diff --set-timeout 120
notifications:
email: false
irc:
channels:
- "irc.freenode.org#php-uv"
skip_join: true
use_notice: true

View File

@ -1,13 +0,0 @@
#!/bin/bash
set -e
set -o pipefail
# install 'libuv'
mkdir libuv
curl -L https://github.com/libuv/libuv/archive/v1.6.1.tar.gz | tar xzf -
cd libuv-1.6.1 && ./autogen.sh && ./configure --prefix=$(readlink -f `pwd`/../libuv) && make && make install
cd ..
#install 'php-uv'
phpize && ./configure --with-uv=$(readlink -f `pwd`/libuv) && make && make install
echo "extension = uv.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini