forked from sirocco-rt/sirocco
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (70 loc) · 2.2 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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 Sirocco 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 Sirocco
run: ./configure
- name: Build GH Workflow version of Sirocco
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