-
Notifications
You must be signed in to change notification settings - Fork 191
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 #1988 from ERGO-Code/update-artifacts
Update artifacts action for uploading highspy
- Loading branch information
Showing
2 changed files
with
48 additions
and
39 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 |
---|---|---|
@@ -1,17 +1,35 @@ | ||
name: build-wheels-push | ||
|
||
# on: push | ||
on: push | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
# on: | ||
# release: | ||
# types: | ||
# - published | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build sdist | ||
shell: bash | ||
run: pipx run build --sdist | ||
|
||
# - name: check metadata | ||
# run: pipx run twine check python/dist/* | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-sdist | ||
path: python/dist/*.tar.gz | ||
|
||
build_wheels: | ||
name: Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }} | ||
runs-on: ${{ matrix.buildplat[0] }} | ||
|
@@ -38,39 +56,30 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU # Required for aarch64 builds | ||
if: ${{ contains(matrix.buildplat[1], 'aarch64') }} | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: all | ||
|
||
- name: Build wheels (aarch64) | ||
if: ${{ contains(matrix.buildplat[1], 'aarch64') }} | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} | ||
CIBW_ARCHS_LINUX: aarch64 | ||
|
||
- name: Build wheels (not aarch64) | ||
if: ${{ !contains(matrix.buildplat[1], 'aarch64') }} | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./wheelhouse/*.whl | ||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build sdist | ||
shell: bash -l {0} | ||
run: pipx run build --sdist | ||
|
||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: dist/*.tar.gz | ||
name: cibw-wheels-${{ matrix.python }}-${{ matrix.buildplat[1] }} | ||
path: wheelhouse/*.whl | ||
|
||
# upload_testpypi: | ||
# name: >- | ||
|
@@ -88,12 +97,11 @@ jobs: | |
# permissions: | ||
# id-token: write # IMPORTANT: mandatory for trusted publishing | ||
# steps: | ||
# - uses: actions/download-artifact@v3 | ||
# - uses: actions/download-artifact@v4 | ||
# with: | ||
# # unpacks default artifact into dist/ | ||
# # if `name: artifact` is omitted, the action will create extra parent dir | ||
# name: artifact | ||
# pattern: cibw-* | ||
# path: dist | ||
# merge-multiple: true | ||
|
||
# - name: Download all | ||
# uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
@@ -107,7 +115,7 @@ jobs: | |
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') | ||
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
|
||
environment: | ||
name: pypi | ||
|
@@ -117,12 +125,11 @@ jobs: | |
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
|
||
steps: | ||
- uses: actions/download-artifact@v3 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
# unpacks default artifact into dist/ | ||
# if `name: artifact` is omitted, the action will create extra parent dir | ||
name: artifact | ||
pattern: cibw-* | ||
path: dist | ||
merge-multiple: true | ||
|
||
- name: Download all | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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 |
---|---|---|
|
@@ -8,6 +8,16 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build sdist | ||
shell: bash | ||
run: pipx run build --sdist | ||
|
||
build_wheels: | ||
name: Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }} | ||
runs-on: ${{ matrix.buildplat[0] }} | ||
|
@@ -38,24 +48,16 @@ jobs: | |
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: all | ||
|
||
- name: Build wheels (aarch64) | ||
if: ${{ contains(matrix.buildplat[1], 'aarch64') }} | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} | ||
CIBW_ARCHS_LINUX: aarch64 | ||
|
||
- name: Build wheels (not aarch64) | ||
if: ${{ !contains(matrix.buildplat[1], 'aarch64') }} | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} | ||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build sdist | ||
shell: bash -l {0} | ||
run: pipx run build --sdist |