I am running CI for a custom package using Github Actions and Julia. The actions for building work fine, but during testing I get the error below:
[ Info: Generating custom Julia project ...
ERROR: ArgumentError: Package Pkg not found in current path:
- Run `import Pkg; Pkg.add("Pkg")` to install the Pkg package.
Neither using Pkg.test, nor julia-actions/julia-runtest@latest don’t succeed, while locally tests run normally. What could be the issue?
Here is part of the workflow yaml file for which CI fails:
- uses: actions/checkout@v2
21 - uses: julia-actions/setup-julia@latest
22 with:
23 version: ${{ matrix.julia-version }}
24 - run: julia -e 'import Pkg; Pkg.add("Pkg")' # added to resolve the issue, did not help
25 - uses: julia-actions/julia-buildpkg@latest
29 - run: julia -e 'import Pkg; Pkg.add("Pkg"); Pkg.activate("."
); Pkg.update(); Pkg.test()'
30 #- uses: julia-actions/julia-runtest@latest
Hi, thank you for your help. I tried either option, with and without running custom run: ... commands, and the testing stage still fails with the error I listed.
ERROR: LoadError: InitError: could not load library "/home/runner/.julia/artifacts/625c500ebd9e885e870675d77ea6cf41c14d6bdd/lib/libperl.so"
libcrypt.so.1: cannot open shared object file: No such file or directory
Stacktrace:
[1] dlopen(::String, ::UInt32; throw_error::Bool) at /buildworker/worker/package_linux32/build/usr/share/julia/stdlib/v1.5/Libdl/src/Libdl.jl:109
[2] dlopen(::String, ::UInt32) at /buildworker/worker/package_linux32/build/usr/share/julia/stdlib/v1.5/Libdl/src/Libdl.jl:109
Hm, I wonder where it comes from, because when I do a clean install in a new environment via ] add https://github.com/iliailmer/SIAN-Julia.git#older-commit the package installs and I am able to use it.