Skip to content

[JMT] Move the Ipopt's solution consistency into a function #384

[JMT] Move the Ipopt's solution consistency into a function

[JMT] Move the Ipopt's solution consistency into a function #384

Workflow file for this run

name: Linux
on:
push:
schedule:
- cron: 0 4 * * MON
env:
BUILD_RELEASE: Release
BUILD_DEBUG: Debug
jobs:
build_release:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{runner.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_RELEASE
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_RELEASE
- uses: actions/upload-artifact@v2
with:
name: tests_release
path: ${{runner.workspace}}/build/test/**/*_test
retention-days: 1
- uses: actions/upload-artifact@v2
with:
name: io_test_release_data
path: test/io/data/
retention-days: 1
- uses: actions/upload-artifact@v2
with:
name: propagators_test_release_data
path: test/propagators/data/
retention-days: 1
- uses: actions/upload-artifact@v2
with:
name: math_test_release_data
path: test/math/data/
retention-days: 1
- uses: actions/upload-artifact@v2
with:
name: libraries_release
path: ${{runner.workspace}}/build/lion/thirdparty/lib/*
retention-days: 1
build_debug:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{runner.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_DEBUG
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_DEBUG
- uses: actions/upload-artifact@v2
with:
name: tests_debug
path: ${{runner.workspace}}/build/test/**/*_test
retention-days: 1
- uses: actions/upload-artifact@v2
with:
name: io_test_debug_data
path: test/io/data/
retention-days: 1
- uses: actions/upload-artifact@v2
with:
name: propagators_test_debug_data
path: test/propagators/data/
retention-days: 1
- uses: actions/upload-artifact@v2
with:
name: math_test_debug_data
path: test/math/data/
retention-days: 1
- uses: actions/upload-artifact@v2
with:
name: libraries_debug
path: ${{runner.workspace}}/build/lion/thirdparty/lib/*
retention-days: 1
valgrind:
runs-on: ubuntu-latest
needs: [build_debug]
steps:
- uses: actions/checkout@v2
- uses: actions/upload-artifact@v2
with:
name: valgrind_utils
path: ${{runner.workspace}}/lion-cpp/.github/workflows/valgrindtest.sh
retention-days: 1
frame_test_release:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
needs: [build_release]
steps:
- uses: actions/download-artifact@v2
with:
name: tests_release
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: libraries_release
path: ${{runner.workspace}}
- name: Frame test
working-directory: ${{runner.workspace}}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: cp ./frame/frame_test . && chmod +x ./frame_test && export LD_LIBRARY_PATH=${{runner.workspace}}:${LD_LIBRARY_PATH} && ./frame_test
frame_test_debug:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
needs: [build_debug]
steps:
- uses: actions/download-artifact@v2
with:
name: tests_debug
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: libraries_debug
path: ${{runner.workspace}}
- name: Frame test
working-directory: ${{runner.workspace}}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: cp ./frame/frame_test . && chmod +x ./frame_test && export LD_LIBRARY_PATH=${{runner.workspace}}:${LD_LIBRARY_PATH} && ./frame_test
frame_test_debug_valgrind:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
needs: [valgrind]
steps:
- uses: actions/download-artifact@v2
with:
name: valgrind_utils
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: tests_debug
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: libraries_debug
path: ${{runner.workspace}}
- name: Apt-get update
working-directory: ${{runner.workspace}}
shell: bash
run: sudo apt-get update
- name: Get valgrind
working-directory: ${{runner.workspace}}
shell: bash
run: sudo apt install -y valgrind
- name: Frame valgrind test
working-directory: ${{runner.workspace}}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: cp ./frame/frame_test . && chmod +x ./frame_test && sh valgrindtest.sh frame
math_test_release:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
needs: [build_release]
steps:
- uses: actions/download-artifact@v2
with:
name: tests_release
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: math_test_release_data
path: ${{runner.workspace}}/data
- uses: actions/download-artifact@v2
with:
name: libraries_release
path: ${{runner.workspace}}
- name: Math test
working-directory: ${{runner.workspace}}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: cp ./math/math_test . && chmod +x ./math_test && export LD_LIBRARY_PATH=${{runner.workspace}}:${LD_LIBRARY_PATH} && ./math_test
math_test_debug:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
needs: [build_debug]
steps:
- uses: actions/download-artifact@v2
with:
name: tests_debug
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: math_test_debug_data
path: ${{runner.workspace}}/data
- uses: actions/download-artifact@v2
with:
name: libraries_debug
path: ${{runner.workspace}}
- name: Math test
working-directory: ${{runner.workspace}}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: cp ./math/math_test . && chmod +x ./math_test && export LD_LIBRARY_PATH=${{runner.workspace}}:${LD_LIBRARY_PATH} && ./math_test
math_test_debug_valgrind:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
needs: [valgrind]
steps:
- uses: actions/download-artifact@v2
with:
name: tests_debug
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: math_test_debug_data
path: ${{runner.workspace}}/data
- uses: actions/download-artifact@v2
with:
name: valgrind_utils
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: libraries_debug
path: ${{runner.workspace}}
- name: Apt-get update
working-directory: ${{runner.workspace}}
shell: bash
run: sudo apt-get update
- name: Get valgrind
working-directory: ${{runner.workspace}}
shell: bash
run: sudo apt install -y valgrind
- name: Math valgrind test
working-directory: ${{runner.workspace}}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: cp ./math/math_test . && chmod +x ./math_test && sh valgrindtest.sh math
propagators_test_release:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
needs: [build_release]
steps:
- uses: actions/download-artifact@v2
with:
name: propagators_test_release_data
path: ${{runner.workspace}}/data
- uses: actions/download-artifact@v2
with:
name: tests_release
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: libraries_release
path: ${{runner.workspace}}
- name: Propagators test
working-directory: ${{runner.workspace}}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: cp propagators/propagators_test . && chmod +x ./propagators_test && export LD_LIBRARY_PATH=${{runner.workspace}}:${LD_LIBRARY_PATH} && ./propagators_test
propagators_test_debug:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
needs: [build_debug]
steps:
- uses: actions/download-artifact@v2
with:
name: propagators_test_debug_data
path: ${{runner.workspace}}/data
- uses: actions/download-artifact@v2
with:
name: tests_debug
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: libraries_debug
path: ${{runner.workspace}}
- name: Propagators test
working-directory: ${{runner.workspace}}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: cp propagators/propagators_test . && chmod +x ./propagators_test && export LD_LIBRARY_PATH=${{runner.workspace}}:${LD_LIBRARY_PATH} && ./propagators_test
propagators_test_debug_valgrind:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
needs: [valgrind]
steps:
- uses: actions/download-artifact@v2
with:
name: propagators_test_debug_data
path: ${{runner.workspace}}/data
- uses: actions/download-artifact@v2
with:
name: valgrind_utils
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: tests_debug
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: libraries_debug
path: ${{runner.workspace}}
- name: Apt-get update
working-directory: ${{runner.workspace}}
shell: bash
run: sudo apt-get update
- name: Get valgrind
working-directory: ${{runner.workspace}}
shell: bash
run: sudo apt install -y valgrind
- name: Propagators valgrind test
working-directory: ${{runner.workspace}}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: cp propagators/propagators_test . && chmod +x ./propagators_test && sh valgrindtest.sh propagators
io_test_release:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
needs: [build_release]
steps:
- uses: actions/download-artifact@v2
with:
name: io_test_release_data
path: ${{runner.workspace}}/data
- uses: actions/download-artifact@v2
with:
name: tests_release
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: libraries_release
path: ${{runner.workspace}}
- name: IO test
working-directory: ${{runner.workspace}}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: cp io/io_test . && chmod +x ./io_test && export LD_LIBRARY_PATH=${{runner.workspace}}:${LD_LIBRARY_PATH} && ./io_test
io_test_debug:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
needs: [build_debug]
steps:
- uses: actions/download-artifact@v2
with:
name: io_test_debug_data
path: ${{runner.workspace}}/data
- uses: actions/download-artifact@v2
with:
name: tests_debug
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: libraries_debug
path: ${{runner.workspace}}
- name: IO test
working-directory: ${{runner.workspace}}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: cp io/io_test . && chmod +x ./io_test && export LD_LIBRARY_PATH=${{runner.workspace}}:${LD_LIBRARY_PATH} && ./io_test
io_test_debug_valgrind:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
needs: [valgrind]
steps:
- uses: actions/download-artifact@v2
with:
name: valgrind_utils
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: tests_debug
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: libraries_debug
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: io_test_debug_data
path: ${{runner.workspace}}/data
- name: Apt-get update
working-directory: ${{runner.workspace}}
shell: bash
run: sudo apt-get update
- name: Get valgrind
working-directory: ${{runner.workspace}}
shell: bash
run: sudo apt install -y valgrind
- name: Io valgrind test
working-directory: ${{runner.workspace}}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: cp io/io_test . && chmod +x ./io_test && sh valgrindtest.sh io
foundation_test_release:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
needs: [build_release]
steps:
- uses: actions/download-artifact@v2
with:
name: tests_release
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: libraries_release
path: ${{runner.workspace}}
- name: Foundation test
working-directory: ${{runner.workspace}}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: cp foundation/foundation_test . && chmod +x ./foundation_test && export LD_LIBRARY_PATH=${{runner.workspace}}:${LD_LIBRARY_PATH} && ./foundation_test
foundation_test_debug:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
needs: [build_debug]
steps:
- uses: actions/download-artifact@v2
with:
name: tests_debug
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: libraries_debug
path: ${{runner.workspace}}
- name: Foundation test
working-directory: ${{runner.workspace}}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: cp foundation/foundation_test . && chmod +x ./foundation_test && export LD_LIBRARY_PATH=${{runner.workspace}}:${LD_LIBRARY_PATH} && ./foundation_test
foundation_test_debug_valgrind:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
needs: [valgrind]
steps:
- uses: actions/download-artifact@v2
with:
name: valgrind_utils
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: tests_debug
path: ${{runner.workspace}}
- uses: actions/download-artifact@v2
with:
name: libraries_debug
path: ${{runner.workspace}}
- name: Apt-get update
working-directory: ${{runner.workspace}}
shell: bash
run: sudo apt-get update
- name: Get valgrind
working-directory: ${{runner.workspace}}
shell: bash
run: sudo apt install -y valgrind
- name: Foundation valgrind test
working-directory: ${{runner.workspace}}
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: cp foundation/foundation_test . && chmod +x ./foundation_test && sh valgrindtest.sh foundation
remove_artifacts_release:
runs-on: ubuntu-latest
needs: [foundation_test_release, frame_test_release, io_test_release, math_test_release, propagators_test_release]
if: always()
steps:
- uses: geekyeggo/delete-artifact@v1
continue-on-error: true
with:
name: libraries_release
- uses: geekyeggo/delete-artifact@v1
continue-on-error: true
with:
name: tests_release
- uses: geekyeggo/delete-artifact@v1
continue-on-error: true
with:
name: io_test_release_data
- uses: geekyeggo/delete-artifact@v1
continue-on-error: true
with:
name: propagators_test_release_data
- uses: geekyeggo/delete-artifact@v1
continue-on-error: true
with:
name: math_test_release_data
remove_artifacts_debug:
runs-on: ubuntu-latest
needs: [foundation_test_debug, frame_test_debug, io_test_debug, math_test_debug, propagators_test_debug, foundation_test_debug_valgrind, frame_test_debug_valgrind, io_test_debug_valgrind, math_test_debug_valgrind, propagators_test_debug_valgrind]
if: always()
steps:
- uses: geekyeggo/delete-artifact@v1
continue-on-error: true
with:
name: libraries_debug
- uses: geekyeggo/delete-artifact@v1
continue-on-error: true
with:
name: tests_debug
- uses: geekyeggo/delete-artifact@v1
continue-on-error: true
with:
name: io_test_debug_data
- uses: geekyeggo/delete-artifact@v1
continue-on-error: true
with:
name: propagators_test_debug_data
- uses: geekyeggo/delete-artifact@v1
continue-on-error: true
with:
name: math_test_debug_data
- uses: geekyeggo/delete-artifact@v1
continue-on-error: true
with:
name: valgrind_utils