Test extras #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C++ network | |
on: [pull_request] | |
jobs: | |
compilation: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
cache-dependency-path: 'pyproject.toml' | |
- name: Install dependencies and pynucastro | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
- 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: Get Microphysics | |
run: | | |
cd external | |
git clone https://github.com/AMReX-Astro/Microphysics.git | |
cd Microphysics | |
git checkout development | |
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: Regenerate subch_approx network | |
run: | | |
cd external/Microphysics/networks/subch_approx | |
python subch_approx.py | |
- name: Compile burn_cell (subch_approx) | |
run: | | |
cd external/Microphysics/unit_test/burn_cell | |
make realclean | |
make NETWORK_DIR=subch_approx -j 4 | |
- name: Run burn_cell (subch_approx) | |
run: | | |
cd external/Microphysics/unit_test/burn_cell | |
./main3d.gnu.ex inputs_subch_approx > test.out | |
- name: Compare to stored output (subch_approx) | |
run: | | |
cd external/Microphysics/unit_test/burn_cell | |
diff -I "^Initializing AMReX" -I "^AMReX" -I "^reading in reaclib rates" test.out ${GITHUB_WORKSPACE}/.github/workflows/microphysics-benchmarks/subch_approx_unit_test.out | |
- name: Regenerate ECSN network | |
run: | | |
cd external/Microphysics/networks/ECSN | |
python ecsn_network_generation.py | |
- name: Compile burn_cell (ECSN) | |
run: | | |
cd external/Microphysics/unit_test/burn_cell | |
make realclean | |
make NETWORK_DIR=ECSN -j 4 | |
- name: Run burn_cell (ECSN) | |
run: | | |
cd external/Microphysics/unit_test/burn_cell | |
./main3d.gnu.ex inputs_ecsn > test.out | |
- name: Compare to stored output (ECSN) | |
run: | | |
cd external/Microphysics/unit_test/burn_cell | |
diff -I "^Initializing AMReX" -I "^AMReX" -I "^reading in reaclib rates" test.out ${GITHUB_WORKSPACE}/.github/workflows/microphysics-benchmarks/ecsn_unit_test.out | |
- name: Regenerate ase network | |
run: | | |
cd external/Microphysics/networks/ase | |
python ase.py | |
- name: Compile test_ase (NSE_NET, ase) | |
run: | | |
cd external/Microphysics/unit_test/test_ase | |
make realclean | |
make -j 4 | |
- name: Run test_ase (NSE_NET, ase) | |
run: | | |
cd external/Microphysics/unit_test/test_ase | |
./main3d.gnu.ex inputs_ase > test.out | |
- name: Compare to stored output (NSE_NET, ase) | |
run: | | |
cd external/Microphysics/unit_test/test_ase | |
diff -I "^Initializing AMReX" -I "^AMReX" -I "^reading in reaclib rates" test.out ${GITHUB_WORKSPACE}/.github/workflows/microphysics-benchmarks/ase_nse_net_unit_test.out |