Skip to content

Commit

Permalink
Merge pull request #4 from kiddivouchers/github-actions
Browse files Browse the repository at this point in the history
Use GitHub Actions for CI
  • Loading branch information
cs278 authored Jun 14, 2021
2 parents 167c970 + 1b881a9 commit a33f44f
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ indent_size = 4
indent_style = space
indent_size = 4

[*.yml]
indent_size = 2
indent_style = space
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build Timecop
on:
push:
branches:
- master
pull_request:
release:
types: [created]
jobs:
build:
name: PHP ${{ matrix.php-version }} (ZTS ${{ matrix.php-zts }})
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
php-version:
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
valgrind: [false]
php-zts:
- nts
# @todo Add ts when setup-php supports ZTS on Ubuntu
# include: []
# - php-version: '7.4'
# valgrind: true
steps:
- name: Install valgrind
run: |
sudo apt-get install -y valgrind
if: ${{ matrix.valgrind }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: none
env:
phpts: ${{ matrix.php-zts }}
- name: Set PHP_API
run: |
echo "PHP_API=$(php-config --phpapi)" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
phpize
./configure
make
make test REPORT_EXIT_STATUS=1 NO_INTERACTION=1 TESTS="--show-all"
- name: Save artifact
uses: actions/upload-artifact@v2
with:
name: timecop_${{ env.PHP_API }}.so
path: modules/timecop.so
if-no-files-found: error
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

0 comments on commit a33f44f

Please sign in to comment.