From 46081486221004398f3cb5a1be250d65194bbad3 Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Sun, 22 Aug 2021 15:42:52 +0200 Subject: [PATCH] Set up GitHub Actions (#104) --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ .travis.yml | 33 --------------------------------- travis-install.sh | 13 ------------- 3 files changed, 37 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml delete mode 100644 travis-install.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1e4dfd4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fda13a5..0000000 --- a/.travis.yml +++ /dev/null @@ -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 diff --git a/travis-install.sh b/travis-install.sh deleted file mode 100644 index b7c44c3..0000000 --- a/travis-install.sh +++ /dev/null @@ -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