Hello All! I have been trying to get Travis CI working with my private repo for a while now. I cannot seem to get it right. I was finally able to figure out how to set up the clone fo the private repo but now I still cannot get things to work.
Here is what I am trying to do… In the script, I do git clone "URL_TO_Private_Repo"
The issue is then when I do - julia --project --color=yes --check-bounds=yes -e 'using Pkg; Pkg.instantiate(); Pkg.build("Private_Repo"); Pkg.test("Private_Repo"; coverage=true)'
It says that Private_Repo is undefined… I am guessing this is a scope issue and that it cannot see it… How can I get the virtual machine to see it?
Travis should clone the repository automatically. I’ve worked in other private repos, and the default Julia build script generally works.
If you have a Project.toml file, then you should be able to just
julia --project --color=yes --check-bounds=yes -e 'using Pkg; Pkg.instantiate(); Pkg.build(); Pkg.test(
; coverage=true)'
This biggest hassle I’ve had is working with dependencies which are also private (since GitHub won’t let you use the same deploy key on multiple repos). I ended up creating a separate “machine user” to work around the problem.
Ok. I am working with a private dependency. Can you provide a high level example of how you setup the private dep??
Best,
Logan Kilpatrick
It was a while ago, but I think I created a separate GitHub user, gave them read-only access to both repositories, and set that users SSH key as the Travis key.
This was with the old Pkg, so I had added a Pkg.clone
step. Now you shouldn’t need that, as long as you have the Manifest.toml file set up correctly (since that stores the repository URL).
So I shouldn’t even need to clone in a private dependency you’re saying as long as I have my manifest file setup correctly. How can I make sure that it’s setup right?
I checked and I don’t have my manifest or project folder on my repo… I am guessing that given what you said, I need those in order for this to work? Does it make sense that if I don’t have those 2 files, when I do Pkg.instantiate() that it says there’s no packages to add… ?
And you’re saying once those are committed into the repo, and assuming the private dependency is linked in the manifest file, and that my user account has access to all of these repos, I should just be able to do the julia --project --color=yes --check-bounds=yes -e 'using Pkg; Pkg.instantiate(); Pkg.build(); Pkg.test( ; coverage=true)'
command?
Okay. I am going to keep messing with this. Once it’s complete, I am going to write some documentation. How can I get said documentation on the Travis CI Julia page?
Thank you! I opened a pull request.