mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-11-25 08:19:14 +03:00
travis-CI/stack: switch stack build, not building each directory.
This commit is contained in:
parent
4fa9cc4e1e
commit
bef4b85cfd
@ -61,3 +61,11 @@ EOF
|
||||
esac
|
||||
set -x
|
||||
}
|
||||
|
||||
show_stack_pkgs() {
|
||||
echo packages:
|
||||
for d in $dirs ; do
|
||||
echo " - ${d}/"
|
||||
done
|
||||
echo ''
|
||||
}
|
||||
|
@ -11,20 +11,13 @@ skip_no_match_branch
|
||||
|
||||
checkout_root=$(pwd)
|
||||
|
||||
install_package() {
|
||||
(
|
||||
show_stack_pkgs
|
||||
sed "s/^resolver: .*/resolver: ${STACK_RESOLVER}/" \
|
||||
< $checkout_root/travis-CI/stack/template.yaml \
|
||||
> stack-travis.yaml
|
||||
## stack.yaml must be located the same directory which has *.cabal -- constraint of stack?
|
||||
) > stack-travis.yaml
|
||||
|
||||
STACK_YAML=stack-travis.yaml stack setup
|
||||
STACK_YAML=stack-travis.yaml stack install --only-dependencies
|
||||
}
|
||||
cat stack-travis.yaml
|
||||
|
||||
if [ x"$dirs" = x ]; then
|
||||
install_package
|
||||
else
|
||||
for d in $dirs; do
|
||||
( cd $d && install_package )
|
||||
done
|
||||
fi
|
||||
STACK_YAML=stack-travis.yaml stack setup
|
||||
STACK_YAML=stack-travis.yaml stack install --only-dependencies
|
||||
|
@ -9,15 +9,5 @@ set -x
|
||||
|
||||
skip_no_match_branch
|
||||
|
||||
script_build() {
|
||||
STACK_YAML=stack-travis.yaml stack build
|
||||
STACK_YAML=stack-travis.yaml stack test
|
||||
}
|
||||
|
||||
if [ x"$dirs" = x ]; then
|
||||
script_build
|
||||
else
|
||||
for d in $dirs; do
|
||||
( cd $d && script_build )
|
||||
done
|
||||
fi
|
||||
STACK_YAML=stack-travis.yaml stack build
|
||||
STACK_YAML=stack-travis.yaml stack test
|
||||
|
@ -1,8 +1,5 @@
|
||||
resolver: #foo
|
||||
|
||||
packages:
|
||||
- '.'
|
||||
|
||||
extra-deps: []
|
||||
flags: {}
|
||||
extra-package-dbs: []
|
||||
|
Loading…
Reference in New Issue
Block a user