-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Setup GitHub Actions * Add clang builds to HerculesCI * Remove nix builds from TravisCI * Add folding to TravisCI
- Loading branch information
Showing
35 changed files
with
875 additions
and
341 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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/usr/bin/env bash | ||
|
||
# adapted from: https://gist.github.com/prisis/e050c4da44c6ee7fa1519912eac19563 | ||
|
||
set -e -o pipefail | ||
|
||
nanoseconds() { | ||
local cmd="date" | ||
local format="+%s%N" | ||
local os=$(uname) | ||
|
||
if hash gdate > /dev/null 2>&1; then | ||
cmd="gdate" | ||
elif [[ "$os" = Darwin ]]; then | ||
format="+%s000000000" | ||
fi | ||
|
||
$cmd -u $format | ||
} | ||
|
||
# Arguments: | ||
# $1 fold name | ||
# $2 command to execute | ||
travisfold () ( | ||
set -e -o pipefail | ||
local title=$1 | ||
shift | ||
local fold=$(echo "$title" | sed -r 's/[^-_A-Za-z\d]+/./g') | ||
local id=$(printf %08x $(( RANDOM * RANDOM ))) | ||
local start=$(nanoseconds) | ||
|
||
function travisfoldend() { | ||
local end=$(nanoseconds) | ||
echo -e "\\ntravis_time:end:$id:start=$start,finish=$end,duration=$(($end-$start))" | ||
if [ "$1" == "true" ]; then | ||
echo -e "\\e[41mKO\\e[0m $title\\n" | ||
else | ||
echo -e "\\e[32mOK\\e[0m $title\\n\\ntravis_fold:end:$fold" | ||
fi | ||
} | ||
|
||
echo -e "travis_fold:start:$fold" | ||
echo -e "travis_time:start:$id" | ||
echo -e "\\e[1;34m$title\\e[0m" | ||
|
||
trap "travisfoldend true" EXIT | ||
$* | ||
trap - EXIT | ||
travisfoldend | ||
) | ||
|
||
function githubfold () ( | ||
set -e -o pipefail | ||
local name=$1 | ||
shift | ||
|
||
echo "::group::$name" | ||
$* | ||
echo "::endgroup::" | ||
) | ||
|
||
function nullfold () ( | ||
set -e -o pipefail | ||
shift | ||
$* | ||
) | ||
|
||
function cifold () ( | ||
set -e -o pipefail | ||
if [[ ! -z "${TRAVIS}" ]]; then | ||
travisfold "$@" | ||
elif [[ ! -z "${GITHUB_RUN_ID}" ]]; then | ||
githubfold "$@" | ||
else | ||
nullfold "$@" | ||
fi | ||
) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,2 @@ | ||
export PS4=' \e[33m$(date +"%H:%M:%S"): $BASH_SOURCE@$LINENO ${FUNCNAME[0]} -> \e[0m' | ||
export LIBMUSTACHE_VERSION=1761e260bbd2247891aa49cb04318b40206b9a4b |
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,60 @@ | ||
.git/ | ||
**/*~ | ||
**/*.a | ||
**/acinclude.m4 | ||
**/aclocal.m4 | ||
**/autom4te.cache | ||
**/build | ||
**/cmake-build-debug | ||
**/CMakeLists.txt | ||
**/config.guess | ||
**/config.h | ||
**/config.h.in | ||
**/config.log | ||
**/config.nice | ||
**/config.status | ||
**/config.sub | ||
**/configure | ||
**/configure.ac | ||
**/configure.in | ||
**/coverage.info | ||
**/.deps | ||
**/.dirstamp | ||
**/gmon* | ||
**/.idea | ||
**/install-sh | ||
**/*.la | ||
**/.libs | ||
**/libtool | ||
**/*.lo | ||
**/*.log | ||
**/ltmain.sh | ||
**/ltmain.sh.backup | ||
**/Makefile | ||
**/Makefile.fragments | ||
**/Makefile.global | ||
**/Makefile.objects | ||
**/missing | ||
**/mkinstalldirs | ||
**/modules | ||
**/nbproject | ||
**/*.o | ||
**/*.out | ||
**/.*project | ||
**/run-tests.php | ||
**/specs | ||
**/test_coverage | ||
**/test.php | ||
**/tests/*.diff | ||
**/tests/*.exp | ||
**/tests/*.php | ||
**/tests/*.sh | ||
**/tmp-php.ini | ||
|
||
# ci and docker | ||
.github | ||
.travis.* | ||
**/*.nix | ||
**/*Dockerfile | ||
**/.dockerignore | ||
**/result*/** |
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,44 @@ | ||
ARG PHP_VERSION=7.4 | ||
ARG PHP_TYPE=alpine | ||
ARG BASE_IMAGE=php:${PHP_VERSION}-${PHP_TYPE} | ||
ARG LIBMUSTACHE_VERSION=master | ||
|
||
# image0 | ||
FROM ${BASE_IMAGE} | ||
ARG LIBMUSTACHE_VERSION | ||
WORKDIR /build | ||
|
||
RUN apk update && \ | ||
apk --no-cache add alpine-sdk automake autoconf libtool json-c-dev yaml-dev | ||
|
||
# libmustache | ||
RUN git clone https://github.com/jbboehr/libmustache.git | ||
WORKDIR /build/libmustache | ||
RUN git checkout $LIBMUSTACHE_VERSION && git submodule update --init | ||
RUN autoreconf -fiv | ||
RUN ./configure \ | ||
--prefix /usr/local/ \ | ||
--enable-static \ | ||
--disable-shared \ | ||
CXXFLAGS="-O3 -fPIC -DPIC -flto" \ | ||
RANLIB=gcc-ranlib \ | ||
AR=gcc-ar \ | ||
NM=gcc-nm \ | ||
LD=gcc | ||
RUN make | ||
RUN make install | ||
|
||
# php-mustache | ||
WORKDIR /build/php-mustache | ||
ADD . . | ||
RUN phpize | ||
RUN ./configure CXXFLAGS="-O3 -fPIC -DPIC" | ||
RUN make | ||
RUN make install | ||
|
||
# image1 | ||
FROM ${BASE_IMAGE} | ||
RUN apk --no-cache add json-c yaml libstdc++ | ||
COPY --from=0 /usr/local/lib/php/extensions /usr/local/lib/php/extensions | ||
RUN docker-php-ext-enable mustache | ||
ENTRYPOINT ["docker-php-entrypoint"] |
Oops, something went wrong.