Sirocco: rename the code in source code and rename files with python in the filename #303
Workflow file for this run
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: "Sirocco: continuous integration tests" | |
on: | |
push: | |
branches: | |
- "dev" | |
- "main" | |
pull_request: | |
branches: | |
- "dev" | |
- "main" | |
env: | |
SIROCCO: ${{ github.workspace }} | |
jobs: | |
greeting: | |
name: Greeting job | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Print out environment variables" | |
run: | | |
echo "WORKSPACE IS $GITHUB_WORKSPACE" | |
echo "SIROCCO ENV VARIABLE IS: $SIROCCO" | |
build_and_test: | |
name: Build Python and run tests | |
runs-on: ubuntu-latest | |
needs: greeting | |
steps: | |
- uses: actions/checkout@v3 | |
#- name: "Installing build dependencies" | |
# run: sudo apt update && apt install -y build-essential cmake | |
- name: Configuring Python | |
run: ./configure | |
- name: Build GH Workflow version of Python | |
run: make gh_workflow_install | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: '3.x' # Version range | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
cd $SIROCCO/examples/gh-workflow/ | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
# - name: Compile programs, again | |
# run: | | |
# cd $SIROCCO/source | |
# make CC=gcc INDENT=no all | |
- name: Checking Sirocco compiled and can read in inputs correctly | |
run: | | |
cd $SIROCCO/examples/gh-workflow/ | |
$SIROCCO/bin/Setup_Py_Dir | |
$SIROCCO/bin/sirocco -i cv_macro_benchmark | |
$SIROCCO/bin/sirocco -i cv_standard | |
$SIROCCO/bin/sirocco -i fiducial_agn | |
$SIROCCO/bin/sirocco -i 1d_sn | |
$SIROCCO/bin/sirocco -i -d sv_detailedmode | |
$SIROCCO/bin/sirocco -i agn_ss_2010_modela | |
$SIROCCO/bin/sirocco -i XRB_standard.pf | |
$SIROCCO/bin/sirocco -i ngc5548 | |
$SIROCCO/bin/sirocco -i lamp_post | |
$SIROCCO/bin/sirocco -i cv_standard_import | |
- name: Running unit tests | |
run: | | |
cd $SIROCCO/source/tests | |
make check CC=gcc | |
- name: Running Balmer test case | |
run: | | |
cd $SIROCCO/examples/gh-workflow/ | |
$SIROCCO/bin/sirocco -f -v 1 balmer_test | |
python $SIROCCO/py_progs/balmer_decrement.py balmer_test |