Update doc fxy #69
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build SEIMS on macOS using AppleClang | |
name: Build on macOS using AppleClang | |
on: | |
push: | |
branches: | |
- dev | |
paths-ignore: | |
- 'data' | |
- 'knowledge' | |
pull_request: | |
branches: | |
- dev | |
paths-ignore: | |
- 'data' | |
- '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 | |
# Default MongoBD was preinstalled on macos-12 and macos-11, | |
# currently, use https://github.com/ankane/setup-mongodb on macos-13 and macos-14 (latest) | |
- name: Setup MongoDB | |
uses: ankane/setup-mongodb@v1 | |
with: | |
mongodb-version: 7.0 | |
- name: Run MongoDB | |
run: mongosh --eval "db.version()" | |
- 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@v4 | |
- 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@v4 | |
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/pyseims_env.yml') }} | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
activate-environment: pyseims | |
environment-file: seims/pyseims_env.yml | |
miniconda-version: "latest" | |
auto-activate-base: true | |
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 |