Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testpi #1649

Merged
merged 45 commits into from
Mar 5, 2024
Merged

Testpi #1649

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
c295dcf
version down to testpypi
galabovaa Mar 4, 2024
f28979a
cleanup and new workflow
galabovaa Mar 4, 2024
06436f9
test
galabovaa Mar 4, 2024
a83b951
build sdist
galabovaa Mar 4, 2024
f514c63
test wheel install
galabovaa Mar 4, 2024
1bd4d13
tests added for macos and windows
galabovaa Mar 4, 2024
41fc856
wip tests
galabovaa Mar 4, 2024
4b97cdf
remove invalid classifier for licence
galabovaa Mar 4, 2024
61b482e
item.name win sdist
galabovaa Mar 4, 2024
1e349f5
typo
galabovaa Mar 4, 2024
8dc1a73
removed .name
galabovaa Mar 4, 2024
1e7559a
added many macos and moved numpy to extras require
galabovaa Mar 4, 2024
b10832d
windows path and macos runners
galabovaa Mar 4, 2024
f789ca5
typo
galabovaa Mar 4, 2024
8912971
numpy back to install requirements
galabovaa Mar 4, 2024
ce11843
numpy back to install
galabovaa Mar 4, 2024
0744329
test windows wheel
galabovaa Mar 4, 2024
8922d5a
win arm64
galabovaa Mar 4, 2024
6971386
numpy requires
galabovaa Mar 4, 2024
d9472d1
cibw build *
galabovaa Mar 4, 2024
5e7b64e
wip failing tests
galabovaa Mar 4, 2024
0b96f30
wip
galabovaa Mar 4, 2024
ef8be04
python versions and win working dir
galabovaa Mar 4, 2024
03206f8
working dir
galabovaa Mar 4, 2024
013b1f8
working dir path
galabovaa Mar 4, 2024
a17d2c4
working dir path ls
galabovaa Mar 4, 2024
edc2666
path 1
galabovaa Mar 4, 2024
fac840e
path 2
galabovaa Mar 4, 2024
2482d98
python versions
galabovaa Mar 4, 2024
d44d07f
path and python setup
galabovaa Mar 4, 2024
331ec00
python versions and architectures
galabovaa Mar 4, 2024
a0bff81
paths again
galabovaa Mar 4, 2024
96db5c5
tests to build python packages
galabovaa Mar 4, 2024
7faad7a
python requires
galabovaa Mar 4, 2024
8c866f0
action version and more python examples and tests
galabovaa Mar 4, 2024
53b8670
macos m1 macos-14 runner
galabovaa Mar 4, 2024
89c96b7
win arm does not seem to be supported
galabovaa Mar 4, 2024
1bbecf6
readme and examples
galabovaa Mar 5, 2024
df4c5b6
style
galabovaa Mar 5, 2024
a9bfcd4
wheel push on tagged release on
galabovaa Mar 5, 2024
8dd8b72
print format
galabovaa Mar 5, 2024
f503b60
readme cleanup and python example fix
galabovaa Mar 5, 2024
f78bc6f
pr clean up
galabovaa Mar 5, 2024
6652618
versions
galabovaa Mar 5, 2024
ee3ef6c
version ready for tag
galabovaa Mar 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
216 changes: 216 additions & 0 deletions .github/workflows/build-python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
name: build-python-package
on: [push, pull_request]
# on: []

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build sdist
run: |
python3 -m pip install setuptools
python3 setup.py sdist

