I am using Github CI for package development. My package is private, and it has dependencies on some other private packages that I developed. While I can successfully clone the private dependency packages from github into the CI server, when CI goes to install those packages, it fails.
I was hoping someone might be able to see where I am making a mistake. Here is the relevant section of the CI.yml
file.
- name: Clone JuliaGendUniv_Types
run: git clone git@github.com:university-gender-evolution/JuliaGendUniv_Types.jl.git
- name: Clone JuliaGendUniv
run: git clone git@github.com:university-gender-evolution/JuliaGendUniv.jl.git
- name: Check file download was successful
run: |
pwd
ls -lah
- name: Install JuliaGendUniv private repo
run: julia --project -e 'using Pkg; Pkg.add(; path="JuliaGendUniv.jl")'
- name: Install JuliaGendUniv_Types private repo
run: julia --project -e 'using Pkg; Pkg.add(; path="JuliaGendUniv_Types.jl")'
So I can see that the files are downloaded to CI since I have an instruction to list the directory structure. The image below is from the CI server output.
drwxr-xr-x 9 runner docker 4.0K Mar 28 00:04 .
drwxr-xr-x 3 runner docker 4.0K Mar 28 00:04 ..
drwxr-xr-x 8 runner docker 4.0K Mar 28 00:04 .git
drwxr-xr-x 3 runner docker 4.0K Mar 28 00:04 .github
-rw-r--r-- 1 runner docker 138 Mar 28 00:04 .gitignore
drwxr-xr-x 8 runner docker 4.0K Mar 28 00:04 JuliaGendUniv.jl
drwxr-xr-x 7 runner docker 4.0K Mar 28 00:04 JuliaGendUniv_Types.jl
-rw-r--r-- 1 runner docker 1.1K Mar 28 00:04 LICENSE
-rw-r--r-- 1 runner docker 95K Mar 28 00:04 Manifest.toml
-rw-r--r-- 1 runner docker 731 Mar 28 00:04 Project.toml
-rw-r--r-- 1 runner docker 681 Mar 28 00:04 README.md
drwxr-xr-x 3 runner docker 4.0K Mar 28 00:04 docs
drwxr-xr-x 3 runner docker 4.0K Mar 28 00:04 src
drwxr-xr-x 2 runner docker 4.0K Mar 28 00:04 test
The error I am getting is below. Seems like the CI server is trying to install the package from the wrong location? The message reads:
ERROR: expected package `JuliaGendUniv_Types [603251c8]` to exist at path `/home/runner/.julia/packages/JuliaGendUniv_Types/ZJncY`
Here is the output from the CI server.
Run julia --project -e 'using Pkg; Pkg.add(; path="JuliaGendUniv.jl")'
Installing known registries into `~/.julia`
Cloning git-repo `/home/runner/work/JuliaGendUniv_Optimize.jl/JuliaGendUniv_Optimize.jl/JuliaGendUniv.jl`
Updating git-repo `/home/runner/work/JuliaGendUniv_Optimize.jl/JuliaGendUniv_Optimize.jl/JuliaGendUniv.jl`
Updating registry at `~/.julia/registries/General.toml`
Resolving package versions...
ERROR: expected package `JuliaGendUniv_Types [603251c8]` to exist at path `/home/runner/.julia/packages/JuliaGendUniv_Types/ZJncY`
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types /opt/hostedtoolcache/julia/1.8.5/x86/share/julia/stdlib/v1.8/Pkg/src/Types.jl:67
[2] collect_fixed!(env::Pkg.Types.EnvCache, pkgs::Vector{Pkg.Types.PackageSpec}, names::Dict{Base.UUID, String})
Seems like the Package manager is looking in /home/runner/.julia/packages/JuliaGendUniv_Types/ZJncY
instead of /home/runner/work/JuliaGendUniv_Optimize.jl/JuliaGendUniv_Optimize.jl/JuliaGendUniv.jl
.
I am also wondering if this has anything to do with the Manifest.toml
file being in the repository? I had to do that since I am pulling in a private repository and I get some strange errors if I don’t include the manifest with the specific github directory referenced.
Any suggestions would be appreciated. I have kinda exhausted my debugging muscles.