diff --git a/.github/julia/build_tarballs.jl b/.github/julia/build_tarballs_release.jl similarity index 100% rename from .github/julia/build_tarballs.jl rename to .github/julia/build_tarballs_release.jl diff --git a/.github/julia/build_tarballs_yggdrasil.jl b/.github/julia/build_tarballs_yggdrasil.jl index 4fa4c961..e4bd8eb1 100644 --- a/.github/julia/build_tarballs_yggdrasil.jl +++ b/.github/julia/build_tarballs_yggdrasil.jl @@ -14,6 +14,8 @@ sources = [ GitSource(ENV["UNO_URL"], ENV["UNO_COMMIT"]) ] +# The remainder of the file is similar to the content found at the following link: +# https://raw.githubusercontent.com/JuliaPackaging/Yggdrasil/refs/heads/master/U/Uno/build_tarballs.jl script = raw""" cd $WORKSPACE/srcdir/Uno mkdir -p build diff --git a/.github/workflows/julia-tests-ubuntu.yml b/.github/workflows/julia-tests-ubuntu.yml index ded283c5..699c54f7 100644 --- a/.github/workflows/julia-tests-ubuntu.yml +++ b/.github/workflows/julia-tests-ubuntu.yml @@ -27,11 +27,11 @@ jobs: version: "1.7" arch: x64 - uses: julia-actions/cache@v1 - # Set environment variables required by BinaryBuilder. The specific - # version of UNO_RELEASE is unimportant, since Uno_jll doesn't depend on it + # Set environment variables required by BinaryBuilder. - name: Set the environment variables run: | - echo "UNO_RELEASE=1.1.1" >> $GITHUB_ENV + git fetch --tags + echo "UNO_RELEASE=$(git describe --tags $(git rev-list --tags --max-count=1) | sed 's/^v//')" >> $GITHUB_ENV if [ "${{ github.event_name }}" = "pull_request" ]; then echo "UNO_COMMIT=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV echo "UNO_URL=${{ github.event.pull_request.head.repo.clone_url }}" >> $GITHUB_ENV diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c0ceb88a..947f8976 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,22 +25,22 @@ jobs: - name: Cross-compilation of Uno -- x86_64-linux-gnu-libgfortran5 run: | julia --color=yes -e 'using Pkg; Pkg.add("BinaryBuilder")' - julia --color=yes .github/julia/build_tarballs.jl x86_64-linux-gnu-libgfortran5 --verbose + julia --color=yes .github/julia/build_tarballs_release.jl x86_64-linux-gnu-libgfortran5 --verbose rm -r ~/.julia - name: Cross-compilation of Uno -- x86_64-w64-mingw32-libgfortran5 run: | julia --color=yes -e 'using Pkg; Pkg.add("BinaryBuilder")' - julia --color=yes .github/julia/build_tarballs.jl x86_64-w64-mingw32-libgfortran5 --verbose + julia --color=yes .github/julia/build_tarballs_release.jl x86_64-w64-mingw32-libgfortran5 --verbose rm -r ~/.julia - name: Cross-compilation of Uno -- x86_64-apple-darwin-libgfortran5 run: | julia --color=yes -e 'using Pkg; Pkg.add("BinaryBuilder")' - julia --color=yes .github/julia/build_tarballs.jl x86_64-apple-darwin-libgfortran5 --verbose + julia --color=yes .github/julia/build_tarballs_release.jl x86_64-apple-darwin-libgfortran5 --verbose rm -r ~/.julia - name: Cross-compilation of Uno -- aarch64-apple-darwin-libgfortran5 run: | julia --color=yes -e 'using Pkg; Pkg.add("BinaryBuilder")' - julia --color=yes .github/julia/build_tarballs.jl aarch64-apple-darwin-libgfortran5 --verbose + julia --color=yes .github/julia/build_tarballs_release.jl aarch64-apple-darwin-libgfortran5 --verbose rm -r ~/.julia - name: Generate the binaries run: julia --color=yes .github/julia/generate_binaries.jl diff --git a/INSTALL.md b/INSTALL.md index addfc3b6..3a2f61d8 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -7,6 +7,7 @@ * download **optional** solvers: * BQPD (indefinite null-space QP solver): https://www.mcs.anl.gov/~leyffer/solvers.html * MA57 (sparse indefinite symmetric linear solver): http://www.hsl.rl.ac.uk/catalogue/ma57.html + * LIBHSL (collection of libraries for sparse linear systems): https://licences.stfc.ac.uk/product/libhsl * MUMPS (sparse indefinite symmetric linear solver): https://mumps-solver.org/index.php?page=dwnld * to compile MUMPS in sequential mode, set the following variables at the end of your Makefile.inc: @@ -72,3 +73,26 @@ To benefit from autocompletion, install the file `uno_ampl-completion.bash`: sudo cp uno_ampl-completion.bash /etc/bash_completion.d/ ``` and open a new terminal. + +### Precompiled libraries and executables + +We provide precompiled Uno libraries and executables in the [releases tab](https://github.com/cvanaret/Uno/releases/latest/) for Linux, macOS (Intel & Silicon), and Windows. + +On some platforms, the dynamic linker needs to know where to look for libraries at runtime. +You might need to set the following environment variables: + +- `LD_LIBRARY_PATH` on Linux +- `DYLD_LIBRARY_PATH` or `DYLD_FALLBACK_LIBRARY_PATH` on macOS +- `PATH` on Windows + +These variables should include the directory where you extracted the library files. +For all platforms, the environment variable `PATH` is needed to locate the binary `uno_ampl` / `uno_ampl.exe`. + +**Example for Linux**: +```console +tar -xzf Uno.vX.Y.Z.linux.tar.gz +export LD_LIBRARY_PATH=/path/to/extracted/Uno/lib:$LD_LIBRARY_PATH +export PATH=/path/to/extracted/Uno/bin:$PATH +``` + +Note: The provided shared library `libhsl.so` / `libhsl.dylib` / `libhsl.dll` in the precompiled archive doesn't contain the HSL solvers like MA57 but can be replaced with the official version without the need to recompile anything.