-
Notifications
You must be signed in to change notification settings - Fork 3
176 lines (147 loc) · 4.68 KB
/
Ubuntu.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name: Ubuntu
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
Ubuntu-coverage:
runs-on: ubuntu-24.04
env:
FC: gfortran
PFUNIT_DIR: /home/runner/work/GORILLA/GORILLA/pFUnit/build/installed/PFUNIT-4.7/
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Dependencies
run: |
sudo apt-get update
sudo apt-get install wget unzip gfortran liblapack-dev libnetcdff-dev
sudo apt install lcov
- name: Install pFUnit
run: |
git clone https://github.com/Goddard-Fortran-Ecosystem/pFUnit
cd pFUnit
mkdir -p build
cd build
cmake ..
make -j$(nproc)
make tests
make install
- name: Additional Files
run: |
cd $GITHUB_WORKSPACE
wget -O 954.zip "https://dl.acm.org/action/downloadSupplement?doi=10.1145%2F2699468&file=954.zip&download=true"
unzip 954.zip
cp 954/F90/Src/Polynomial234RootSolvers.f90 SRC/contrib/
- name: Build
run: |
./build_coverage.sh
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: BUILD/COVERAGE/
Ubuntu:
runs-on: ubuntu-20.04
env:
FC: gfortran
PFUNIT_DIR: /home/runner/work/GORILLA/GORILLA/pFUnit/build/installed/PFUNIT-4.7
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Dependencies
run: |
sudo apt-get update
sudo apt-get install wget unzip gfortran liblapack-dev libnetcdff-dev
- name: Additional Files
run: |
cd $GITHUB_WORKSPACE
wget -O 954.zip "https://dl.acm.org/action/downloadSupplement?doi=10.1145%2F2699468&file=954.zip&download=true"
unzip 954.zip
cp 954/F90/Src/Polynomial234RootSolvers.f90 SRC/contrib/
- name: Build
run: |
make
- name: Run examples
run: |
cd EXAMPLES/example_1
../BUILD/test_gorilla_main.x
cd ../../EXAMPLES/example_2
../BUILD/test_gorilla_main.x
cd ../../EXAMPLES/example_3
../BUILD/test_gorilla_main.x
cd ../../EXAMPLES/example_4
../BUILD/test_gorilla_main.x
cd ../../EXAMPLES/example_5
../BUILD/test_gorilla_main.x
cd ../../EXAMPLES/example_6
../BUILD/test_gorilla_main.x
cd ../../EXAMPLES/example_7
../BUILD/test_gorilla_main.x
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
- name: Run MATLAB scripts
uses: matlab-actions/run-command@v1
with:
command: |
cd MATLAB
example_1
example_2
example_3
example_4
example_5
example_6
example_7
example_8
- name: Run MATLAB livescript
uses: matlab-actions/run-command@v1
with:
command: |
cd MATLAB
plotting_tutorial
- name: Archive MATLAB results
uses: actions/upload-artifact@v3
with:
name: MATLAB-RESULTS
path: MATLAB/data_plots
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install PYTHON dependencies
run: |
python -m pip install --upgrade pip
pip install f90nml numpy matplotlib jupyter jupyterlab
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run PYTHON scripts
run: |
cd PYTHON
python3.9 example_1.py
python3.9 example_2.py
python3.9 example_3.py
python3.9 example_4.py
python3.9 example_5.py
python3.9 example_6.py
python3.9 example_7.py
- name: Run PYTHON plottingscripts
run: |
cd PYTHON
python3.9 plot_example_1.py
python3.9 plot_example_2.py
python3.9 plot_example_3.py
python3.9 plot_example_4.py
python3.9 plot_example_5.py
python3.9 plot_example_6.py
python3.9 plot_example_7.py
- name: Run JUPYTER notebook
run: |
cd PYTHON
jupyter nbconvert --to script plotting_tutorial.ipynb
python3.9 plotting_tutorial.py
- name: Archive PYTHON results
uses: actions/upload-artifact@v3
with:
name: PYTHON-RESULTS
path: PYTHON/data_plots