feat(cosinepair): add lazy constructor that skips init() #924
Workflow file for this run
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| tests: | |
| runs-on: "${{ matrix.platform.os }}-latest" | |
| strategy: | |
| matrix: | |
| platform: | |
| [ | |
| { os: "windows", target: "x86_64-pc-windows-msvc" }, | |
| { os: "windows", target: "i686-pc-windows-msvc" }, | |
| { os: "ubuntu", target: "x86_64-unknown-linux-gnu" }, | |
| { os: "ubuntu", target: "i686-unknown-linux-gnu" }, | |
| { os: "ubuntu", target: "wasm32-unknown-unknown" }, | |
| { os: "macos", target: "aarch64-apple-darwin" }, | |
| ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache .cargo and target | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo | |
| ./target | |
| key: ${{ runner.os }}-cargo-${{ matrix.platform.target }}-${{ hashFiles('**/Cargo.toml') }} | |
| restore-keys: ${{ runner.os }}-cargo-${{ matrix.platform.target }} | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.platform.target }} | |
| - name: Install test runner for wasm | |
| if: matrix.platform.target == 'wasm32-unknown-unknown' | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Stable Build with all features | |
| run: cargo build --all-features --target ${{ matrix.platform.target }} | |
| - name: Stable Build without features | |
| run: cargo build --target ${{ matrix.platform.target }} | |
| - name: Tests | |
| if: matrix.platform.target == 'x86_64-unknown-linux-gnu' || matrix.platform.target == 'x86_64-pc-windows-msvc' || matrix.platform.target == 'aarch64-apple-darwin' | |
| run: cargo test --all-features | |
| - name: Tests in WASM | |
| if: matrix.platform.target == 'wasm32-unknown-unknown' | |
| run: wasm-pack test --node -- --all-features | |
| check_features: | |
| runs-on: "${{ matrix.platform.os }}-latest" | |
| strategy: | |
| matrix: | |
| platform: [{ os: "ubuntu" }] | |
| features: | |
| - "--features serde" | |
| - "--features datasets" | |
| - "--features ndarray-bindings" | |
| - "" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache .cargo and target | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo | |
| ./target | |
| key: ${{ runner.os }}-cargo-features-${{ hashFiles('Cargo.toml') }} | |
| restore-keys: ${{ runner.os }}-cargo-features | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Stable Build | |
| run: cargo build --no-default-features ${{ matrix.features }} | |
| - name: Tests | |
| if: matrix.features == '--features ndarray-bindings' | |
| run: cargo test --no-default-features ${{ matrix.features }} | |
| msrv: | |
| # Verify the declared rust-version (MSRV) in Cargo.toml still builds. | |
| name: MSRV (1.85) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache .cargo and target | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo | |
| ./target | |
| key: ${{ runner.os }}-msrv-${{ hashFiles('Cargo.toml') }} | |
| restore-keys: ${{ runner.os }}-msrv | |
| - name: Install Rust 1.85 | |
| uses: dtolnay/rust-toolchain@1.85.0 | |
| - name: Build with all features at MSRV | |
| run: cargo +1.85.0 build --all-features | |
| - name: Build without features at MSRV | |
| run: cargo +1.85.0 build |