Skip to content

Commit

Permalink
update release process
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Feb 6, 2025
1 parent a3d7510 commit 0668172
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 63 deletions.
23 changes: 0 additions & 23 deletions .cirrus.yml

This file was deleted.

94 changes: 54 additions & 40 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,69 +6,74 @@ on:
- "v*"
branches:
- main
pull_request_target:
pull_request:
branches:
- main

env:
CMEEL_LOG_LEVEL: DEBUG

jobs:
linux:
name: "${{ matrix.image }} ${{ matrix.arch }}"
runs-on: "ubuntu-latest"
wheel:
name: "Build ${{ matrix.python }} ${{ matrix.os }}"
runs-on: "${{ matrix.os }}"
strategy:
matrix:
image: ["manylinux_2_28", "musllinux_1_1"]
arch: ["x86_64", "aarch64"]
exclude:
- image: "musllinux_1_1"
arch: "aarch64"
os: ["ubuntu-24.04", "ubuntu-24.04-arm", "macos-13", "macos-14"]
python: ["cp313"]
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up QEMU
if: matrix.arch == 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- run: pipx install cmeel
- run: cmeel docker -Ui "quay.io/pypa/${{ matrix.image }}_${{ matrix.arch }}"
if: matrix.arch != 'aarch64'
- run: cmeel docker -Ui "quay.io/pypa/${{ matrix.image }}_${{ matrix.arch }}"
if: matrix.arch == 'aarch64'
- run: pipx install cibuildwheel
- run: cibuildwheel
env:
CMEEL_CMAKE_ARGS: "-DTARGET=ARMV8"
CIBW_BUILD: "${{ matrix.python }}-*"
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"
- uses: actions/upload-artifact@v4
with:
path: wh
name: "artifact-${{ matrix.os }}-${{ matrix.python }}"
path: wheelhouse

macos:
name: "macos"
runs-on: "macos-latest"
test:
needs: ["wheel"]
name: "Test ${{ matrix.python }} ${{ matrix.os }}"
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os: ["ubuntu-24.04", "ubuntu-24.04-arm", "macos-13", "macos-14"]
python: ["cp313"]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
submodules: 'true'
name: "artifact-${{ matrix.os }}-${{ matrix.python }}"
path: wheelhouse
- run: echo "${{ matrix.python }}" | sed "s/cp3/PYTHON_VERSION=3./" >> "${GITHUB_ENV}"
- 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:
path: wh
python-version: ${{ env.PYTHON_VERSION }}
- name: index
run: |
python -m pip install -U pip
python -m pip install wheel simple503
python -m simple503 --base-url ${{ github.workspace }}/wheelhouse ${{ github.workspace }}/wheelhouse
- name: install deps
run: python -m pip install cmeel
- name: install wheel
run: python -m pip install -i "file://${{ github.workspace }}/wheelhouse" cmeel-openblas

sdist:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.13
- name: setup
run: |
python -m pip install -U pip
Expand All @@ -77,12 +82,17 @@ jobs:
run: python -m build -nso dist .
- uses: actions/upload-artifact@v4
with:
name: artifact-sdist
path: dist

release:
needs: ["linux", "macos", "sdist"]
needs: ["test", "sdist"]
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
environment: release
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -93,10 +103,14 @@ 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_openblas*.whl
- run: twine upload -u __token__ -p "${{ secrets.PYPI_TOKEN }}" artifact/cmeel_openblas*.tar.gz || true
with:
merge-multiple: true
path: dist
- run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- run: gh release create -t "Release ${{ env.TAG}}" "${{ env.TAG }}" artifact/cmeel_openblas*.{whl,tar.gz}
- run: gh release create -t "Release ${{ env.TAG}}" "${{ env.TAG }}" dist/cmeel_openblas*.{whl,tar.gz}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true

0 comments on commit 0668172

Please sign in to comment.