This repository has been archived by the owner on Oct 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ported changes from wikimedia (incl. logical types) and CI integration (
#5)
- Loading branch information
Showing
34 changed files
with
3,220 additions
and
215 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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
vendor/ | ||
|
||
composer.lock | ||
!bin/php | ||
!build/.gitkeep |
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,28 @@ | ||
dist: trusty | ||
sudo: required | ||
language: php | ||
|
||
php: | ||
- '7.1' | ||
- '7.2' | ||
- '7.3' | ||
|
||
before_script: | ||
- composer self-update | ||
- composer update | ||
|
||
script: | ||
- COMPOSER=composer PHP=php make phpunit | ||
|
||
after_script: | ||
- make clean | ||
|
||
branches: | ||
only: | ||
- master | ||
- '/^ft-.*/' | ||
- '/^\d+\.\d+\.\d+$/' | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache/files |
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,19 @@ | ||
ARG PHP_VERSION=7.1 | ||
|
||
FROM php:${PHP_VERSION}-cli-alpine | ||
|
||
ARG XDEBUG_VERSION=2.7.0RC1 | ||
|
||
RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \ | ||
&& apk add --no-cache --virtual .runtime-deps git libzip-dev \ | ||
&& docker-php-ext-install zip \ | ||
&& pecl install xdebug-$XDEBUG_VERSION \ | ||
&& docker-php-ext-enable xdebug \ | ||
&& echo "xdebug.max_nesting_level=15000" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" \ | ||
&& echo "xdebug.remote_enable=true" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" \ | ||
&& echo "xdebug.remote_host=localhost" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" \ | ||
&& echo "xdebug.idekey=PHPSTORM" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" \ | ||
&& echo "xdebug.remote_handler=dbgp" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" \ | ||
&& echo "xdebug.remote_autostart=1" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" \ | ||
&& echo "xdebug.remote_connect_back=0" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" \ | ||
&& apk del .build-deps |
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,46 @@ | ||
# no buildin rules and variables | ||
MAKEFLAGS =+ -rR --warn-undefined-variables | ||
|
||
.PHONY: composer-install composer-update examples docker run | ||
|
||
COMPOSER ?= bin/composer.phar | ||
COMPOSER_VERSION ?= 1.8.3 | ||
PHP ?= bin/php | ||
PHP_VERSION ?= 7.2 | ||
XDEBUG_VERSION ?= 2.7.0RC1 | ||
|
||
export | ||
|
||
docker: | ||
docker build \ | ||
--build-arg PHP_VERSION=$(PHP_VERSION) \ | ||
--build-arg XDEBUG_VERSION=$(XDEBUG_VERSION) \ | ||
-t avro-php:$(PHP_VERSION) \ | ||
-f Dockerfile \ | ||
. | ||
|
||
composer-install: | ||
PHP_VERSION=$(PHP_VERSION) $(PHP) $(COMPOSER) install --no-interaction --no-progress --no-suggest --no-scripts | ||
|
||
composer-update: | ||
PHP_VERSION=$(PHP_VERSION) $(PHP) $(COMPOSER) update --no-interaction --no-progress --no-suggest --no-scripts | ||
|
||
phpunit: | ||
@mkdir -p build/tmp build/share/test/schemas build/build/interop/data | ||
@chmod -R a+w build | ||
PHP_VERSION=$(PHP_VERSION) $(PHP) vendor/bin/phpunit --coverage-text test/AllTests.php | ||
|
||
run: | ||
PHP_VERSION=$(PHP_VERSION) $(PHP) $(ARGS) | ||
|
||
examples: | ||
PHP_VERSION=$(PHP_VERSION) $(PHP) examples/* | ||
|
||
install-phars: | ||
curl https://getcomposer.org/download/$(COMPOSER_VERSION)/composer.phar -o bin/composer.phar -LR -z bin/composer.phar | ||
chmod a+x bin/composer.phar | ||
|
||
install: install-phars docker composer-install | ||
|
||
clean: | ||
rm -r build/* |
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
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,22 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -e | ||
|
||
command -v docker >/dev/null 2>&1 || { echo "docker is required to run this binary. Aborting." >&2; exit 1; } | ||
|
||
USER=${USER:-$( id -un )} | ||
GROUP=${GROUP:-$( id -gn )} | ||
COMPOSER_HOME=${COMPOSER_HOME:-${HOME}/.composer} | ||
PHP_VERSION=${PHP_VERSION:-7.1} | ||
DOCKER_OPTS=${DOCKER_OPTS:-'-it'} | ||
|
||
exec docker run ${DOCKER_OPTS} --rm \ | ||
-u $( id -u ${USER} ):$( id -g ${USER} ) \ | ||
-v "${PWD}":"${PWD}" \ | ||
-v "${COMPOSER_HOME}":/tmp/composer \ | ||
-w ${PWD} \ | ||
-e PHP_IDE_CONFIG="serverName=avro-php" \ | ||
-e COMPOSER_HOME="/tmp/composer" \ | ||
--net=host --sig-proxy=true --pid=host \ | ||
--entrypoint="php" \ | ||
avro-php:${PHP_VERSION} "${@}" |
Empty file.
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
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
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
Oops, something went wrong.