This isn’t really a Travis CI problem, but more an issue with what you’re trying to do in your
build.jl file. The
build.jl file is intended to compile non-Julia dependencies for your project. If your package just depends on other Julia packages (as is the case here), then you should not have a
build.jl file at all.
Instead, you need to be use the
Project.toml file, which is what
Pkg uses to figure out what dependencies your project has. You can learn more about
Pkg here: https://julialang.github.io/Pkg.jl/v1/ . You list the Julia dependencies of your package in
Project.toml, and then users will automatically get those dependencies installed when they install your code.
While it is possible to edit
Project.toml files manually, I find that it’s much easier to let
Pkg do it for you. For example, let’s create a new
Project.toml and add some dependencies to it:
julia> using Pkg
# Create a new project in a new folder called ArgData
Generating project ArgData:
# Tell Pkg that we want to use that new project (and its associated Project.toml)
# Add a dependency to that project (this will update Project.toml)
# Add another dependency:
The result will be a file which looks like this:
$ cat Downloads/ArgData/Project.toml
name = "ArgData"
uuid = "0e2afcf6-a34f-11e9-3f29-13cfdb572c71"
authors = ["Robin Deits <firstname.lastname@example.org>"]
version = "0.1.0"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
Project.toml should go in the top level of your project’s git repository, and then Travis CI (and anyone who installs your package) will automatically get the right set of dependencies.