Skip to content

Commit

Permalink
Merge 0c12a08 into 7ef643a
Browse files Browse the repository at this point in the history
  • Loading branch information
jbboehr committed Dec 11, 2019
2 parents 7ef643a + 0c12a08 commit 2e75c9a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
12 changes: 3 additions & 9 deletions .ci/travis_nix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ export NIX_PHP_ATTR=${NIX_PHP_ATTR:-php}
export NIX_CHANNEL=${NIX_CHANNEL:-unstable}

function before_install() (
set -e -o pipefail
nix-env -iA cachix -f https://github.com/NixOS/nixpkgs/tarball/889c72032f8595fcd7542c6032c208f6b8033db6
return 0
)

function install() {
Expand All @@ -21,16 +20,11 @@ function script() (
set -e -o pipefail

NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-${NIX_CHANNEL}.tar.gz
nix-build --argstr phpMustacheVersion ${TRAVIS_BRANCH} --arg php "(import <nixpkgs> {}).${NIX_PHP_ATTR}" | tee result.txt

# test the pecl packaging
pecl_tgz=$(nix-shell -p ${NIX_PHP_ATTR} --command 'pecl package' | grep -v Warning | awk '{print $2}')
nix-build --arg php "(import <nixpkgs> {}).${NIX_PHP_ATTR}" --arg phpMustacheSrc "./${pecl_tgz}"
nix-build --argstr phpMustacheVersion ${TRAVIS_BRANCH} --arg php "(import <nixpkgs> {}).${NIX_PHP_ATTR}"
)

function after_success() (
set -e -o pipefail
cat result.txt | cachix push jbboehr-ci
return 0
)

function after_failure() {
Expand Down
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ matrix:
- language: php
php: '7.3'
- language: php
php: '7.4snapshot'
php: '7.4'
- language: php
php: 'master'
- language: nix
Expand All @@ -31,6 +31,10 @@ matrix:
env:
- NIX_CHANNEL=19.03
- NIX_PHP_ATTR=php73
- language: nix
env:
- NIX_CHANNEL=unstable
- NIX_PHP_ATTR=php74
- language: nix
env:
- NIX_CHANNEL=unstable
Expand Down

0 comments on commit 2e75c9a

Please sign in to comment.