- workflow updates
- python stubs
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
name: PyTest
|
||||
|
||||
on: [push, pull_request, workflow_call]
|
||||
|
||||
jobs:
|
||||
pytest:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.10", "3.12", "3.14"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Restore cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cache/pip
|
||||
~/.cache/pip-wheel
|
||||
~/.cache/sccache
|
||||
~/.cache/cargo-xwin
|
||||
~/.cargo
|
||||
~/.osxcross
|
||||
key: cache-ubuntu-maturin-cross-compile
|
||||
|
||||
- name: Install Rust
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
if ! command -v rustc >/dev/null 2>&1; then
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
else
|
||||
rustup update
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: "cargo test"
|
||||
run: |-
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
cargo test
|
||||
|
||||
- name: Store cache
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cache/pip
|
||||
~/.cache/pip-wheel
|
||||
~/.cache/sccache
|
||||
~/.cache/cargo-xwin
|
||||
~/.cargo
|
||||
~/.osxcross
|
||||
key: cache-ubuntu-maturin-cross-compile
|
||||
@@ -8,8 +8,10 @@ permissions:
|
||||
jobs:
|
||||
publish_pytest:
|
||||
uses: ./.github/workflows/pytest.yml
|
||||
publish_cargo_test:
|
||||
uses: ./.github/workflows/cargo_test.yml
|
||||
crates_io_publish:
|
||||
needs: [ publish_pytest ]
|
||||
needs: [ publish_pytest, publish_cargo_test ]
|
||||
name: Publish (crates.io)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 25
|
||||
@@ -50,7 +52,7 @@ jobs:
|
||||
# have passed.
|
||||
- name: "cargo release publish"
|
||||
run: |-
|
||||
export PATH="$HOME/.osxcross/bin:$PATH"
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
cargo login ${{ secrets.CRATES_IO_API_TOKEN }}
|
||||
cargo release \
|
||||
publish \
|
||||
|
||||
@@ -8,8 +8,10 @@ permissions:
|
||||
jobs:
|
||||
publish_pytest:
|
||||
uses: ./.github/workflows/pytest.yml
|
||||
publish_cargo_test:
|
||||
uses: ./.github/workflows/cargo_test.yml
|
||||
pypi_publish:
|
||||
needs: [ publish_pytest ]
|
||||
needs: [ publish_pytest, publish_cargo_test ]
|
||||
name: Publish (pypi.org)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
python -m pip install --upgrade pip
|
||||
pip install maturin ziglang
|
||||
pip install maturin
|
||||
if ! command -v sccache >/dev/null 2>&1; then
|
||||
cargo install sccache || pip install sccache
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user