Skip to content

Commit

Permalink
Merge pull request #64 from amontoison/improve_builds
Browse files Browse the repository at this point in the history
Update INSTALL.md
  • Loading branch information
cvanaret authored Nov 3, 2024
2 parents 37e22cb + 3c5e270 commit 24cfdf4
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 7 deletions.
File renamed without changes.
2 changes: 2 additions & 0 deletions .github/julia/build_tarballs_yggdrasil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/julia-tests-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 24 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 does not contain the HSL solvers like MA57 but can be replaced with the official version without the need to recompile anything.

0 comments on commit 24cfdf4

Please sign in to comment.