fixed lifetimes on component getter methods #83
This file contains hidden or 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
| name: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: [main, "dev/**"] | |
| tags: | |
| - "v*.*.*" | |
| pull_request: | |
| branches: [main] | |
| release: | |
| types: [published] | |
| jobs: | |
| python-checks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.9" | |
| version: "0.9.2" | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --locked --dev | |
| - name: Run ruff check | |
| run: uv run ruff check . | |
| - name: Run ruff format check | |
| run: uv run ruff format --check . | |
| - name: Run mypy | |
| run: uv run mypy src/ | |
| rust-checks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| components: rustfmt, clippy | |
| - name: Check formatting | |
| working-directory: crates | |
| run: cargo fmt --all -- --check | |
| - name: Build | |
| working-directory: crates | |
| run: cargo build --workspace --all-features | |
| - name: Run clippy | |
| working-directory: crates | |
| run: cargo clippy --workspace --all-features -- -D warnings | |
| - name: Run tests | |
| working-directory: crates | |
| run: cargo test --workspace --all-features | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.13" | |
| version: "0.9.2" | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --locked --group docs | |
| - name: Install Rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| components: rustfmt | |
| - name: Test build documentation | |
| run: | | |
| cd docs | |
| uv run make html | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| components: rustfmt | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| version: "0.9.2" | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --locked --dev | |
| - name: Run tests | |
| run: uv run pytest tests/ -n auto --cov=peakrdl_rust --cov-report=xml | |
| - name: Report coverage | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| file: coverage.xml | |
| flag-name: run-${{ join(matrix.*, '-') }} | |
| parallel: true | |
| coverage: | |
| needs: [test] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Finish Coveralls | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| parallel-finished: true | |
| # Smoke-test the PyInstaller builds on every push. Artifacts are not kept. | |
| build-binaries: | |
| needs: [python-checks, rust-checks, test] | |
| uses: ./.github/workflows/_build_binaries.yml | |
| draft-release: | |
| name: Create draft release | |
| needs: [python-checks, rust-checks, test, build-binaries] | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Download all binary artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: ${{ needs.build-binaries.outputs.artifact-pattern }} | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Print checksums to summary | |
| run: | | |
| echo "## SHA-256 Checksums" >> "$GITHUB_STEP_SUMMARY" | |
| echo "" >> "$GITHUB_STEP_SUMMARY" | |
| echo '```' >> "$GITHUB_STEP_SUMMARY" | |
| cat artifacts/*.sha256 >> "$GITHUB_STEP_SUMMARY" | |
| echo '```' >> "$GITHUB_STEP_SUMMARY" | |
| echo "" >> "$GITHUB_STEP_SUMMARY" | |
| # Also print to the log for easy access | |
| echo "=== Checksums ===" | |
| cat artifacts/*.sha256 | |
| - name: Create draft release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| generate_release_notes: true | |
| files: artifacts/* |