Skip to content

Decref the reference to the type held by an instance when deallocating an instance of an extension type #3921

Decref the reference to the type held by an instance when deallocating an instance of an extension type

Decref the reference to the type held by an instance when deallocating an instance of an extension type #3921

Workflow file for this run

name: netlify-build
on:
push:
branches:
- main
pull_request:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
guide-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
- uses: actions/setup-python@v7
with:
python-version: "3.14"
- uses: dtolnay/rust-toolchain@nightly
- name: Setup mdBook
uses: taiki-e/install-action@v2
with:
tool: mdbook@0.5, mdbook-tabs@0.3, lychee
- name: Prepare tag
id: prepare_tag
run: |
TAG_NAME="${GITHUB_REF##*/}"
echo "tag_name=${TAG_NAME}" >> $GITHUB_OUTPUT
- name: Restore lychee cache
id: restore-cache
uses: actions/cache/restore@v6
with:
path: .lycheecache
key: lychee-${{ github.run_id }}
restore-keys: lychee-
# This builds the book in target/guide/.
- name: Build the guide
run: |
python -m pip install --upgrade pip && pip install nox[uv]
nox -s ${{ github.event_name == 'release' && 'build-guide' || 'check-guide' }}
env:
PYO3_VERSION_TAG: ${{ github.event_name == 'release' && steps.prepare_tag.outputs.tag_name || 'main' }}
# allows lychee to get better rate limits from github
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Save lychee cache
uses: actions/cache/save@v6
if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
with:
path: .lycheecache
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
# We store the versioned guides on GitHub's gh-pages branch for convenience
# (the full gh-pages branch is pulled in the build-netlify-site step)
- name: Deploy the guide
if: ${{ github.event_name == 'release' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/guide/
destination_dir: ${{ steps.prepare_tag.outputs.tag_name }}
full_commit_message: "Upload documentation for ${{ steps.prepare_tag.outputs.tag_name }}"
- name: Get current PyO3 version
run: |
PYO3_VERSION=$(cargo search pyo3 --limit 1 | head -1 | tr -s ' ' | cut -d ' ' -f 3 | tr -d '"')
echo "PYO3_VERSION=${PYO3_VERSION}" >> $GITHUB_ENV
- name: Build the site
run: |
python -m pip install --upgrade pip && pip install nox[uv] towncrier requests
nox -s build-netlify-site -- ${{ (github.ref != 'refs/heads/main' && '--preview') || '' }}
# Upload the built site as an artifact for deploy workflow to consume
- name: Upload Build Artifact
uses: actions/upload-artifact@v7
with:
name: site
path: ./netlify_build