Skip to content

MacOS Intel install and test #141

MacOS Intel install and test

MacOS Intel install and test #141

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: [ test_os ]
jobs:
Install_and_test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, macos-12]
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: |
#PY_VER=`echo py${{ matrix.python-version }} | tr -d .`
#echo $PY_VER
#pip3 install -r requirements-$PY_VER-macos.txt
#pip3 install -e .\[osgeo\]
echo "sqlite3 version"
which sqlite3
sqlite3 --version
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: |
source ~/openquake/bin/activate
pip3 install pytest
oq --version
oq dbserver start
#pytest -vsx --color=yes ~/work/oq-engine/oq-engine/openquake/hazardlib/tests/gsim/kotha_2020_test.py
#pytest -vsx --color=yes /Users/runner/work/oq-engine/oq-engine/openquake/sep
#pytest -vs --color=yes /Users/runner/work/oq-engine/oq-engine/openquake/calculators
oq engine --run ~/work/oq-engine/oq-engine/demos/risk/ClassicalDamage/job_hazard.ini
#
oq engine --run https://downloads.openquake.org/jobs/risk_test.zip
sleep 3
oq engine --run "https://github.com/gem/oq-engine/blob/master/openquake/server/tests/data/classical.zip?raw=true"