Search code examples
packagejuliagitlab-ci

How to add Unregisted Package in julia with continious Integration(gitlab-ci)


I have created a package Xnumber.And I have not registered it.

Now, I am creating another package(SHbundle) which uses the above package.Now in the julia REPL locally when I execute the following code:

julia> add "https://gitlab.com/vyush/Xnumber.jl.git"
julia> using Xnumber

It works fine locally and I can use the function but On pushing to SHbundle after adding Xnumber as dependency. The pipeline script fail. The command being executed is

- |
      julia --project=@. -e '
        using Pkg
        Pkg.build()
        Pkg.test(coverage=true)'

The error that I get is ERROR: expected package Xnumber [fdc6275c] to be registered. The package works fine locally but is giving error while executing the pipeline script.

I there any workaround for this without registering the packages.

The Links for these packages are: Xnumber,SHbundle


Solution

    1. Remove the /Manifest.toml in your .gitignore file
    2. Commit the Manifest.toml file after julia> add "https://gitlab.com/vyush/Xnumber.jl.git"
    3. Add an extra step of Pkg.instantiate() in your pipeline