Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/m6w6/pecl-ci
Support bits for testing PECL extensions on Travis CI
https://github.com/m6w6/pecl-ci
Last synced: 4 days ago
JSON representation
Support bits for testing PECL extensions on Travis CI
- Host: GitHub
- URL: https://github.com/m6w6/pecl-ci
- Owner: m6w6
- License: bsd-2-clause
- Created: 2015-07-30T18:48:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-09-08T09:49:42.000Z (about 3 years ago)
- Last Synced: 2023-03-22T19:33:00.105Z (over 1 year ago)
- Language: PHP
- Size: 51.8 KB
- Stars: 2
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pecl-ci
These few lines of code support building and testing PHP extensions on CI.
## Usage
First, we'll add this repo to our extension as submodule:
git submodule add -n pecl-ci https://github.com/m6w6/pecl-ci.git scripts/ci
git submodule update --initLet's build a `.travis.yml`by example. We'll use a simple PHP script, e.g. `gen_travis_yml.php`,
which will generate the configuration for us:#!/usr/bin/env php
# file generated by gen_travis_yml.php, do not edit!
# use the container infrastructure
sudo: false
# we want to build a C library
language: c
# use the system's PHP to run this script
addons:
apt:
packages:
- php5-cli
- php-pear
# now we'll specify the build matrix environment
env:
["5.4", "5.5", "5.6"],
# test debug and non-debug builds
"enable_debug",
# test threadsafe and non-threadsafe builds
"enable_maintainer_zts",
# test with ext/json enabled an disabled
"enable_json",
# always build with iconv support
"with_iconv" => ["yes"],
]);
# output the build matrix
foreach ($env as $e) {
printf(" - %s\n", $e);
}
?>
before_script:
# build the matrix' PHP version
- make -f scripts/ci/Makefile php
# build the extension, the PECL variable expects the extension name
# and optionally the soname and a specific version of the extension
# separeated by double colon, e.g. PECL=myext:ext:1.7.5
- make -f scripts/ci/Makefile ext PECL=myext
script:
# run the PHPT test suite
- make -f scripts/ci/Makefile test
That's it, more TBD.