Skip to content

remove --platform=$BUILDPLATFORM #63

remove --platform=$BUILDPLATFORM

remove --platform=$BUILDPLATFORM #63

# Build SEIMS and Doxygen documents on Ubuntu
name: Build on Ubuntu using GCC
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_linux:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo
ports:
- 27017:27017
steps:
- name: Checkout SEIMS
uses: actions/checkout@v3
- name: Install GDAL and mongo-c-driver
run: sudo apt-get update && sudo apt-get install -qq gdal-bin libgdal-dev libmongoc-1.0-0 libmongoc-dev
- name: Setup MSMPI
uses: mpi4py/setup-mpi@v1
with:
mpi: mpich
- name: Checkout SEIMS
uses: actions/checkout@v3
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build and Install SEIMS
# Build your program with the given configuration
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j 4
cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Build Doc in English
uses: mattnotmitt/doxygen-action@v1.9.2
with:
working-directory: '.'
doxyfile-path: 'doc/Doxyfile.in'
- name: Build Doc in Chinese
uses: mattnotmitt/doxygen-action@v1.9.2
with:
working-directory: '.'
doxyfile-path: 'doc/Doxyfile.zh-cn.in'
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_message: ${{ github.event.head_commit.message }}
publish_branch: gh-pages
force_orphan: true
publish_dir: ./@CMAKE_CURRENT_BINARY_DIR@/html
- 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/pyseims_env.yml') }}
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: pyseims
environment-file: seims/pyseims_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