Skip to content

Commit

Permalink
no sitelib here
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Apr 10, 2024
1 parent e6bd30a commit f1a9669
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 22 deletions.
59 changes: 37 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@ env:
CMEEL_LOG_LEVEL: DEBUG

jobs:
wheel:
name: "${{ matrix.build }} ${{ matrix.os }} ${{ matrix.arch }}"
runs-on: "${{ matrix.os }}"
linux:
name: "${{ matrix.image }} ${{ matrix.arch }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
image: ["manylinux_2_28", "musllinux_1_1"]
arch: ["x86_64", "aarch64"]
build: ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*"]
exclude:
- os: "macos-latest"
- image: "musllinux_1_1"
arch: "aarch64"
steps:
- uses: actions/checkout@v4
Expand All @@ -34,19 +33,29 @@ jobs:
uses: docker/setup-qemu-action@v3
with:
platforms: all
- run: pipx install cibuildwheel
- run: cibuildwheel --output-dir wh
env:
CIBW_BUILD: ${{ matrix.build }}
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_SKIP: "*-musllinux_aarch64"
CIBW_MANYLINUX_X86_64_IMAGE: "quay.io/pypa/manylinux_2_28_x86_64"
CIBW_MANYLINUX_AARCH64_IMAGE: "quay.io/pypa/manylinux_2_28_aarch64"
CIBW_REPAIR_WHEEL_COMMAND: ""
CIBW_ENVIRONMENT: CMEEL_LOG_LEVEL="DEBUG"
- run: pipx install cmeel
- run: cmeel docker -Ui "quay.io/pypa/${{ matrix.image }}_${{ matrix.arch }}"
- uses: actions/upload-artifact@v4
with:
path: wh
name: "artifact-${{ matrix.image }}-${{ matrix.arch }}"
path: wh/cmeel_qpoases*

macos:
name: "macos"
runs-on: "macos-latest"
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: python -m pip install -U pip
- run: python -m pip wheel -vw wh .
- uses: actions/upload-artifact@v4
with:
name: "artifact-macos"
path: wh/cmeel_qpoases*

sdist:
runs-on: ubuntu-latest
Expand All @@ -68,9 +77,13 @@ jobs:
path: dist

release:
needs: ["wheel", "sdist"]
needs: ["linux", "macos", "sdist"]
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -81,10 +94,12 @@ jobs:
git verify-tag --raw ${{ github.ref_name }} 2>&1
| grep -q 'VALIDSIG 9B1A79065D2F2B806C8A5A1C7D2ACDAF4653CF28'
- uses: actions/download-artifact@v4
- run: pipx install twine
- run: twine upload -u __token__ -p "${{ secrets.PYPI_TOKEN }}" artifact/cmeel_qpoases*.whl
- run: twine upload -u __token__ -p "${{ secrets.PYPI_TOKEN }}" artifact/cmeel_qpoases*.tar.gz || true
- run: mkdir dist && mv artifact*/* dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
- run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- run: gh release create -t "Release ${{ env.TAG}}" -n "$(awk '/## \[${{ env.TAG }}] - /{flag=1;next}/## \[/{flag=0}flag' CHANGELOG.md)" ${{ env.TAG }} artifact/cmeel_qpoases*.{whl,tar.gz}
- run: gh release create -t "Release ${{ env.TAG}}" -n "$(awk '/## \[${{ env.TAG }}] - /{flag=1;next}/## \[/{flag=0}flag' CHANGELOG.md)" ${{ env.TAG }} dist/cmeel_qpoases*.{whl,tar.gz}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ homepage = "https://github.com/cmake-wheel/cmeel-qpoases"
[tool.cmeel]
build-number = 1
configure-args = ["-DBUILD_SHARED_LIBS=ON"]
has-sitelib = false
run-tests = false
source = "qpOASES"

Expand Down

0 comments on commit f1a9669

Please sign in to comment.