Skip to content

Commit

Permalink
fixing travis
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Ortner committed Feb 16, 2019
1 parent 0a2181d commit f9048c9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
18 changes: 10 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ os:
- osx

julia:
- 0.6
- 0.7
- 1.0
- 1.1

addons:
apt:
Expand All @@ -19,11 +21,11 @@ notifications:
env:
- PYTHON=""

before_install:
# - if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew update; fi
- if [ $TRAVIS_OS_NAME = osx ]; then brew cask uninstall oclint; fi
- if [ $TRAVIS_OS_NAME = osx ]; then brew install gcc; fi
# before_install:
# # - if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew update; fi
# - if [ $TRAVIS_OS_NAME = osx ]; then brew cask uninstall oclint; fi
# - if [ $TRAVIS_OS_NAME = osx ]; then brew install gcc; fi

script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia -e 'Pkg.clone(pwd()); Pkg.build("JuLIP"); Pkg.test("JuLIP"; coverage=true)'
# script:
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
# - julia -e 'Pkg.clone(pwd()); Pkg.build("JuLIP"); Pkg.test("JuLIP"; coverage=true)'
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FunctionWrappers
Dierckx
ForwardDiff
Parameters
NeighbourLists
NeighbourLists 0.3
MacroTools
LineSearches
CommonSubexpressions
8 changes: 4 additions & 4 deletions test/testhessian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ at = at * 2
set_pbc!(at, false)
set_constraint!(at, FixedCell(at))
set_calculator!(at, pp)
println(@test fdtest_hessian( x->gradient(at, x), x->hessian(at, x), dofs(at) ))
println(@test fdtest_hessian( x->JuLIP.gradient(at, x), x->hessian(at, x), dofs(at) ))


h2("Testing EAM hessian")
Expand Down Expand Up @@ -98,7 +98,7 @@ for p = 3:9
end

h3("full finite-difference test")
println(@test fdtest( x -> energy(at, x), x -> gradient(at, x), dofs(at) ))
println(@test fdtest( x -> energy(at, x), x -> JuLIP.gradient(at, x), dofs(at) ))
@warn "fdtest_hessian test has been turned off!" # TODO: put back in
# println(@test fdtest_hessian( x->gradient(at, x), x->hessian(at, x), dofs(at) ))

Expand All @@ -114,5 +114,5 @@ sw = StillingerWeber()
set_calculator!(at, sw)

h3("full finite-difference test")
println(@test fdtest( x -> energy(at, x), x -> gradient(at, x), dofs(at) ))
println(@test fdtest_hessian( x->gradient(at, x), x->hessian(at, x), dofs(at) ))
println(@test fdtest( x -> energy(at, x), x -> JuLIP.gradient(at, x), dofs(at) ))
println(@test fdtest_hessian( x->JuLIP.gradient(at, x), x->hessian(at, x), dofs(at) ))
4 changes: 2 additions & 2 deletions test/testsolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,6 @@ set_calculator!(at, calc)
set_constraint!(at, VariableCell(at, pressure=0.01))
JuLIP.Solve.minimise!(at, verbose = 2)
@show norm(virial(at), Inf)
@show norm(gradient(at), Inf)
@test norm(gradient(at), Inf) < 1e-4
@show norm(JuLIP.gradient(at), Inf)
@test norm(JuLIP.gradient(at), Inf) < 1e-4
@info "note it is correct that virial is O(1) since we applied pressure"
2 changes: 1 addition & 1 deletion test/testvarcell.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set_constraint!(at, VariableCell(at))
h3("check that energy, forces, virial, stress, dofs, gradient evaluate ... ")
energy(at)
forces(at)
gradient(at)
JuLIP.gradient(at)
# JuLIP.hessian_pos(at)
# JuLIP.hessian(at) # this has no implementation for variable cells yet
virial(at)
Expand Down

0 comments on commit f9048c9

Please sign in to comment.