Skip to content

Commit

Permalink
Merge pull request #2091 from ERGO-Code/latest
Browse files Browse the repository at this point in the history
Ready for release 1.9.0
  • Loading branch information
galabovaa authored Dec 21, 2024
2 parents 4a7f24a + 7db0525 commit 66f735e
Show file tree
Hide file tree
Showing 75 changed files with 2,229 additions and 850 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/build-bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,16 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: bazelbuild/setup-bazelisk@v2

- name: Mount bazel cache # Optional
uses: actions/cache@v3
with:
path: "~/.cache/bazel"
key: bazel
- uses: bazelbuild/setup-bazelisk@v3

- name: bazel clean
run: bazel clean

- name: build bazel
run: |
bazel build //...
run: bazel build --enable_bzlmod //...

- name: test
- name: test all
run: bazel test --enable_bzlmod //...

- name: test example
run: ./bazel-bin/call-highs-example
2 changes: 1 addition & 1 deletion .github/workflows/build-nuget-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ jobs:

- name: Dotnet pack
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
run: dotnet pack -c Release /p:Version=1.8.1
run: dotnet pack -c Release /p:Version=1.9.0

- uses: actions/upload-artifact@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master

- name: Build sdist
run: |
Expand Down Expand Up @@ -194,7 +195,7 @@ jobs:
python -m pip install pytest
python -m pytest
build_wheel_windows:
build_wheel_windows_313:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/build-python-sdist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: build-python-sdist

on: [push, pull_request]

jobs:
build_sdist_ubuntu:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master

- name: Build sdist
shell: bash
run: pipx run build --sdist

