Bump version to 202506018.1.0-rc.1 for first release candidate (#2) #10
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, develop ] | |
| release: | |
| types: [ published ] | |
| # Add explicit permissions | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| # Check for changes to determine which jobs to run | |
| changes: | |
| name: Check Changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| core: ${{ steps.filter.outputs.core }} | |
| docs: ${{ steps.filter.outputs.docs }} | |
| examples: ${{ steps.filter.outputs.examples }} | |
| examples-changed: ${{ steps.filter.outputs.examples-changed }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Needed for proper change detection | |
| - name: Check for changes | |
| id: filter | |
| uses: dorny/paths-filter@v2 | |
| with: | |
| filters: | | |
| core: | |
| - 'crates/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - 'benches/**' | |
| - 'tests/**' | |
| docs: | |
| - 'docs/**' | |
| - '**/*.md' | |
| - 'README.md' | |
| examples: | |
| - 'examples/**' | |
| examples-changed: | |
| - 'examples/**' | |
| # Core checks: format, lint, tests, builds | |
| core-checks: | |
| name: Core Checks (Format, Lint, Tests, Builds) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| needs: changes | |
| if: needs.changes.outputs.core == 'true' || github.event_name == 'release' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust toolchain | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cargo/bin | |
| key: rust-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: core-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
| cache-on-failure: true | |
| cache-all-crates: true | |
| shared-key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pkg-config libssl-dev | |
| # Run format and lint in parallel | |
| - name: Format and lint | |
| run: | | |
| cargo fmt --all -- --check & | |
| cargo clippy --all-targets --all-features -- -D warnings & | |
| wait | |
| # Run tests and builds in parallel | |
| - name: Tests and builds | |
| run: | | |
| cargo test --all-targets --all-features & | |
| cargo build --all-targets --all-features & | |
| wait | |
| # Build examples if they changed | |
| - name: Build examples | |
| if: needs.changes.outputs.examples-changed == 'true' | |
| run: cargo build --examples --all-features | |
| # Test with minimal features | |
| - name: Test minimal features | |
| run: | | |
| cargo test --no-default-features --lib | |
| cargo test --features http --lib | |
| cargo test --features oauth --lib | |
| # Documentation and security | |
| docs-security: | |
| name: Documentation and Security | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| needs: [changes, core-checks] | |
| if: (needs.changes.outputs.docs == 'true' || needs.changes.outputs.core == 'true') && needs.core-checks.result == 'success' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: docs-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
| cache-on-failure: true | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pkg-config libssl-dev | |
| # Run docs and security in parallel | |
| - name: Build documentation and security audit | |
| run: | | |
| cargo doc --no-deps --all-features & | |
| cargo install cargo-audit & | |
| wait | |
| cargo audit | |
| - name: Upload documentation artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: documentation | |
| path: target/doc/ | |
| # Advanced checks (only on main branch) | |
| advanced: | |
| name: Advanced Checks (Benchmarks, Package Validation) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| needs: [changes, core-checks, docs-security] | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.core-checks.result == 'success' && needs.docs-security.result == 'success' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: advanced-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
| cache-on-failure: true | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pkg-config libssl-dev | |
| # Run benchmarks and package validation in parallel | |
| - name: Benchmarks and package validation | |
| run: | | |
| cargo bench --all-features --no-run & | |
| for crate in crates/*/; do | |
| if [ -f "$crate/Cargo.toml" ]; then | |
| echo "Validating $crate" | |
| cargo check --manifest-path "$crate/Cargo.toml" --all-features | |
| fi | |
| done & | |
| wait | |
| - name: Upload benchmark results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-results | |
| path: target/criterion/ |