-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use uv and mkdocs, add dependencies to pyproject.toml, restructured source, added stub * fix python extension package test * changes to pyproject.toml * more examples and info in docs, removed SIArray1 in favor of python functions, updated stubs, fixed typos * fix merge conflict * changed root Cargo.toml (removed workspace), renamed array1 to array, added correct installation docs * fix import * updated release gh-action and fixed typo in mkdocs config * add crates back as workspace members * write extend_quantity as declarative pyo3 module * Remove doctests from CI * split release workflow * readd win32 and use matrix for macos * fix matrix * also update pypi release workflow --------- Co-authored-by: Philipp Rehner <[email protected]>
- Loading branch information
Showing
33 changed files
with
1,215 additions
and
726 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
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Release Documentation | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
build-documentation: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
- name: Install python dependencies | ||
run: | | ||
pip install mkdocs-material mkdocstrings-python | ||
- name: Build Wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
manylinux: auto | ||
command: build | ||
args: --release --out dist -m si-units/Cargo.toml | ||
- name: Install module | ||
run: | | ||
pip install si-units --no-index --find-links dist --force-reinstall | ||
- name: Build documentation | ||
run: mkdocs build -f si-units/mkdocs.yml -d ../public | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: documentation | ||
path: public | ||
|
||
release-documentation: | ||
needs: [build-documentation] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: documentation | ||
path: public | ||
- name: Deploy documentation to gh-pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./public |
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 |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Release PyPI | ||
|
||
on: | ||
push: | ||
tags: ["s-units-v*"] | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
- name: Build Wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
manylinux: auto | ||
command: build | ||
args: --release --out dist -m si-units/Cargo.toml | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheel-linux-x86_64 | ||
path: dist | ||
|
||
macos: | ||
strategy: | ||
matrix: | ||
target: [ {arch: x64, target: x86_64}, {arch: arm64, target: aarch64} ] | ||
runs-on: macos-14 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
architecture: ${{ matrix.target.arch }} | ||
- name: Build wheels - ${{ matrix.target.target }} | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target.target }} | ||
args: --release --out dist -m si-units/Cargo.toml | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheel-macos-${{ matrix.target.target }} | ||
path: dist | ||
|
||
windows: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
target: [x64, x86] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
architecture: ${{ matrix.target }} | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
args: --release --out dist -m si-units/Cargo.toml | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheel-windows-${{ matrix.target }} | ||
path: dist | ||
|
||
deploy-pypi: | ||
name: Publish wheels to PyPI and TestPyPI | ||
runs-on: ubuntu-latest | ||
needs: [linux, windows, macos] | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: wheel-* | ||
path: wheels | ||
merge-multiple: true | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
- name: Publish to PyPi | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
run: | | ||
pip install --upgrade twine | ||
twine upload --skip-existing wheels/* |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.