forked from hnw/php-timecop
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from kiddivouchers/github-actions
Use GitHub Actions for CI
- Loading branch information
Showing
3 changed files
with
61 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,6 @@ indent_size = 4 | |
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.yml] | ||
indent_size = 2 | ||
indent_style = space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.