Skip to content

Commit

Permalink
Run CI on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Luthaf committed Aug 24, 2023
1 parent 4b4b401 commit 8ecab02
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/[email protected]
Expand Down Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/rust-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,32 @@ jobs:
build-type: debug
test-static-lib: true
extra-name: / static C library

- os: ubuntu-20.04
rust-version: stable
rust-target: x86_64-unknown-linux-gnu
build-type: release
cargo-build-flags: --release
do-valgrind: true
extra-name: / release valgrind

# check the build on a stock Ubuntu 20.04, including cmake 3.16
- os: ubuntu-20.04
rust-version: "1.64"
container: ubuntu:20.04
rust-target: x86_64-unknown-linux-gnu
build-type: debug
extra-name: / cmake 3.16

- os: macos-11
rust-version: stable
rust-target: x86_64-apple-darwin
build-type: debug

- os: windows-2019
rust-version: stable
rust-target: x86_64-pc-windows-msvc
build-type: debug
steps:
- name: install dependencies in container
if: matrix.container == 'ubuntu:20.04'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/torch-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions rascaline-torch/include/rascaline/torch/system.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define RASCALINE_TORCH_SYSTEM_HPP

#include <vector>
#include <unordered_map>
#include <map>

#include <torch/script.h>

Expand Down Expand Up @@ -138,7 +138,7 @@ class RASCALINE_TORCH_EXPORT SystemHolder final: public rascaline::System, publi
};

// all precomputed pairs we know about
std::unordered_map<double, PrecomputedPairs> precomputed_pairs_;
std::map<double, PrecomputedPairs> precomputed_pairs_;
// last custom requested by `compute_neighbors`
double last_cutoff_ = -1.0;
};
Expand Down
2 changes: 1 addition & 1 deletion rascaline-torch/tests/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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])"
)
);

Expand Down
2 changes: 1 addition & 1 deletion rascaline/src/calculators/radial_basis/gto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8ecab02

Please sign in to comment.