Skip to content

Commit

Permalink
update actions runner
Browse files Browse the repository at this point in the history
- add caching for boost
- update boost to 1.81
- update nrtest benchmarks for swmm 5.2.1
  • Loading branch information
karosc committed Mar 19, 2023
1 parent f209040 commit 1ea204b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
36 changes: 33 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
include:
- os: windows-2022
sys_pkgs: choco install boost-msvc-14.3
boost_platform_version: 2022
boost_toolsit: mvc
build_unit_test: make.cmd /g "Visual Studio 17 2022" /A "x64" /t
build_reg_test: make.cmd /g "Visual Studio 17 2022" /A "x64"
before_reg_test: before-nrtest.cmd
Expand All @@ -40,6 +42,8 @@ jobs:

- os: ubuntu-20.04
sys_pkgs: sudo apt install libboost-dev libboost-all-dev
boost_platform_version: 20.04
boost_toolsit: gcc
# Statically link libraries with -s switch to address GitHub Ubuntu 20.04 symbol errors (issue #340)
build_unit_test: make.sh -s -t -g "Unix Makefiles"
build_reg_test: make.sh -s -g "Unix Makefiles"
Expand All @@ -55,7 +59,9 @@ jobs:
working-directory: ./ci-tools/linux

- os: macos-10.15
sys_pkgs: brew install libomp boost
sys_pkgs: brew install libomp #boost
boost_platform_version: 10.15
boost_toolsit: clang
build_unit_test: make.zsh -t -g "Xcode"
build_reg_test: make.zsh -g "Xcode"
before_reg_test: before-nrtest.zsh
Expand Down Expand Up @@ -102,19 +108,43 @@ jobs:
python -m pip install --upgrade pip
python -m pip install -r requirements-swmm.txt
- name: Install required system packages
# install boost on mac and linux
- name: Install required system packages on mac and linux
run: ${{ matrix.sys_pkgs }}
if: ${{ runner.os == 'macOS' }}

# boost takes a while to install on windows, so try to cache
- name: Install boost
# if: ${{runner.os == 'Windows'}}
uses: MarkusJx/[email protected]
id: install-boost
with:
# REQUIRED: Specify the required boost version
# A list of supported versions can be found here:
# https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json
boost_version: 1.81.0
link: shared
# OPTIONAL: Specify a custon install location
# boost_install_dir: C:\some_directory
# OPTIONAL: Specify a platform version
platform_version: ${{ matrix.boost_platform_version }}
# OPTIONAL: Specify a toolset
toolset: ${{ matrix.boost_toolset }}

- name: Build and unit test
env:
BOOST_ROOT_1_81_0: ${{ steps.install-boost.outputs.BOOST_ROOT }}
run: ./${{ matrix.build_unit_test }}

- name: Build for reg test
env:
BOOST_ROOT_1_81_0: ${{ steps.install-boost.outputs.BOOST_ROOT }}
run: ./${{ matrix.build_reg_test }}

- name: Before reg test
env:
NRTESTS_URL: https://github.com/OpenWaterAnalytics/swmm-nrtestsuite
BENCHMARK_TAG: v2.0.2
BENCHMARK_TAG: v3.0.0
run: ./${{ matrix.before_reg_test }} ${{ env.BENCHMARK_TAG }}

- name: Run reg test
Expand Down
5 changes: 4 additions & 1 deletion extern/boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ endif()


# ADD NEW BOOST LIBRARIES VERSIONS HERE
if (DEFINED ENV{BOOST_ROOT_1_76_0})
if (DEFINED ENV{BOOST_ROOT_1_81_0})
set(BOOST_ROOT $ENV{BOOST_ROOT_1_81_0})

elseif (DEFINED ENV{BOOST_ROOT_1_76_0})
set(BOOST_ROOT $ENV{BOOST_ROOT_1_76_0})

elseif (DEFINED ENV{BOOST_ROOT_1_74_0})
Expand Down

0 comments on commit 1ea204b

Please sign in to comment.