Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-linux platform CI #55

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
222 changes: 101 additions & 121 deletions .github/workflows/ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,74 +200,61 @@ jobs:
# macOS
# ---------------------------------------------------------------------------

macos:
macos_no_python:
name: 'macOS 10.15
<AppleClang 11.0
config=${{ matrix.build-type }},
shared=${{ matrix.build-shared }},
cxx=${{ matrix.cxx-standard }},
python=${{ matrix.python-version }},
docs=${{ matrix.build-docs }}>'
runs-on: macos-10.15
strategy:
matrix:
build: [1, 2, 3, 4, 5]
build: [1, 2, 3, 4]
include:
# C++11, Python 3.7
# C++11
- build: 1
build-type: Release
build-shared: 'ON'
build-docs: 'ON'
cxx-standard: 11
python-version: 3.7
exclude-tests: -E PyImath.*_Python3
exclude-tests:
# Debug
- build: 2
build-type: Debug
build-shared: 'ON'
build-docs: 'OFF'
cxx-standard: 11
python-version: 3.7
exclude-tests: -E PyImath.*_Python3
exclude-tests:
# C++14
- build: 3
build-type: Release
build-shared: 'ON'
build-docs: 'OFF'
cxx-standard: 14
python-version: 3.7
exclude-tests: -E PyImath.*_Python3
exclude-tests:
# Static
- build: 4
build-type: Release
build-type: Debug
build-shared: 'OFF'
build-docs: 'OFF'
cxx-standard: 11
python-version: 3.7
exclude-tests: -E "PyImath.*_Python3|PyImath.PyImathTest_Python2"
# Python 2.7
- build: 5
build-type: Release
build-shared: 'ON'
build-docs: 'ON'
cxx-standard: 11
python-version: 2.7
exclude-tests: -E PyImath.*_Python3
exclude-tests:
steps:
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
## - name: Setup Python
## uses: actions/setup-python@v1
## with:
## python-version: ${{ matrix.python-version }}
- name: Checkout
uses: actions/checkout@v2
- name: Create build directories
run: |
mkdir _install
mkdir _build
- name: Install Dependences
run: |
share/ci/scripts/macos/install_boost.sh
shell: bash
## - name: Install Dependences
## run: |
## share/ci/scripts/macos/install_boost.sh
## shell: bash
- name: Configure
run: |
cmake ../. \
Expand All @@ -276,10 +263,7 @@ jobs:
-DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} \
-DCMAKE_CXX_FLAGS=${{ matrix.cxx-flags }} \
-DCMAKE_VERBOSE_MAKEFILE:BOOL='OFF' \
-DBUILD_SHARED_LIBS=${{ matrix.build-shared }} \
-DPYTHON='ON'\
-DPYTHON_EXECUTABLE=$(which python) \
-DBoost_NO_BOOST_CMAKE=ON
-DBUILD_SHARED_LIBS=${{ matrix.build-shared }}
working-directory: _build
- name: Build
run: |
Expand Down Expand Up @@ -308,52 +292,47 @@ jobs:
# TODO: Determine why tests hang in Debug job.
# TODO: Fix boost script to install from sourceforge.

