Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:10:43

0001 #!/bin/bash
0002 
0003 set -e # abort on error
0004 
0005 # get script directory
0006 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
0007 REPO_DIR="$SCRIPT_DIR/.."
0008 
0009 mkdir -p $REPO_DIR/Core/src/Propagator/codegen
0010 mkdir -p $REPO_DIR/Core/src/Propagator/detail/codegen
0011 
0012 # run code generation
0013 export PYTHONPATH=$REPO_DIR/codegen:$PYTHONPATH
0014 python $REPO_DIR/codegen/generate_sympy_stepper.py > $REPO_DIR/Core/src/Propagator/codegen/sympy_stepper_math.hpp
0015 python $REPO_DIR/codegen/generate_sympy_jac.py > $REPO_DIR/Core/src/Propagator/detail/codegen/sympy_jac_math.hpp
0016 python $REPO_DIR/codegen/generate_sympy_cov.py > $REPO_DIR/Core/src/Propagator/detail/codegen/sympy_cov_math.hpp
0017 
0018 _format=${CLANG_FORMAT_BINARY:-clang-format}
0019 $_format --version
0020 $_format -i -style=file $REPO_DIR/Core/src/Propagator/codegen/sympy_stepper_math.hpp
0021 $_format -i -style=file $REPO_DIR/Core/src/Propagator/detail/codegen/sympy_jac_math.hpp
0022 $_format -i -style=file $REPO_DIR/Core/src/Propagator/detail/codegen/sympy_cov_math.hpp
0023 
0024 if ! [ -z $CI ] || ! [ -z $GITHUB_ACTIONS ]; then
0025   mkdir changed
0026   for f in $(git diff --name-only); do
0027     cp --parents $f changed
0028   done
0029 fi
0030 
0031 echo "\033[32mINFO\033[0m"\
0032      "codegen done"
0033 
0034 set +e
0035 git diff --exit-code --stat
0036 result=$?
0037 
0038 exit $result