Skip to content

Commit

Permalink
Merge pull request #316 from OpenWaterAnalytics/release
Browse files Browse the repository at this point in the history
Merge master <-- release
  • Loading branch information
michaeltryby authored Dec 21, 2020
2 parents 0c08b0d + 68e859f commit ca28c83
Show file tree
Hide file tree
Showing 155 changed files with 68,258 additions and 3 deletions.
146 changes: 146 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
#
# build-and-test.yml - GitHub Actions CI for swmm-solver
#
# Created: May 19, 2020
# Updated: Aug 13, 2020
#
# Author: Michael E. Tryby
# US EPA - ORD/CESER
#
# Caleb A. Buahin
# Xylem Inc.
#

name: Build and Test

on: [push, pull_request]
# push:
# branches: [master release develop]
# tags:
# - 'v*.*.*'
# pull_request:
# branches: [master release develop]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [windows-2016, ubuntu-16.04, macos-latest]
requirements: [requirements-swmm.txt]
include:
- os: windows-2016
generator: Visual Studio 15 2017 Win64
experimental: true
script_extension: cmd
artifacts_ext: zip
artifact_content_type: zip
gh_run_number: "%GITHUB_RUN_ID%_%GITHUB_RUN_NUMBER%"
defaults:
run:
shell: cmd
working-directory: ./ci-tools/windows
- os: ubuntu-16.04
generator: "Unix Makefiles"
experimental: true
script_extension: sh
gh_run_number: ${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER}
artifacts_ext: tar.gz
artifact_content_type: tar
defaults:
run:
shell: bash
working-directory: ./ci-tools/linux
- os: macos-latest
generator: Xcode
experimental: true
ci_tools_path: ci-tools/darwin
script_extension: zsh
gh_run_number: ${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER}
artifacts_ext: tar.gz
artifact_content_type: tar
defaults:
run:
shell: zsh {0}
working-directory: ./ci-tools/darwin

runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
defaults:
run:
shell: ${{ matrix.defaults.run.shell }}
working-directory: ${{ matrix.defaults.run.working-directory }}
env:
OMP_NUM_THREADS: 1
PROJECT: swmm
BUILD_HOME: build
TEST_HOME: nrtests
NRTESTS_URL: https://github.com/OpenWaterAnalytics/swmm-nrtestsuite
# ACTIONS_ALLOW_UNSECURE_COMMANDS: true

steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: recursive

- name: Setup python
uses: actions/setup-python@v2
with:
python-version: "3.7"

- name: Install requirements
run: |
python -m pip install --upgrade pip
python -m pip install -r ${{ matrix.requirements }}
- name: Install Darwin requirements
if: ${{ contains(matrix.os, 'macos') }}
run: |
brew install libomp
brew install boost
- name: Build and unit test
run: |
./make.${{ matrix.script_extension }} -t -g "${{ matrix.generator }}"
- name: Build for reg test
run: |
./make.${{ matrix.script_extension }} -g "${{ matrix.generator }}"
- name: Before reg test
run: |
./before-nrtest.${{ matrix.script_extension }}
- name: Run reg test
run: |
./run-nrtests.${{ matrix.script_extension }} ${{ matrix.gh_run_number }}
- name: Upload artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: build-test-artifacts
path: upload/*.*

# - name: Create release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# draft: true
# prerelease: true

# - name: Upload release assets
# id: upload-release-asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: upload/${PROJECT}*.${{ matrix.artifacts_ext }}
# asset_name: owa-${PROJECT}-${{ matrix.os }}-${{ github.ref }}.${{ matrix.artifacts_ext }}
# asset_content_type: application/${{ matrix.artifact_content_type }}
47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

# Eclipse Stuff
.metadata/
.settings/
.cproject
.project
.pydevproject


# Mac Stuff
.DS_Store

/build/VC2010-DLL/Debug/VC2010-DLL.tlog/VC2010-DLL.lastbuildstate
/build/VC2010-DLL/Debug/VC2010-DLL.tlog/unsuccessfulbuild
/build/VC2010-DLL/Debug/VC2010-DLL.tlog
/build/VC2010-DLL/Debug
/documentation
/Makefile_LINUX_WORKS_openmp.txt
/target
*.zip


# Build files
build/
*.o
/Debug/
/build-linux/


# Git merge files
*.orig


# Testing
nrtests/
upload/
performance.json
stderr.log
stdout.log

tests/solver/data/*.rpt
tests/solver/data/**/*.rpt
tests/solver/data/**/*.out
tests/solver/data/feng*

# Generated files
*_export.h
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ci-tools"]
path = ci-tools
url = https://github.com/OpenWaterAnalytics/ci-tools.git
26 changes: 26 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Authors ordered by first contribution.


Authors with Contributions in the Public Domain:

