Skip to content

Commit

Permalink
Merge pull request #77 from Xiangyu-Hu/mrge_with_bitbucket
Browse files Browse the repository at this point in the history
Mrge with bitbucket
  • Loading branch information
Xiangyu-Hu authored Dec 20, 2021
2 parents 7945bda + ecd0cc4 commit f715470
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 11 deletions.
50 changes: 42 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,47 @@ jobs:
cd build
cmake .. -DSIMBODY_HOME=/home/runner/simbody
make -j$(nproc)
- name: Test with first try
- name: Test with the first try
id: first-try
if: ${{ env.CI_SKIP == 'false' }}
run: ctest
run: |
cd /home/runner/work/SPHinXsys/SPHinXsys
cd build
ctest --output-on-failure
continue-on-error: true

- name: Test with second try for failed cases
if: ${{ env.CI_SKIP == 'false' }}
run: ctest --rerun-failed


- name: Test with the second try for failed cases
id: second-try
if: ${{ env.CI_SKIP == 'false' && steps.first-try.outcome == 'failure' }}
run: |
cd /home/runner/work/SPHinXsys/SPHinXsys
cd build
ctest --rerun-failed --output-on-failure
continue-on-error: true

- name: Test with the third try for failed cases
id: third-try
if: ${{ env.CI_SKIP == 'false' && steps.second-try.outcome == 'failure' }}
run: |
cd /home/runner/work/SPHinXsys/SPHinXsys
cd build
ctest --rerun-failed --output-on-failure
continue-on-error: true

- name: Test with the fourth try for failed cases
id: fourth-try
if: ${{ env.CI_SKIP == 'false' && steps.third-try.outcome == 'failure' }}
run: |
cd /home/runner/work/SPHinXsys/SPHinXsys
cd build
ctest --rerun-failed --output-on-failure
continue-on-error: true

- name: Test with the last try for failed cases
if: ${{ env.CI_SKIP == 'false' && steps.fourth-try.outcome == 'failure' }}
run: |
cd /home/runner/work/SPHinXsys/SPHinXsys
cd build
ctest --rerun-failed --output-on-failure
4 changes: 1 addition & 3 deletions tests/3d_examples/test_3d_dambreak/Dambreak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ int main()
/** Output the body states for restart simulation. */
RestartIO restart_io(in_output, system.real_bodies_);
/** Output the mechanical energy of fluid body. */
RegressionTestEnsembleAveraged<BodyReducedQuantityRecording<TotalMechanicalEnergy>>
BodyReducedQuantityRecording<TotalMechanicalEnergy>
write_water_mechanical_energy(in_output, water_block, gravity);
ObservedQuantityRecording<indexScalar, Real>
write_recorded_water_pressure("Pressure", in_output, fluid_observer_contact);
Expand Down Expand Up @@ -231,7 +231,5 @@ int main()
tt = t4 - t1 - interval;
std::cout << "Total wall time for computation: " << tt.seconds() << " seconds." << std::endl;

write_water_mechanical_energy.newResultTest();

return 0;
}

0 comments on commit f715470

Please sign in to comment.