-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1649 from ERGO-Code/testpi
Testpi
- Loading branch information
Showing
12 changed files
with
472 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.