Decrement torch version to satisfy tch-rs req #7
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: Cross-Platform TDAtaframe Build & Test | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| build-test: | |
| name: Build & Test (${{ matrix.os }} / Python ${{ matrix.python-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.12"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Rust (nightly) | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: nightly | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install maturin torch==2.7.0 pytest | |
| - name: Build wheel using PyTorch's libtorch | |
| env: | |
| LIBTORCH_USE_PYTORCH: 1 | |
| run: | | |
| maturin build --release --skip-auditwheel -m Cargo.toml | |
| - name: Install built wheel | |
| run: | | |
| pip install --force-reinstall target/wheels/*.whl | |
| - name: Run tests | |
| run: pytest -v | |