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

Update artifacts action for uploading highspy #1988

Merged
merged 5 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
65 changes: 36 additions & 29 deletions .github/workflows/build-wheels-push.yml
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] }}
Expand All @@ -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: >-
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
22 changes: 12 additions & 10 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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] }}
Expand Down Expand Up @@ -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
Loading