- name: check metadata
run: pipx run twine check dist/*

- name: install highspy
run: |
python3 -m pip install dist/*.tar.gz --user
- name: Test Python Examples
run: |
python3 ./examples/call_highs_from_python_highspy.py
python3 ./examples/call_highs_from_python_mps.py
python3 ./examples/call_highs_from_python.py
python3 ./examples/minimal.py
build_sdist_mac:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]

steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master

- name: Build sdist
shell: bash
run: pipx run build --sdist

- name: check metadata
run: pipx run twine check dist/*

- name: install highspy
run: |
python3 -m venv path/to/venv
source path/to/venv/bin/activate
python3 -m pip install dist/*.tar.gz
- name: Test Python Examples
run: |
source path/to/venv/bin/activate
python3 ./examples/call_highs_from_python_highspy.py
python3 ./examples/call_highs_from_python_mps.py
python3 ./examples/call_highs_from_python.py
python3 ./examples/minimal.py
build_sdist_win:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Build sdist
shell: bash
run: pipx run build --sdist

- name: check metadata
run: pipx run twine check dist/*

- name: install highspy
run: |
$item = Get-ChildItem dist
python -m pip install "$item"
- name: Test Python Examples
run: |
python ./examples/call_highs_from_python_highspy.py
python ./examples/call_highs_from_python_mps.py
python ./examples/call_highs_from_python.py
python ./examples/minimal.py
81 changes: 42 additions & 39 deletions .github/workflows/build-wheels-push.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: build-wheels-push

on: []
# on: push

on:
release:
types:
- published
# on:
# release:
# types:
# - published

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -22,13 +23,13 @@ jobs:
shell: bash
run: pipx run build --sdist

# - name: check metadata
# run: pipx run twine check python/dist/*
- name: check metadata
run: pipx run twine check dist/*

- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: python/dist/*.tar.gz
path: dist/*.tar.gz

build_wheels:
name: Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }}
Expand Down Expand Up @@ -81,49 +82,22 @@ jobs:
name: cibw-wheels-${{ matrix.python }}-${{ matrix.buildplat[1] }}
path: wheelhouse/*.whl

# upload_testpypi:
# name: >-
# Publish highspy to TestPyPI
# runs-on: ubuntu-latest
# needs: [build_wheels, build_sdist]

# # upload to PyPI on every tag starting with 'v'
# # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')

# environment:
# name: testpypi
# url: https://testpypi.org/p/highspy

# permissions:
# id-token: write # IMPORTANT: mandatory for trusted publishing
# steps:
# - uses: actions/download-artifact@v4
# with:
# pattern: cibw-*
# path: dist
# merge-multiple: true

# - name: Download all
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/

upload_pypi:
upload_testpypi:
name: >-
Publish highspy to PyPI
Publish highspy to TestPyPI
runs-on: ubuntu-latest
needs: [build_wheels, build_sdist]
# needs: [build_sdist]

# upload to PyPI on every tag starting with 'v'
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')

environment:
name: pypi
url: https://pypi.org/p/highspy
name: testpypi
url: https://test.pypi.org/p/highspy

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- uses: actions/download-artifact@v4
with:
Expand All @@ -133,3 +107,32 @@ jobs:

- name: Download all
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true

# upload_pypi:
# name: >-
# Publish highspy to PyPI
# runs-on: ubuntu-latest
# needs: [build_wheels, build_sdist]

# # upload to PyPI on every tag starting with 'v'
# # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')

# environment:
# name: pypi
# url: https://pypi.org/p/highspy

# permissions:
# id-token: write # IMPORTANT: mandatory for trusted publishing

# steps:
# - uses: actions/download-artifact@v4
# with:
# pattern: cibw-*
# path: dist
# merge-multiple: true

# - name: Download all
# uses: pypa/gh-action-pypi-publish@release/v1
3 changes: 3 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
shell: bash
run: pipx run build --sdist

- name: check metadata
run: pipx run twine check dist/*

build_wheels:
name: Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }}
runs-on: ${{ matrix.buildplat[0] }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-nuget-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- name: Dotnet pack
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
run: dotnet pack -c Release /p:Version=1.8.1
run: dotnet pack -c Release /p:Version=1.9.0

- name: Add local feed
run: dotnet nuget add source ${{runner.workspace}}/nugets
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:

- name: Dotnet pack
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
run: dotnet pack -c Release /p:Version=1.8.1
run: dotnet pack -c Release /p:Version=1.9.0

- name: Add local feed
run: dotnet nuget add source ${{runner.workspace}}/nugets
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-nuget-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- name: Dotnet pack
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
run: dotnet pack -c Release /p:Version=1.8.1
run: dotnet pack -c Release /p:Version=1.9.0

- name: Add local feed
run: dotnet nuget add source ${{runner.workspace}}/nugets
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:

- name: Dotnet pack
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
run: dotnet pack -c Release /p:Version=1.8.1
run: dotnet pack -c Release /p:Version=1.9.0

- name: Add local feed
run: dotnet nuget add source ${{runner.workspace}}/nugets
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:

- name: Dotnet pack
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
run: dotnet pack -c Release /p:Version=1.8.1
run: dotnet pack -c Release /p:Version=1.9.0

- name: Add local feed
run: dotnet nuget add source ${{runner.workspace}}/nugets
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:

- name: Dotnet pack
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
run: dotnet pack -c Release /p:Version=1.8.1
run: dotnet pack -c Release /p:Version=1.9.0

- name: Add local feed
run: dotnet nuget add source ${{runner.workspace}}/nugets
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:

- name: Dotnet pack
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
run: dotnet pack -c Release /p:Version=1.8.1
run: dotnet pack -c Release /p:Version=1.9.0

- name: Add local feed
run: dotnet nuget add source -n name ${{runner.workspace}}\nugets
Expand All @@ -228,5 +228,5 @@ jobs:
dotnet new console
rm Program.cs
cp ${{runner.workspace}}\HiGHS\examples\call_highs_from_csharp.cs .
dotnet add package Highs.Native -v 1.8.1 -s ${{runner.workspace}}\nugets
dotnet add package Highs.Native -v 1.9.0 -s ${{runner.workspace}}\nugets
dotnet run
4 changes: 2 additions & 2 deletions .github/workflows/test-nuget-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Dotnet pack
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
run: dotnet pack -c Release /p:Version=1.8.1
run: dotnet pack -c Release /p:Version=1.9.0

- name: Add local feed
run: dotnet nuget add source ${{runner.workspace}}/nugets
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:

- name: Dotnet pack
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
run: dotnet pack -c Release /p:Version=1.8.1
run: dotnet pack -c Release /p:Version=1.9.0

- name: Add local feed
run: dotnet nuget add source ${{runner.workspace}}/nugets
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-nuget-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Dotnet pack
working-directory: ${{runner.workspace}}/build/dotnet/Highs.Native
run: dotnet pack -c Release /p:Version=1.8.1
run: dotnet pack -c Release /p:Version=1.9.0

- name: Add local feed
run: dotnet nuget add source -n name ${{runner.workspace}}\nugets
Expand All @@ -49,5 +49,5 @@ jobs:
dotnet new console
rm Program.cs
cp ${{runner.workspace}}\HiGHS\examples\call_highs_from_csharp.cs .
dotnet add package Highs.Native -v 1.8.1 -s ${{runner.workspace}}\nugets
dotnet add package Highs.Native -v 1.9.0 -s ${{runner.workspace}}\nugets
dotnet run
2 changes: 0 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ cc_library(
name = "highs",
srcs = glob([
"extern/filereaderlp/*.cpp",
"extern/zlib/*.cpp",
"src/interfaces/highs_c_api.cpp",
"src/io/*.cpp",
"src/ipm/*.cpp",
Expand All @@ -37,7 +36,6 @@ cc_library(
"src/util/*.cpp",
]),
hdrs = glob([
"HConfig.h",
"**/*.h",
"src/qpsolver/*.hpp",
"src/Highs.h",
Expand Down
Loading

0 comments on commit 66f735e

Please sign in to comment.