Skip to content

Merge pull request #71 from lreis2415/feature/storm_module_updates #34

Merge pull request #71 from lreis2415/feature/storm_module_updates

Merge pull request #71 from lreis2415/feature/storm_module_updates #34

# Build SEIMS on macOS using AppleClang
name: Build on macOS using AppleClang
on:
push:
branches:
- dev
paths-ignore:
- 'data'
- 'gui'
- 'knowledge'
pull_request:
branches:
- dev
paths-ignore:
- 'data'
- 'gui'
- 'knowledge'
workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build-mac:
runs-on: macos-latest
steps:
- name: Setup xcode
uses: maxim-lobanov/setup-xcode@v1
- name: Check mongod
run: |
which mongod
cat /usr/local/etc/mongod.conf
- name: Start mongod manually
run: mongod --config /usr/local/etc/mongod.conf --fork
- name: Install mongo-c-driver
run: brew install mongo-c-driver
- name: Install GDAL
run: brew list gdal &>/dev/null || brew install gdal
- name: Setup MSMPI
uses: mpi4py/setup-mpi@v1
with:
mpi: openmpi
- name: Checkout SEIMS
uses: actions/checkout@v3
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build and Install SEIMS
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j 4
cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Cache conda
uses: actions/cache@v3
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('seims/py39seims_env.yml') }}
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: py39seims
environment-file: seims/py39seims_env.yml
auto-activate-base: false
auto-update-conda: true
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Run SEIMS on demo data
shell: bash -el {0}
run: |
#conda info
#conda list
#printenv | sort
cd seims
python pyseims_check.py
cd test
python demo_preprocess.py -name youwuzhen
python demo_runmodel.py -name youwuzhen
python demo_postprocess.py -name youwuzhen
python -m scoop -n 2 demo_parameters_sensitivity.py -name youwuzhen
python -m scoop -n 2 demo_calibration.py -name youwuzhen
python -m scoop -n 2 demo_scenario_analysis.py -name youwuzhen