Skip to content
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
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Bug Report
description: Report a bug in rxml
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug! Please fill in the details below.

- type: textarea
id: description
attributes:
label: Description
description: A clear description of the bug.
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Steps to Reproduce
description: Minimal code or steps to reproduce the issue.
placeholder: |
```python
from rxml import read_file
# ...
```

- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What you expected to happen.

- type: textarea
id: actual
attributes:
label: Actual Behavior
description: What actually happened (include tracebacks if applicable).

- type: input
id: python-version
attributes:
label: Python Version
placeholder: "3.12.0"

- type: input
id: rxml-version
attributes:
label: rxml Version
placeholder: "2.3.6"

- type: input
id: os
attributes:
label: Operating System
placeholder: "Ubuntu 24.04 / macOS 15 / Windows 11"
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Feature Request
description: Suggest a new feature for rxml
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Have an idea to improve rxml? We'd love to hear it.

- type: textarea
id: description
attributes:
label: Description
description: A clear description of the feature you'd like.
validations:
required: true

- type: textarea
id: use-case
attributes:
label: Use Case
description: What problem does this solve? How would you use it?

- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Have you considered any alternative approaches or workarounds?
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Description

<!-- What does this PR do? Why is it needed? -->

## Changes

<!-- List the key changes made -->

-

## Checklist

- [ ] Tests pass (`cargo test`)
- [ ] Code is formatted (`cargo fmt` and `ruff format`)
- [ ] Lints pass (`cargo clippy`)
- [ ] Updated documentation (if applicable)
- [ ] Added/updated tests (if applicable)
147 changes: 61 additions & 86 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ on:
push:
branches:
- main
- master
tags:
- '*'
- "*"
pull_request:
workflow_dispatch:

Expand All @@ -15,143 +14,122 @@ permissions:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: update
run: |
rustup update
rustup component add clippy
rustup install nightly
- name: lint
run: |
cargo fmt -- --check
cargo clippy -- -D warnings
- name: test
run: |
cargo check
cargo test --all
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cargo fmt
run: cargo fmt --all -- --check
- name: Cargo clippy
run: cargo clippy --all-targets -- -D warnings
- name: Cargo test
run: cargo test --all --release

linux:
runs-on: ${{ matrix.platform.runner }}
runs-on: ubuntu-latest
needs: [test]
strategy:
matrix:
platform:
- runner: ubuntu-22.04
target: x86_64
- runner: ubuntu-22.04
target: x86
- runner: ubuntu-22.04
target: aarch64
- runner: ubuntu-22.04
target: armv7
- runner: ubuntu-22.04
target: s390x
- runner: ubuntu-22.04
target: ppc64le
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
python-version: "3.x"
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
sccache: "true"
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}
name: wheels-linux-${{ matrix.target }}
path: dist

musllinux:
runs-on: ${{ matrix.platform.runner }}
runs-on: ubuntu-latest
needs: [test]
strategy:
matrix:
platform:
- runner: ubuntu-22.04
target: x86_64
- runner: ubuntu-22.04
target: x86
- runner: ubuntu-22.04
target: aarch64
- runner: ubuntu-22.04
target: armv7
target: [x86_64, x86, aarch64, armv7]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
python-version: "3.x"
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
sccache: "true"
manylinux: musllinux_1_2
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-musllinux-${{ matrix.platform.target }}
name: wheels-musllinux-${{ matrix.target }}
path: dist

windows:
runs-on: ${{ matrix.platform.runner }}
runs-on: windows-latest
needs: [test]
strategy:
matrix:
platform:
- runner: windows-latest
target: x64
- runner: windows-latest
target: x86
target: [x64, x86]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
architecture: ${{ matrix.platform.target }}
python-version: "3.x"
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.platform.target }}
name: wheels-windows-${{ matrix.target }}
path: dist

macos:
runs-on: ${{ matrix.platform.runner }}
needs: [test]
strategy:
matrix:
platform:
- runner: macos-13
target: x86_64
- runner: macos-14
target: aarch64
include:
- target: x86_64
runner: macos-14
- target: aarch64
runner: macos-14
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
python-version: "3.x"
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}
name: wheels-macos-${{ matrix.target }}
path: dist

sdist:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v4
- name: Build sdist
Expand All @@ -168,26 +146,23 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
needs: [linux, musllinux, windows, macos, sdist]
permissions:
# Use to sign the release artifacts
id-token: write
# Used to upload release artifacts
contents: write
# Used to generate artifact attestation
attestations: write
attestations: write # for artifact attestation
contents: read
id-token: write # for trusted publishing
Comment thread
nephi-dev marked this conversation as resolved.
steps:
- uses: actions/download-artifact@v4
Comment thread
nephi-dev marked this conversation as resolved.
- name: Generate artifact attestation
with:
pattern: wheels-*
merge-multiple: true
path: dist
Comment thread
nephi-dev marked this conversation as resolved.
- name: Attest build provenance
uses: actions/attest-build-provenance@v2
with:
subject-path: 'wheels-*/*'
subject-path: dist/*
- name: Publish to PyPI
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*
packages-dir: dist
Loading