Skip to content

Make sure to look in enough sub-cells when computing neighbors list #351

Make sure to look in enough sub-cells when computing neighbors list

Make sure to look in enough sub-cells when computing neighbors list #351

Workflow file for this run

name: TorchScript tests
on:
push:
branches: [master]
pull_request:
# Check all PR
concurrency:
group: torch-tests-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
tests:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} / Torch ${{ matrix.torch-version }}
strategy:
matrix:
include:
- os: ubuntu-20.04
torch-version: 1.11.*
python-version: "3.8"
cargo-test-flags: --release
- os: ubuntu-20.04
# These should be updated to torch 2.2 and Python 3.12 once
# https://github.com/pytorch/pytorch/issues/118862 is solved
torch-version: 2.1.*
python-version: "3.11"
cargo-test-flags: --release
do-valgrind: true
- os: macos-11
torch-version: 2.1.*
python-version: "3.11"
cargo-test-flags: --release
- os: windows-2019
torch-version: 2.1.*
python-version: "3.11"
cargo-test-flags: --release
steps:
- uses: actions/checkout@v4
- name: setup rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
# we get torch from pip to run the C++ test
- name: setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: install valgrind
if: matrix.do-valgrind
run: |
sudo apt-get update
sudo apt-get install -y valgrind
- name: Setup sccache
uses: mozilla-actions/[email protected]
with:
version: "v0.5.4"
- name: Setup sccache environnement variables
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "CMAKE_C_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV
echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV
- name: run TorchScript C++ tests
run: cargo test --package rascaline-torch ${{ matrix.cargo-test-flags }}
env:
# Use the CPU only version of torch when building/running the code
PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu
RASCALINE_TORCH_TEST_VERSION: ${{ matrix.torch-version }}