Julia in GitHub actions
Series - GitHubActions
Contents
- julia-actions/setup-julia action downloads
julia
and adds it toPATH
. - julia-actions/julia-buildpkg runs build scripts and installs dependencies for the Julia package.
- julia-actions/julia-runtest runs unit test for the Julia project.
- julia-actions/cache is a shortcut action to cache Julia artifacts, packages, and registries.
- julia-docdeploy deploys documentation.
- julia-processcoverage yields test coverage data.
Example workflow file
|
|
Julia shell
Using Julia shell to run Julia scripts is much cleaner than julia -e 'code'
.1
For example, the two steps do the same job
|
|
Using PyCall.jl in Github actions
In GNU/Linux systems like Ubuntu, PyCall.jl
may not be able to install python packages for PyCall.jl
because it will first try to use the system Python (/usr/bin/python
) and pip
. It would fail due to lack of superuser privileges.
To solve this, you can set the PYTHON
environment variable to where the Python executable is.2
- A blank (
PYTHON:''
) variable will force Julia to install a local miniconda distribution. - The Python executable in your toolchain. e.g.,
python
after thesetup-python
action.
|
|