- name: Install sdist
run: |
ls dist
python3 -m pip install dist/*.tar.gz

- name: Test highspy
run: |
python3 -m pip install pytest
python3 -m pytest $GITHUB_WORKSPACE/highspy/tests/test_highspy.py

build_sdist_mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Build sdist
run: |
python3 -m pip install setuptools
python3 setup.py sdist

- name: Install sdist
run: |
ls dist
python3 -m pip install dist/*.tar.gz

- name: Test highspy
run: |
python3 -m pip install pytest
python3 -m pytest $GITHUB_WORKSPACE/highspy/tests/test_highspy.py

build_sdist_win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Install correct python version
uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Build sdist
run: |
python -m pip install setuptools
python setup.py sdist

- name: Install sdist
run: |
$item = Get-ChildItem dist
python -m pip install "$item"
python -c "import highspy; print(dir(highspy))"

- name: Test highspy
run: |
python -m pip install pytest
python -m pytest ./highspy/tests/test_highspy.py

build_wheel_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build wheel
run: |
python3 --version
python3 -m pip install cibuildwheel
python3 -m cibuildwheel --only cp310-manylinux_x86_64 $GITHUB_WORKSPACE

- name: Install wheel
run: |
ls wheelhouse
python3 -m pip install wheelhouse/*.whl

- name: Test highspy
run: |
python3 -m pip install pytest
python3 -m pytest $GITHUB_WORKSPACE/highspy/tests/test_highspy.py

# macos 12 is Intel
build_wheel_macos_12:
runs-on: macos-12
strategy:
matrix:
python: [3.11]
steps:
- uses: actions/checkout@v4

- name: Install correct python version
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Build wheel
run: |
python3 -m pip install cibuildwheel
python3 -m cibuildwheel --only cp311-macosx_x86_64 $GITHUB_WORKSPACE

- name: Install wheel
run: |
ls wheelhouse
python3 --version
python3 -m pip install wheelhouse/*.whl
python3 -c "import highspy; print(dir(highspy))"

- name: Test highspy
run: |
python3 -m pip install pytest
python3 -m pytest $GITHUB_WORKSPACE/highspy/tests/test_highspy.py

# macos 13 is Intel
build_wheel_macos_13:
runs-on: macos-13
strategy:
matrix:
python: [3.11]
steps:
- uses: actions/checkout@v4

- name: Install correct python version
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Build wheel
run: |
python3 -m pip install cibuildwheel
python3 -m cibuildwheel --only cp311-macosx_x86_64 $GITHUB_WORKSPACE

- name: Install wheel
run: |
ls wheelhouse
python3 --version
python3 -m pip install wheelhouse/*.whl
python3 -c "import highspy; print(dir(highspy))"

- name: Test highspy
run: |
python3 -m pip install pytest
python3 -m pytest $GITHUB_WORKSPACE/highspy/tests/test_highspy.py

# macos 14 is M1 (beta)
build_wheel_macos_14:
runs-on: macos-14
strategy:
matrix:
python: [3.11]
steps:
- uses: actions/checkout@v4

- name: Install correct python version
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Build wheel
run: |
python3 -m pip install cibuildwheel
python3 -m cibuildwheel --only cp311-macosx_arm64 $GITHUB_WORKSPACE

- name: Install wheel
run: |
ls wheelhouse
python3 --version
python3 -m pip install wheelhouse/*.whl
python3 -c "import highspy; print(dir(highspy))"

- name: Test highspy
run: |
python3 -m pip install pytest
python3 -m pytest $GITHUB_WORKSPACE/highspy/tests/test_highspy.py

build_wheel_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Install correct python version
uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Build wheel
run: |
python -m pip install cibuildwheel
python -m cibuildwheel --only cp39-win_amd64 $GITHUB_WORKSPACE

- name: Install wheel
run: |
ls wheelhouse
$item = Get-ChildItem wheelhouse
python -m pip install "$item"
python -c "import highspy; print(dir(highspy))"

- name: Test highspy
run: |
python -m pip install pytest
python -m pytest highspy/tests/test_highspy.py

12 changes: 7 additions & 5 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Python release WIP
name: Build wheels
on: []
# release:
# types:
# - published
# on: [push]

on:
release:
types:
- published

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -32,7 +34,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v2.12.3
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
- uses: actions/upload-artifact@v3
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-python-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ jobs:
run: |
python3 -m pip install .
pytest -v ./highspy/tests/

- 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
6 changes: 6 additions & 0 deletions .github/workflows/test-python-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ jobs:
run: |
python3 -m pip install .
pytest -v ./highspy/tests/

- 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
5 changes: 5 additions & 0 deletions .github/workflows/test-python-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ jobs:
python -m pip install .
pytest -v ./highspy/tests/

- 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
File renamed without changes.
Loading