# windows:
# name: 'Windows 2019
# <MSVC 16.4
# config=${{ matrix.build-type }},
# shared=${{ matrix.build-shared }},
# cxx=${{ matrix.cxx-standard }},
# python=${{ matrix.python-version }},
# docs=${{ matrix.build-docs }}>'
# runs-on: windows-2019
# strategy:
# matrix:
# build: [1, 3, 4]
# include:
# # C++11, Python 3.7
# - build: 1
# build-type: Release
# build-shared: 'ON'
# build-docs: 'ON'
# cxx-standard: 11
# python-version: 3.7.7
# boost-version: 1.70.0
# zlib-version: 1.2.11
# zlib-lib: zlib.lib
# exclude-tests: ''
# # Debug -
# # - build: 2
# # build-type: Debug
# # build-shared: 'ON'
# # build-docs: 'OFF'
# # cxx-standard: 11
# # python-version: 3.7.7
# # boost-version: 1.70.0
# # zlib-version: 1.2.11
# # zlib-lib: zlib.lib
# # exclude-tests: ''
# # C++14
# - build: 3
# build-type: Release
# build-shared: 'ON'
# build-docs: 'OFF'
# cxx-standard: 14
# python-version: 3.7.7
# boost-version: 1.70.0
# zlib-version: 1.2.11
# zlib-lib: zlib.lib
# exclude-tests: ''
windows:
name: 'Windows 2019
<MSVC 16.4
config=${{ matrix.build-type }},
shared=${{ matrix.build-shared }},
cxx=${{ matrix.cxx-standard }},
python=OFF,
docs=${{ matrix.build-docs }}>'
runs-on: windows-2019
strategy:
matrix:
build: [1, 3, 4]
include:
# C++11, Python 3.7
- build: 1
build-type: Release
build-shared: 'ON'
build-docs: 'ON'
cxx-standard: 11
exclude-tests:
# Debug -
## - build: 2
## build-type: Debug
## build-shared: 'ON'
## build-docs: 'OFF'
## cxx-standard: 11
## exclude-tests:
# C++14
- build: 3
build-type: Release
build-shared: 'ON'
build-docs: 'OFF'
cxx-standard: 14
exclude-tests:
# C++14, Static
- build: 4
build-type: Release
build-shared: 'OFF'
build-docs: 'OFF'
cxx-standard: 14
exclude-tests:
# # Static
# - build: 4
# build-type: Release
Expand All @@ -366,55 +345,56 @@ jobs:
# zlib-lib: zlibstatic.lib
# exclude-tests: ''

# steps:
steps:
# - name: Setup Python
# uses: actions/setup-python@v1
# with:
# python-version: ${{ matrix.python-version }}
# - name: Checkout
# uses: actions/checkout@v2
# - name: Create build directories
# run: |
# mkdir _install
# mkdir _build
# shell: bash
- name: Checkout
uses: actions/checkout@v2
- name: Create build directories
run: |
mkdir _install
mkdir _build
shell: bash
# - name: Install Dependences
# run: |
# share/ci/scripts/windows/install_python.ps1 ${{ matrix.python-version }} $HOME
# share/ci/scripts/windows/install_boost.ps1 ${{ matrix.boost-version }} $HOME 3.8
# share/ci/scripts/windows/install_zlib.ps1 ${{ matrix.zlib-version }} $HOME
# shell: powershell
# - name: Configure
# run: |
# cmake ../. \
# -DCMAKE_INSTALL_PREFIX=../_install \
# -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
# -DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} \
# -DCMAKE_CXX_FLAGS=${{ matrix.cxx-flags }} \
# -DCMAKE_VERBOSE_MAKEFILE:BOOL='OFF' \
# -DBOOST_ROOT:FILEPATH=$BOOST_ROOT \
# -DZLIB_ROOT:FILEPATH="$ZLIB_ROOT" \
# -DZLIB_LIBRARY:FILEPATH="$ZLIB_ROOT/lib/${{ matrix.zlib-lib }}" \
# -DBUILD_SHARED_LIBS=${{ matrix.build-shared }} \
# -DPYTHON='ON'\
# # -DPython_EXECUTABLE:FILEPATH="$PYTHON_ROOT" \
# # -DPython_INCLUDE_DIR:FILEPATH="$PYTHON_ROOT/include" \
# # -DPython_LIBRARY:"$PYTHON_ROOT\libs" \
# shell: bash
# working-directory: _build
# - name: Build
# run: |
# cmake --build . \
# --target install \
# --config ${{ matrix.build-type }}
# shell: bash
# working-directory: _build
# - name: Test
# run: |
# ctest -T Test ${{ matrix.exclude-tests }} \
# -C ${{ matrix.build-type }} \
# --timeout 7200 \
# --output-on-failure \
# -VV
# shell: bash
# working-directory: _build
- name: Configure
run: |
cmake ../. \
-DCMAKE_INSTALL_PREFIX=../_install \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} \
-DCMAKE_CXX_FLAGS=${{ matrix.cxx-flags }} \
-DCMAKE_VERBOSE_MAKEFILE:BOOL='OFF' \
-DBUILD_SHARED_LIBS=${{ matrix.build-shared }}
# NB: removed trailing slash from these lines
# -DBOOST_ROOT:FILEPATH=$BOOST_ROOT
# -DZLIB_ROOT:FILEPATH="$ZLIB_ROOT"
# -DZLIB_LIBRARY:FILEPATH="$ZLIB_ROOT/lib/${{ matrix.zlib-lib }}"
# -DPYTHON='ON'
# -DPython_EXECUTABLE:FILEPATH="$PYTHON_ROOT"
# -DPython_INCLUDE_DIR:FILEPATH="$PYTHON_ROOT/include"
# -DPython_LIBRARY:"$PYTHON_ROOT\libs"
shell: bash
working-directory: _build
- name: Build
run: |
cmake --build . \
--target install \
--config ${{ matrix.build-type }}
shell: bash
working-directory: _build
- name: Test
run: |
ctest -T Test ${{ matrix.exclude-tests }} \
-C ${{ matrix.build-type }} \
--timeout 7200 \
--output-on-failure \
-VV
shell: bash
working-directory: _build
18 changes: 11 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ include(config/LibraryDefine.cmake)

