Skip to content

Commit

Permalink
Processing update swmm v5.1.15 (#61)
Browse files Browse the repository at this point in the history
In addition to improvements described in ReleaseNotes this PR includes: 
 - Improvements to cmake build system
 - Testing scripts previously found in /tools have migrated to their own repo
 - Support for GitHub Actions has been added
  • Loading branch information
michaeltryby authored Sep 4, 2020
1 parent ce668c6 commit afbb518
Show file tree
Hide file tree
Showing 55 changed files with 2,048 additions and 813 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#
# build-and-test.yml - GitHub Actions CI for swmm-solver
#
# Created: May 19, 2020
# Updated: May 31, 2020
#
# Author: Michael E. Tryby
# US EPA - ORD/CESER
#

name: Build and Test

on:
push:
branches: [ master, develop, release, codedrop ]
pull_request:
branches: [ master, develop, release, codedrop ]

jobs:
win_build:
runs-on: windows-2016
defaults:
run:
shell: cmd
working-directory: ci-tools/windows

env:
OMP_NUM_THREADS: 1
PROJECT: swmm
BUILD_HOME: build
TEST_HOME: nrtests
NRTESTS_URL: https://github.com/SWMM-Project/swmm-nrtestsuite

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

- name: Checkout submodule
uses: actions/checkout@v2
with:
repository: michaeltryby/ci-tools
path: ci-tools

- 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 requirements-swmm.txt
- name: Build and unit test
run: make.cmd /t

- name: Build for reg test
run: make.cmd

- name: Before reg test
run: before-nrtest.cmd

- name: Run reg test
run: run-nrtests.cmd %GITHUB_RUN_ID%_%GITHUB_RUN_NUMBER%

- name: Upload artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: nrtest-artifacts
path: upload/
15 changes: 12 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@

# Eclipse Stuff
.metadata/
.settings/


.DS_Store

build*/
nrtest*/

*_export.h

src/outfile/include/*_export.h
src/solver/include/*_export.h

build/
nrtests/
upload/
4 changes: 2 additions & 2 deletions Build.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ Before the project can be built the required dependencies must be installed.
- Build
- Build Tools for Visual Studio 2017
- CMake 3.13

- ci-tools repository

### Build

SWMM can be built with one simple command.
```
\> cd swmm
\swmm>tools\make.cmd
\swmm>ci-tools\windows\make.cmd
```
28 changes: 4 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# CMakeLists.txt - CMake configuration file for swmm-solver
#
# Created: July 11, 2019
# Modified: Nov 25, 2019
# Updated: May 29, 2020
#
# Author: Michael E. Tryby
# US EPA ORD/CESER
Expand All @@ -17,12 +17,12 @@ endif()


project(swmm-solver
VERSION 5.1.14
VERSION 5.1.15
LANGUAGES C CXX
)

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

# Sets the position independent code property for all targets
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand All @@ -40,8 +40,7 @@ set(LIBRARY_DIST "lib")
set(CONFIG_DIST "cmake")


option(BUILD_TESTS "Builds component tests (requires Boost)" OFF)
option(BUILD_DEF "Builds library with def file interface" OFF)
option(BUILD_TESTS "Build component tests (requires Boost)" OFF)


# Add project subdirectories
Expand All @@ -55,25 +54,6 @@ if(BUILD_TESTS)
endif()


# Create target import scripts so other cmake projects can use swmm libraries
install(
EXPORT
swmm5Targets
DESTINATION
"${CONFIG_DIST}"
FILE
swmm5-config.cmake
)

install(
EXPORT
swmm-outputTargets
DESTINATION
"${CONFIG_DIST}"
FILE
swmm-output-config.cmake
)

# Create install rules for vcruntime.dll, msvcp.dll, vcomp.dll etc.
set(CMAKE_INSTALL_OPENMP_LIBRARIES TRUE)
include(InstallRequiredSystemLibraries)
Expand Down
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ Stormwater-Management-Model

ORD Stormwater Management Model (aka "SWMM")

Introduction
------------
This is the official SWMM source code repository maintained by US EPA ORD, NRMRL, Water Supply and Water Resources Division located in Cincinnati, Ohio.

## Build Status
![Build and Test](https://github.com/USEPA/Stormwater-Management-Model/workflows/Build%20and%20Test/badge.svg)


## Introduction
This is the official SWMM source code repository maintained by US EPA Office of Research and Development, Center For Environmental Solutions & Emergency Response, Water Infrastructure Division located in Cincinnati, Ohio.

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.

Find Out More
-------------
The source code distributed here is identical to the code found at the official [SWMM Website](http://www2.epa.gov/water-research/storm-water-management-model-swmm).

## Find Out More
The source code distributed here is identical to the code found at the official [SWMM Website](http://www2.epa.gov/water-research/storm-water-management-model-swmm).
Loading

0 comments on commit afbb518

Please sign in to comment.