Skip to content

debug workflow file #645

debug workflow file

debug workflow file #645

Workflow file for this run

#
# build-and-test.yml - GitHub Actions CI for swmm-solver
#
# Created: May 19, 2020
# Updated: Jun 22, 2021
#
# Author: Michael E. Tryby
# US EPA - ORD/CESER
#
# Caleb A. Buahin
# Xylem Inc.
#
name: Build and Test
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [windows-2022, ubuntu-20.04, macos-12]
requirements: [requirements-swmm.txt]
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
run_reg_test: run-nrtests.cmd
build_id: "%GITHUB_RUN_ID%_%GITHUB_RUN_NUMBER%"
experimental: false
artifacts_ext: zip
artifact_content_type: zip
defaults:
run:
shell: cmd
working-directory: ./ci-tools/windows
- 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"
before_reg_test: before-nrtest.sh
run_reg_test: run-nrtests.sh
build_id: ${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER}
experimental: true
artifacts_ext: tar.gz
artifact_content_type: tar
defaults:
run:
shell: bash
working-directory: ./ci-tools/linux
- os: macos-12
sys_pkgs: brew install libomp #boost
boost_platform_version: 12
boost_toolsit: clang
build_unit_test: make.zsh -t -g "Xcode"
build_reg_test: make.zsh -g "Xcode"
before_reg_test: before-nrtest.zsh
run_reg_test: run-nrtests.zsh
build_id: ${GITHUB_RUN_ID}_${GITHUB_RUN_NUMBER}
experimental: true
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
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Clone ci-tools repo
uses: actions/checkout@v3
with:
repository: pyswmm/ci-tools
ref: master
path: ci-tools
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Install requirements
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-swmm.txt
# 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/install-boost@v2.4.4
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/pyswmm/swmm-nrtestsuite
BENCHMARK_TAG: v3.1.0
run: ./${{ matrix.before_reg_test }} ${{ env.BENCHMARK_TAG }}
- name: Run reg test
run: ./${{ matrix.run_reg_test }} ${{ matrix.build_id }}
- name: Upload artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: build-test-artifacts
path: upload/*.*
cross-build:

Check failure on line 160 in .github/workflows/build-test.yml

View workflow run for this annotation

GitHub Actions / Build and Test

Invalid workflow file

The workflow is not valid. .github/workflows/build-test.yml (Line: 160, Col: 1): Unexpected value 'cross-build'
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: ./
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Clone ci-tools repo
uses: actions/checkout@v3
with:
repository: pyswmm/ci-tools
ref: master
path: ci-tools
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: start docker
run: docker run -id --name cross --volume="./:/swmm" karosc/build_swmm_arm64:latest
- name: Build and unit test
run: docker exec cross /bin/bash -c "cd /swmm && ./ci-tools/linux/make.sh -t -g 'Unix Makefiles'"
- name: Build for reg test
run: docker exec cross /bin/bash -c "cd /swmm && ./.github/docker_tools/run_reg_test.sh"
- name: Upload artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: build-test-artifacts
path: upload/*.*