# Include these modules without enable/disable options
add_subdirectory(src/Imath)

# Tell CMake where to find the ImathConfig.cmake file. Makes it posible to call
# find_package(Imath) in downstream projects
set(Imath_DIR "${CMAKE_CURRENT_BINARY_DIR}/config" CACHE PATH "" FORCE)
Expand Down Expand Up @@ -77,14 +78,17 @@ endif()
#set(CTEST_DROP_SITE "open.cdash.org")
#set(CTEST_DROP_LOCATION "/submit.php?project=MyProject")
#set(CTEST_DROP_SITE_CDASH TRUE)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
include(CTest)

include(CTest)
if(BUILD_TESTING)
enable_testing()

add_subdirectory(src/ImathTest)
if(BUILD_TESTING)
enable_testing()
add_subdirectory(src/ImathTest)
endif()
endif()

# Including this module will add a `clang-format` target to the build if
# the clang-format executable can be found.
include(cmake/clang-format.cmake)
# the clang-format executable can be found. Only do this if we are top level
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
include(cmake/clang-format.cmake)
endif()
9 changes: 0 additions & 9 deletions config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ if (IMATH_ENABLE_LARGE_STACK)
set(IMATH_HAVE_LARGE_STACK ON)
endif()
configure_file(ImathConfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/ImathConfig.h)
configure_file(ImathConfigInternal.h.in ${CMAKE_CURRENT_BINARY_DIR}/ImathConfigInternal.h)

add_library(ImathConfig INTERFACE)
target_include_directories(ImathConfig INTERFACE
Expand All @@ -49,14 +48,6 @@ if(IMATH_INSTALL_PKG_CONFIG)
set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
set(LIB_SUFFIX_DASH ${IMATH_LIB_SUFFIX})
if(TARGET Threads::Threads)
# hrm, can't use properties as they end up as generator expressions
# which don't seem to evaluate
if(THREADS_HAVE_PTHREAD_ARG)
set(PTHREAD_CFLAGS "-pthread")
endif()
set(PTHREAD_LIBS ${CMAKE_THREAD_LIBS_INIT})
endif()
string(REPLACE ".in" "" pcout ${pcinfile})
configure_file(${pcinfile} ${CMAKE_CURRENT_BINARY_DIR}/${pcout} @ONLY)
install(
Expand Down
4 changes: 0 additions & 4 deletions config/ImathConfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
// Options / configuration based on O.S. / compiler
/////////////////////

#cmakedefine HAVE_PTHREAD 1
#cmakedefine HAVE_POSIX_SEMAPHORES 1


//
// Define and set to 1 if the target system has support for large
// stack sizes.
Expand Down
11 changes: 0 additions & 11 deletions config/ImathConfigInternal.h.in

This file was deleted.

2 changes: 1 addition & 1 deletion config/ImathSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,6 @@ if(NOT TARGET Threads::Threads)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads)
if(NOT Threads_FOUND)
message(FATAL_ERROR "Unable to find a threading library which is required for IlmThread")
message(FATAL_ERROR "Unable to find a threading library which is required for PyImathTask")
endif()
endif()
1 change: 0 additions & 1 deletion src/Imath/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,5 @@ imath_define_library(Imath
ImathVec.h
half.h
halfFunction.h
halfExport.h
halfLimits.h
)
2 changes: 1 addition & 1 deletion src/Imath/ImathExport.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
//
///////////////////////////////////////////////////////////////////////////

#if defined(OPENEXR_DLL)
#if defined(IMATH_DLL)
# if defined(IMATH_EXPORTS)
# define IMATH_EXPORT __declspec(dllexport)
# define IMATH_EXPORT_CONST extern __declspec(dllexport)
Expand Down
Loading