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

Post release review #64

Merged
merged 6 commits into from
Jan 30, 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
226 changes: 111 additions & 115 deletions .github/workflows/build_and_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,124 +4,124 @@ on:
workflow_dispatch

jobs:
# check_main:
# runs-on: ubuntu-latest
# steps:
# - name: Release from main
# if: github.ref == 'refs/heads/main'
# run: echo '::notice ::Building and uploading release'
# - name: No release
# if: github.ref != 'refs/heads/main'
# run: echo '::warning ::Release can only be run from the main branch!' && exit 1
# linux:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# # aarch64, ppc64le and s390x fail?
# target: [x86_64, x86, armv7]
# needs: [check_main]
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.target }}
# args: --release --out dist --find-interpreter
# sccache: 'true'
# manylinux: auto
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: wheels
# path: dist
check_main:
runs-on: ubuntu-latest
steps:
- name: Release from main
if: github.ref == 'refs/heads/main'
run: echo '::notice ::Building and uploading release'
- name: No release
if: github.ref != 'refs/heads/main'
run: echo '::warning ::Release can only be run from the main branch!' && exit 1
linux:
runs-on: ubuntu-latest
strategy:
matrix:
# aarch64, ppc64le and s390x fail?
target: [x86_64, x86, armv7]
needs: [check_main]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist

# windows:
# runs-on: windows-latest
# strategy:
# matrix:
# target: [x64, x86]
# needs: [check_main]
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# architecture: ${{ matrix.target }}
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.target }}
# args: --release --out dist --find-interpreter
# sccache: 'true'
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: wheels
# path: dist
windows:
runs-on: windows-latest
strategy:
matrix:
target: [x64, x86]
needs: [check_main]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist

# macos:
# runs-on: macos-latest
# strategy:
# matrix:
# target: [x86_64, aarch64]
# needs: [check_main]
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.target }}
# args: --release --out dist --find-interpreter
# sccache: 'true'
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: wheels
# path: dist
macos:
runs-on: macos-latest
strategy:
matrix:
target: [x86_64, aarch64]
needs: [check_main]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist

# sdist:
# runs-on: ubuntu-latest
# needs: [check_main]
# steps:
# - uses: actions/checkout@v3
# - name: Build sdist
# uses: PyO3/maturin-action@v1
# with:
# command: sdist
# args: --out dist
# - name: Upload sdist
# uses: actions/upload-artifact@v4
# with:
# name: wheels
# path: dist
sdist:
runs-on: ubuntu-latest
needs: [check_main]
steps:
- uses: actions/checkout@v3
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist

# release:
# runs-on: ubuntu-latest
# needs: [linux, windows, macos, sdist]
# # if: startsWith(github.ref, 'refs/tags/')
# environment:
# name: pypi
# url: https://pypi.org/p/verbs
# permissions:
# id-token: write
# steps:
# - name: Download dists
# uses: actions/download-artifact@v4
# with:
# name: wheels
# path: dist/
# - name: Publish distribution 📦 to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
release:
runs-on: ubuntu-latest
needs: [linux, windows, macos, sdist]
if: startsWith(github.ref, 'refs/tags/')
environment:
name: pypi
url: https://pypi.org/p/verbs
permissions:
id-token: write
steps:
- name: Download dists
uses: actions/download-artifact@v4
with:
name: wheels
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

build_docs:
runs-on: ubuntu-latest
# needs: release
needs: release
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -132,10 +132,6 @@ jobs:
- uses: actions/upload-pages-artifact@v3.0.0
with:
path: docs/python/build/html
# - uses: actions/upload-artifact@v4
# with:
# name: github-pages
# path: docs/python/build/html

publish_docs:
runs-on: ubuntu-latest
Expand Down
Loading
Loading