Lewis Rossman <[email protected]>
Robert Dickinson <[email protected]>
Michael Tryby <[email protected]>
Katherine Ratliff <[email protected]>
Michelle Simon <[email protected]>


Authors with Contributions Subject to Copyright (see LICENSE):

Bryant E. McDonnell <[email protected]>
Adam Erispaha <[email protected]>
Sam Hatchett <[email protected]>
Gonzalo Peña-Castellanos <[email protected]>
Abhiram Mullapudi <[email protected]>
Jennifer Wu <[email protected]>
Dominik Leutnant <[email protected]>
Xu Xi <[email protected]>
Caleb Buahin <[email protected]>
Hsi-Nien Tan <[email protected]>
Mingda Zhang <[email protected]>
Laurent Courty <[email protected]>
80 changes: 80 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#
# CMakeLists.txt - CMake configuration file for swmm-solver
#
# Created: July 11, 2019
# Updated: May 29, 2020
#
# Author: Michael E. Tryby
# US EPA ORD/CESER
#


cmake_minimum_required (VERSION 3.13)

# Disable in-source builds (they are messy)
if("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
message(FATAL_ERROR "In-source builds are disabled.")
endif()


project(swmm-solver
VERSION 5.1.13
LANGUAGES C CXX
)

# Append local dir to module search path
# list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)

# Sets the position independent code property for all targets
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

# Sets default install prefix when cmakecache is initialized for first time
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "..." FORCE)
endif()


# Define install locations (will be prepended by install prefix)
set(TOOL_DIST "bin")
set(INCLUDE_DIST "include")
set(LIBRARY_DIST "lib")
set(CONFIG_DIST "cmake")


option(BUILD_TESTS "Build component tests (requires Boost)" OFF)
option(BUILD_DOCS "Build toolkit docs (requires Doxygen)" OFF)


# Add project subdirectories
if(BUILD_DOCS)
add_subdirectory(docs)
endif()

add_subdirectory(src/outfile)
add_subdirectory(src/solver)
add_subdirectory(src/run)
add_subdirectory(src/shared)

if(BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif()


# Pass var up the project tree
if(APPLE)
set(EXTERN_LIB_PATH ${EXTERN_LIB_PATH} PARENT_SCOPE)
endif()


# Create install rules for vcruntime.dll, msvcp.dll, vcomp.dll etc.
set(CMAKE_INSTALL_OPENMP_LIBRARIES TRUE)
include(InstallRequiredSystemLibraries)


# Configure CPack driven installer package
set(CPACK_GENERATOR "ZIP;TGZ")
set(CPACK_PACKAGE_VENDOR "US_EPA")
set(CPACK_ARCHIVE_FILE_NAME "swmm")

include(CPack)
23 changes: 23 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
MIT License

Contains public domain works. Other works copyright the AUTHORS

Copyright (c) 2016 (see AUTHORS.txt).

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
37 changes: 34 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
Stormwater-Management-Model
===========================
# Stormwater-Management-Model

ORD Stormwater Management Model repository
ORD Stormwater Management Model (aka "SWMM")

## Project Information

[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/OpenWaterAnalytics/Stormwater-Management-Model)
[![Join the chat at https://gitter.im/OpenWaterAnalytics/lobby](https://badges.gitter.im/OpenWaterAnalytics/Stormwater-Management-Model.svg)](https://gitter.im/OpenWaterAnalytics/lobby)
[![docs](https://img.shields.io/badge/docs-passing-green.svg)](http://wateranalytics.org/Stormwater-Management-Model/)

## Build Status
![build](https://github.com/OpenWaterAnalytics/Stormwater-Management-Model/workflows/Build%20and%20Test/badge.svg?branch=master)

# Introduction
This is the open source SWMM source code repository maintained by the Open
Water Analytics group.

SWMM is a dynamic hydrology-hydraulic water quality simulation model. It is
used for single event or long-term (continuous) simulation of runoff quantity
and quality from primarily urban areas. SWMM source code is written in the C
Programming Language and released in the Public Domain.

# Contributing

Everyone is welcome to contribute to this project.

See [CONTRIBUTING.md](https://github.com/OpenWaterAnalytics/Stormwater-Management-Model/blob/develop/.github/CONTRIBUTING.md) for insructions on setting your development environment.

# Regression Testing

To run the test suite for please refer to the [REGRESSION_TESTING.md](https://github.com/OpenWaterAnalytics/Stormwater-Management-Model/blob/develop/.github/REGRESSION_TESTING.md)

# Code of Conduct

The SWMM Project follows the [Contributor Covenant Code of Conduct](https://github.com/OpenWaterAnalytics/Stormwater-Management-Model/blob/develop/.github/CODE_OF_CONDUCT.md)
Loading

0 comments on commit ca28c83

Please sign in to comment.