diff --git a/.github/workflows/test_neutrinos.yml b/.github/workflows/test_neutrinos.yml new file mode 100644 index 0000000000..7ae1c16098 --- /dev/null +++ b/.github/workflows/test_neutrinos.yml @@ -0,0 +1,49 @@ +name: test_neutrinos + +on: [pull_request] +jobs: + test_rhs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Get AMReX + run: | + mkdir external + cd external + git clone https://github.com/AMReX-Codes/amrex.git + cd amrex + git checkout development + echo 'AMREX_HOME=$(GITHUB_WORKSPACE)/external/amrex' >> $GITHUB_ENV + echo $AMREX_HOME + if [[ -n "${AMREX_HOME}" ]]; then exit 1; fi + cd ../.. + + - name: Install dependencies + run: | + sudo apt-get update -y -qq + sudo apt-get -qq -y install curl cmake jq clang g++>=9.3.0 + + - name: Build the fextrema tool + run: | + cd external/amrex/Tools/Plotfile + make programs=fextrema -j 2 + + - name: Compile + run: | + cd unit_test/test_neutrino_cooling + make realclean + make -j 4 + + - name: Run test_neutrino_cooling + run: | + cd unit_test/test_neutrino_cooling + ./main3d.gnu.ex inputs + ../../external/amrex/Tools/Plotfile/fextrema.gnu.ex test_sneut5 > test.out + + - name: Compare to stored output + run: | + cd unit_test/test_neutrino_cooling + diff test.out ci-benchmarks/test_sneut5.out diff --git a/unit_test/test_neutrino_cooling/ci-benchmarks/test_sneut5.out b/unit_test/test_neutrino_cooling/ci-benchmarks/test_sneut5.out new file mode 100644 index 0000000000..c314665d07 --- /dev/null +++ b/unit_test/test_neutrino_cooling/ci-benchmarks/test_sneut5.out @@ -0,0 +1,31 @@ + plotfile = test_sneut5 + time = 0 + variables minimum value maximum value + density 10 5000000000 + temperature 1000000 10000000000 + X_hydrogen-1 0.5 0.75 + X_helium-3 0 0.026315789474 + X_helium-4 0 0.25 + X_carbon-12 0 0.026315789474 + X_nitrogen-14 0 0.026315789474 + X_oxygen-16 0 0.026315789474 + X_neon-20 0 0.026315789474 + X_magnesium-24 0 0.026315789474 + X_silicon-28 0 0.026315789474 + X_sulfur-32 0 0.026315789474 + X_argon-36 0 0.026315789474 + X_calcium-40 0 0.026315789474 + X_titanium-44 0 0.026315789474 + X_chromium-48 0 0.026315789474 + X_chromium-56 0 0.026315789474 + X_iron-52 0 0.026315789474 + X_iron-54 0 0.026315789474 + X_iron-56 0 0.026315789474 + X_nickel-56 0 0.026315789474 + X_neutron 0 0.026315789474 + X_proton 0 0.026315789474 + sneut 0 3.3206297956e+23 + dsneutdt 0 2.9114557633e+14 + dsneutda -2.0028760264e+16 1.6034657416e+20 + dsneutdz -1.832532276e+20 2.2890025857e+16 +