diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 717001255..7627b9508 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -19,13 +19,12 @@ jobs: matrix: include: - os: ubuntu-20.04 - rust-target: x86_64-unknown-linux-gnu python-version: "3.7" - os: ubuntu-20.04 - rust-target: x86_64-unknown-linux-gnu python-version: "3.11" - os: macos-11 - rust-target: x86_64-apple-darwin + python-version: "3.11" + - os: windows-2019 python-version: "3.11" steps: - uses: actions/checkout@v3 @@ -39,13 +38,12 @@ jobs: uses: dtolnay/rust-toolchain@master with: toolchain: stable - target: ${{ matrix.rust-target }} - name: install python dependencies run: | python -m pip install --upgrade pip python -m pip install tox - echo "tox_version=$(tox --version | awk '{split($0, s," "); print s[1]}')" >> $GITHUB_ENV + echo "tox_version=$(python -c 'import tox; print(tox.__version__)')" >> $GITHUB_ENV - name: Setup sccache uses: mozilla-actions/sccache-action@v0.0.3 @@ -95,7 +93,7 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install tox - echo "tox_version=$(tox --version | awk '{split($0, s," "); print s[1]}')" >> $GITHUB_ENV + echo "tox_version=$(python -c 'import tox; print(tox.__version__)')" >> $GITHUB_ENV - name: cache tox environments uses: actions/cache@v3 diff --git a/.github/workflows/rust-tests.yml b/.github/workflows/rust-tests.yml index 78f761910..7a146a3b5 100644 --- a/.github/workflows/rust-tests.yml +++ b/.github/workflows/rust-tests.yml @@ -15,6 +15,10 @@ jobs: runs-on: ${{ matrix.os }} name: ${{ matrix.os }} / rust ${{ matrix.rust-version }} ${{ matrix.extra-name }} container: ${{ matrix.container }} + env: + # this is used on windows to put the compiled code on C:\\ since there is + # not enough space on D:\\ (only 12GiB, we need ~14GiB) + CARGO_TARGET_DIR: ${{ matrix.cargo-target-dir }} strategy: matrix: include: @@ -24,6 +28,8 @@ jobs: build-type: debug test-static-lib: true extra-name: / static C library + cargo-target-dir: target + - os: ubuntu-20.04 rust-version: stable rust-target: x86_64-unknown-linux-gnu @@ -31,6 +37,8 @@ jobs: cargo-build-flags: --release do-valgrind: true extra-name: / release valgrind + cargo-target-dir: target + # check the build on a stock Ubuntu 20.04, including cmake 3.16 - os: ubuntu-20.04 rust-version: "1.64" @@ -38,10 +46,20 @@ jobs: rust-target: x86_64-unknown-linux-gnu build-type: debug extra-name: / cmake 3.16 + cargo-target-dir: target + - os: macos-11 rust-version: stable rust-target: x86_64-apple-darwin build-type: debug + cargo-target-dir: target + + - os: windows-2019 + rust-version: stable + rust-target: x86_64-pc-windows-msvc + build-type: debug + cargo-target-dir: C:\\cargo-target-rascaline\\ + steps: - name: install dependencies in container if: matrix.container == 'ubuntu:20.04' diff --git a/.github/workflows/torch-tests.yml b/.github/workflows/torch-tests.yml index 171b42205..e362acb83 100644 --- a/.github/workflows/torch-tests.yml +++ b/.github/workflows/torch-tests.yml @@ -33,6 +33,11 @@ jobs: python-version: "3.11" cargo-test-flags: --release + - os: windows-2019 + torch-version: 2.0.* + python-version: "3.11" + cargo-test-flags: --release + steps: - uses: actions/checkout@v3 diff --git a/rascaline-torch/include/rascaline/torch/system.hpp b/rascaline-torch/include/rascaline/torch/system.hpp index 924ecb3f4..48e599379 100644 --- a/rascaline-torch/include/rascaline/torch/system.hpp +++ b/rascaline-torch/include/rascaline/torch/system.hpp @@ -2,7 +2,7 @@ #define RASCALINE_TORCH_SYSTEM_HPP #include -#include +#include #include @@ -138,7 +138,7 @@ class RASCALINE_TORCH_EXPORT SystemHolder final: public rascaline::System, publi }; // all precomputed pairs we know about - std::unordered_map precomputed_pairs_; + std::map precomputed_pairs_; // last custom requested by `compute_neighbors` double last_cutoff_ = -1.0; }; diff --git a/rascaline-torch/tests/system.cpp b/rascaline-torch/tests/system.cpp index a42b784fb..ee594b4f6 100644 --- a/rascaline-torch/tests/system.cpp +++ b/rascaline-torch/tests/system.cpp @@ -26,7 +26,7 @@ TEST_CASE("Systems") { Catch::Matchers::StartsWith( "trying to get neighbor list with a cutoff (3.3) for which no " "pre-computed neighbor lists has been registered (we have lists " - "for cutoff=[4.5, 3.2])" + "for cutoff=[3.2, 4.5])" ) ); diff --git a/rascaline/src/calculators/radial_basis/gto.rs b/rascaline/src/calculators/radial_basis/gto.rs index a2a0025b1..4bcca22de 100644 --- a/rascaline/src/calculators/radial_basis/gto.rs +++ b/rascaline/src/calculators/radial_basis/gto.rs @@ -94,7 +94,7 @@ mod tests { let overlap = basis.overlap(); for i in 0..basis.max_radial { - assert_ulps_eq!(overlap[(i, i)], 1.0); + assert_ulps_eq!(overlap[(i, i)], 1.0, max_ulps=10); } for i in 0..basis.max_radial {