Skip to content

Commit 8fc308e

Browse files
committed
Fix test
1 parent 50cc9d8 commit 8fc308e

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ jobs:
104104
key: ${{ runner.os }}-lib-all-cargo-${{ hashFiles('**/Cargo.lock') }}
105105
- name: Build
106106
run: |
107-
cargo build --manifest-path="splashsurf_lib/Cargo.toml" --all-targets --all-features
107+
cargo build --package splashsurf_lib --all-targets --all-features
108108
- name: Run tests
109109
run: |
110-
cargo test --manifest-path="splashsurf_lib/Cargo.toml" --all-features
110+
cargo test --package splashsurf_lib --all-features
111111
- name: Run tests release mode
112112
run: |
113-
cargo test --manifest-path="splashsurf_lib/Cargo.toml" --release --all-features
113+
cargo test --package splashsurf_lib --release --all-features
114114
115115
build_lib_no_default_features:
116116
name: Build splashsurf_lib with no default features
@@ -134,10 +134,10 @@ jobs:
134134
key: ${{ runner.os }}-lib-no-default-cargo-${{ hashFiles('**/Cargo.lock') }}
135135
- name: Build
136136
run: |
137-
cargo build --manifest-path="splashsurf_lib/Cargo.toml" --all-targets --no-default-features
137+
cargo build --package splashsurf_lib --all-targets --no-default-features
138138
- name: Run tests
139139
run: |
140-
cargo test --manifest-path="splashsurf_lib/Cargo.toml" --no-default-features
140+
cargo test --package splashsurf_lib --no-default-features
141141
142142
publish:
143143
name: Publish to crates.io

splashsurf_lib/tests/integration_tests/test_subdomains.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use all_asserts::assert_range;
22
use nalgebra::Vector3;
33
use splashsurf_lib::GridDecompositionParameters;
4+
#[cfg(feature = "io")]
45
use splashsurf_lib::io::vtk_format::write_vtk;
56
use splashsurf_lib::marching_cubes::check_mesh_consistency;
67
use std::path::Path;
@@ -34,7 +35,14 @@ macro_rules! generate_single_particle_test {
3435

3536
let reconstruction =
3637
splashsurf_lib::reconstruct_surface::<i64, f32>(&particle_positions, &parameters)?;
37-
write_vtk(&reconstruction.mesh, &output_file, "mesh")?;
38+
#[cfg(feature = "io")]
39+
{
40+
write_vtk(&reconstruction.mesh, &output_file, "mesh")?;
41+
}
42+
#[cfg(not(feature = "io"))]
43+
{
44+
let _ = &output_file;
45+
}
3846

3947
assert_range!(
4048
$range_tri,

0 commit comments

Comments
 (0)