Skip to content

Commit

Permalink
Merge pull request #1432 from ERGO-Code/latest
Browse files Browse the repository at this point in the history
Merge latest into master?
  • Loading branch information
galabovaa committed Sep 28, 2023
2 parents f691802 + 0a9b58d commit 21da9b9
Show file tree
Hide file tree
Showing 161 changed files with 5,257 additions and 2,085 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-linux.yml
@@ -1,4 +1,4 @@
name: build-lunix
name: build-linux

on: [push, pull_request]

Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/build-meson.yml
@@ -0,0 +1,34 @@
name: Meson Builds with Conda
on: [push, pull_request]

jobs:
buildmeson:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest] # windows-latest takes to long
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
fetch-depth: 0
- name: Install Conda environment
uses: mamba-org/setup-micromamba@v1
with:
environment-name: highsdev
create-args: >-
python==3.8
meson
pkgconfig
ninja
zlib
catch2
cache-environment: true
init-shell: >-
bash
zsh
- name: Build and test
shell: bash -l {0}
run: |
meson setup bbdir_test -Duse_zlib=enabled -Dwith_tests=True --prefix $CONDA_PREFIX
meson test -C bbdir_test
114 changes: 59 additions & 55 deletions .github/workflows/build-wheels.yml
@@ -1,70 +1,74 @@
name: Wheels
# Python release WIP
name: Build wheels
on: []
# release:
# types:
# - published

on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
name: Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }}
runs-on: ${{ matrix.buildplat[0] }}
environment: pypi
strategy:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
os: [macOS-12] # windows-2019 ubuntu-20.04,
# From NumPy
# Github Actions doesn't support pairing matrix values together, let's improvise
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
buildplat:
- [ubuntu-20.04, manylinux_x86_64]
- [ubuntu-20.04, musllinux_x86_64] # No OpenBlas, no test
- [macos-12, macosx_x86_64]
- [macos-12, macosx_arm64]
- [windows-2019, win_amd64]
python: ["cp38", "cp39","cp310", "cp311"]

steps:
- uses: actions/checkout@v3
- name: Build wheels
uses: pypa/cibuildwheel@v2.12.3
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

# Used to host cibuildwheel
- uses: actions/setup-python@v2

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.7.0

- name: Install pyomo pybind
run: python -m pip install pybind11 pyomo

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Create install dir
run: cmake -E make_directory ${{runner.workspace}}/installs/

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/installs/highs -DFAST_BUILD=ON

- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: |
cmake --build . --parallel
cmake --install .
- name: Test
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --parallel 2 --timeout 300 --output-on-failure
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Build wheels
run: |
cd $GITHUB_WORKSPACE
export REPAIR_LIBRARY_PATH=${{runner.workspace}}/installs/highs/lib
export LD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH
ls $REPAIR_LIBRARY_PATH
python -m cibuildwheel --output-dir wheelhouse
- name: Build sdist
shell: bash -l {0}
run: pipx run build --sdist

# to supply options, put them in 'env', like:
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

env:
CIBW_ENVIRONMENT: REPAIR_LIBRARY_PATH=${{runner.workspace}}/installs/highs/lib LD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel} &&
DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist

- uses: actions/upload-artifact@v2
- uses: pypa/gh-action-pypi-publish@release/v1
with:
path: ./wheelhouse/*.whl
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/build-windows.yml
Expand Up @@ -75,7 +75,7 @@ jobs:
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --timeout 300 --output-on-failure -C Release
run: ctest --timeout 10000 --output-on-failure -C Release

fast_build_debug:
runs-on: windows-latest
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --timeout 300 --output-on-failure -C Debug
run: ctest --output-on-failure -C Debug

windows_debug:
runs-on: windows-latest
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --timeout 300 --output-on-failure -C Debug
run: ctest --output-on-failure -C Debug

windows_release64:
runs-on: windows-latest
Expand Down Expand Up @@ -211,4 +211,4 @@ jobs:
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --timeout 300 --output-on-failure -C Debug
run: ctest --output-on-failure -C Debug
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Expand Up @@ -9,10 +9,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@latest
with:
version: '1.6'
version: '1.9'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
51 changes: 0 additions & 51 deletions .github/workflows/test-python-api-mac.yml

This file was deleted.

54 changes: 0 additions & 54 deletions .github/workflows/test-python-api-ubuntu.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/test-python-api-win.yml

This file was deleted.

0 comments on commit 21da9b9

Please sign in to comment.