-
Notifications
You must be signed in to change notification settings - Fork 277
78 lines (76 loc) · 2.4 KB
/
macos_intel_install.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
name: MacOS Intel install and test
'on':
workflow_dispatch:
inputs:
git-ref:
description: Git Ref
default: master
required: true
schedule:
- cron: "0 1 * * *"
push:
branches: [macos_test]
jobs:
Install_and_test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13]
python-version: [3.9, "3.10"]
steps:
# This Checkout use git-ref keyword from dispatch
- name: Clone Repository (Master)
uses: actions/checkout@v2
if: github.event.inputs.git-ref == ''
- name: Clone Repository (Custom Ref)
uses: actions/checkout@v2
if: github.event.inputs.git-ref != ''
with:
ref: ${{ github.event.inputs.git-ref }}
- name: Set up Python3
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run Installation of oq-engine in devel mode
env:
BRANCH: ${{ github.event.inputs.git-ref }}
run: |
export PIP_DEFAULT_TIMEOUT=100
pip3 install -U pip wheel setuptools
#
echo "branch to test: ${BRANCH}"
if [[ "$BRANCH" != "" ]]
then
python install.py devel --version ${BRANCH}
else
python install.py devel
fi
- name: Run demos to test installation
run: |
set -x
source ~/openquake/bin/activate
oq dbserver start
sleep 10
oq info venv
oq info cfg
cd ~/work/oq-engine/oq-engine/demos
ls -lrt
# run demos with job_hazard.ini and job_risk.ini
for demo_dir in $(find . -type d | sort); do
if [ -f $demo_dir/job_hazard.ini ]; then
oq engine --run $demo_dir/job_hazard.ini --exports npz -p pointsource_distance=0
oq engine --run $demo_dir/job_risk.ini --hc -1
fi
done
# run the other demos
for ini in $(find . -name job.ini | sort); do
oq engine --run $ini --exports xml,hdf5 -p pointsource_distance=0 -r
done
- name: Run pytest to test installation
run: |
source ~/openquake/bin/activate
pip3 install pytest
oq --version
oq dbserver start
pytest -vs --color=yes /Users/runner/work/oq-engine/oq-engine/openquake/
sleep 2