Skip to content

MacOS

MacOS #521

Workflow file for this run

name: MacOS
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: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install gfortran
run: brew reinstall gcc
- 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 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
- 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: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install gfortran
run: brew reinstall gcc
- 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 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
- 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
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: macos-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 DYLD_LIBRARY_PATH=${{runner.workspace}}:${DYLD_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: macos-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 DYLD_LIBRARY_PATH=${{runner.workspace}}:${DYLD_LIBRARY_PATH} && ./frame_test
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: macos-latest
needs: [build_release]
steps:
- uses: actions/download-artifact@v2
with:
name: math_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: 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 DYLD_LIBRARY_PATH=${{runner.workspace}}:${DYLD_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: macos-latest
needs: [build_debug]
steps:
- uses: actions/download-artifact@v2
with:
name: math_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: 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 DYLD_LIBRARY_PATH=${{runner.workspace}}:${DYLD_LIBRARY_PATH} && ./math_test
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: macos-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 DYLD_LIBRARY_PATH=${{runner.workspace}}:${DYLD_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: macos-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 DYLD_LIBRARY_PATH=${{runner.workspace}}:${DYLD_LIBRARY_PATH} && ./propagators_test
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: macos-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 DYLD_LIBRARY_PATH=${{runner.workspace}}:${DYLD_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: macos-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 DYLD_LIBRARY_PATH=${{runner.workspace}}:${DYLD_LIBRARY_PATH} && ./io_test
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: macos-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 DYLD_LIBRARY_PATH=${{runner.workspace}}:${DYLD_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: macos-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 DYLD_LIBRARY_PATH=${{runner.workspace}}:${DYLD_LIBRARY_PATH} && ./foundation_test
remove_artifacts_release:
runs-on: macos-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: macos-latest
needs: [foundation_test_debug, frame_test_debug, io_test_debug, math_test_debug, propagators_test_debug]
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