Travis CI configuration with new Project.toml file

Hello!

I’m trying to migrate my package to the new registration system. I generated a Project.toml file that seems adequate. However, I’m having a strange bug during the CI process. It basically says that Pkg is not found in current path and that is should be installed with Pkg (!)

Error: Error building `ClimateTools`: 
│ ERROR: LoadError: ArgumentError: Package Pkg not found in current path:
Run `import Pkg; Pkg.add("Pkg")` to install the Pkg package

ClimateTools fails on Julia 0.7 and Julia 1.0, but pass on nightly (see links to build logs below). My guess is that it’s probably a matter of .travis.yml config, but I do not know where or how.

Build logs
.travis.yml config

Thanks for you help!

I think this is because you are using Pkg in build.jl: https://github.com/Balinus/ClimateTools.jl/blob/e87727077130e4d1d036e10aceccd67459271e43/deps/build.jl#L1

The easiest fix would be to add Pkg as a dependency.

1 Like

Yea, it actually shouldn’t, its a Pkg bug: https://github.com/JuliaLang/Pkg.jl/issues/1144

3 Likes

Thanks! Added Pkg, Statistics and Test as dependencies and now the build is working.

Cheers!

1 Like