Skip to content

Commit

Permalink
Merge branch 'gh247'
Browse files Browse the repository at this point in the history
  • Loading branch information
kordejong committed Sep 15, 2022
2 parents 88d803c + 1f834ea commit 71e8132
Show file tree
Hide file tree
Showing 17 changed files with 241 additions and 93 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/linux-conda.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
name: Linux Conda package

on: [push]
on:
push:
# branches-ignore:
# - gh247
paths-ignore:
- README.md
- document/**
- environment/**

jobs:
build:

strategy:
matrix:
os: ["ubuntu-20.04"]
python-version: ["3.9"]
python-version: [3.9]
fail-fast: false

runs-on: ${{ matrix.os }}
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Linux CI

on: [push]
on:
push:
# branches-ignore:
# - gh247
paths-ignore:
- README.md
- document/**
- environment/**

jobs:
build:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/macos-conda.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: macOS Conda package

on: [push]
on:
push:
# branches-ignore:
# - gh247
paths-ignore:
- README.md
- document/**
- environment/**

jobs:
build:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: macOS CI

on: [push]
on:
push:
# branches-ignore:
# - gh247
paths-ignore:
- README.md
- document/**
- environment/**

jobs:
build:
Expand Down
27 changes: 25 additions & 2 deletions .github/workflows/windows-conda.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Windows Conda package

on: [push]
on:
push:
# branches-ignore:
# - gh247
paths-ignore:
- README.md
- document/**
- environment/**

jobs:
build:
Expand All @@ -9,12 +16,28 @@ jobs:
matrix:
os: ["windows-2019"]
python-version: [3.9]
fail-fast: false

runs-on: ${{ matrix.os }}

name: ${{ matrix.os }} - ${{ matrix.python-version }}

steps:

- name: checkout lue
- name: checkout LUE
uses: actions/checkout@v2

- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: false
python-version: ${{ matrix.python-version }}
channels: conda-forge
mamba-version: "*"
- shell: bash -l {0}
run: |
mamba install boa -c conda-forge
- name: Build
shell: bash -l {0}
run: |
conda mambabuild environment/configuration/receipe --channel conda-forge --override-channels
15 changes: 9 additions & 6 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Windows CI

on: [push]
on:
push:
# branches-ignore:
# - gh247
paths-ignore:
- README.md
- document/**
- environment/**

jobs:
build:
Expand Down Expand Up @@ -78,12 +85,8 @@ jobs:
- name: test lue
shell: bash -l {0}
run: |
# TODO https://github.com/computationalgeography/lue/issues/445
cd $GITHUB_WORKSPACE/../build
ctest --build-config Release -R package_link
ctest --test-dir source/data_model --build-config Release
# cmake --config Release --target run_tests
ctest --extra-verbose --output-on-failure --build-config Release
- name: install lue lue_runtime component
shell: bash -l {0}
Expand Down
87 changes: 64 additions & 23 deletions environment/configuration/receipe/bld.bat
Original file line number Diff line number Diff line change
@@ -1,45 +1,86 @@
@echo on

rem We need to create an out of source build
mkdir ../build

if errorlevel 1 exit 1
md %TMPDIR%\build

cd ../build
if %errorlevel% neq 0 exit /b %errorlevel%

if errorlevel 1 exit 1
cd %TMPDIR%\build

if %errorlevel% neq 0 exit /b %errorlevel%

rem Ensure desired Boost version is selected by CMake
set "BOOST_ROOT=%PREFIX%"
set "BOOST_NO_SYSTEM_PATHS=ON"


cmake %SRC_DIR% -G"Ninja" ^
cmake %SRC_DIR% ^
-G "Visual Studio 16 2019" -A x64 ^
-D FETCHCONTENT_QUIET=FALSE ^
-D CMAKE_BUILD_TYPE=Release ^
-D CMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^
-D CMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
-D LUE_DATA_MODEL_WITH_PYTHON_API=ON ^
-D LUE_DATA_MODEL_WITH_UTILITIES=ON ^
-D LUE_BUILD_VIEW=ON ^
-D Boost_USE_STATIC_LIBS=OFF ^
-D CMAKE_INSTALL_PREFIX:PATH="%PREFIX%" ^
-D CMAKE_INSTALL_LIBDIR=lib ^
-D LUE_INSTALL_PYTHON_PACKAGE_DIR="%SP_DIR%/lue" ^
-D LUE_BUILD_DATA_MODEL=TRUE ^
-D LUE_DATA_MODEL_WITH_PYTHON_API=TRUE ^
-D LUE_DATA_MODEL_WITH_UTILITIES=TRUE ^
-D LUE_BUILD_FRAMEWORK=TRUE ^
-D LUE_FRAMEWORK_WITH_PYTHON_API=TRUE ^
-D LUE_BUILD_VIEW=TRUE ^
-D LUE_BUILD_TEST=TRUE ^
-D LUE_TEST_NR_LOCALITIES_PER_TEST=1 ^
-D LUE_TEST_NR_THREADS_PER_LOCALITY=2 ^
-D LUE_BUILD_QA=TRUE ^
-D LUE_QA_WITH_PYTHON_API=TRUE ^
-D LUE_BUILD_HPX=TRUE ^
-D HPX_USE_CMAKE_CXX_STANDARD=TRUE ^
-D HPX_WITH_MALLOC="system" ^
-D HPX_WITH_FETCH_ASIO=TRUE ^
-D HPX_WITH_PKGCONFIG=FALSE ^
-D HPX_WITH_EXAMPLES=FALSE ^
-D HPX_WITH_TESTS=FALSE ^
-D LUE_HAVE_BOOST=TRUE ^
-D LUE_HAVE_DOCOPT=FALSE ^
-D LUE_HAVE_FMT=FALSE ^
-D LUE_HAVE_GDAL=TRUE ^
-D LUE_HAVE_GLFW=FALSE ^
-D LUE_HAVE_HDF5=TRUE ^
-D LUE_HAVE_FMT=TRUE ^
-D HDF5_USE_STATIC_LIBRARIES=OFF ^
-D Python3_FIND_STRATEGY="LOCATION" ^
-D Python3_EXECUTABLE="%PYTHON%" ^
-D PYTHON_EXECUTABLE="%PYTHON%" ^
-D Python_ROOT_DIR="%PREFIX%/bin" ^
-D Python3_ROOT_DIR="%PREFIX%/bin"
-D LUE_HAVE_NLOHMANN_JSON=FALSE ^
-D LUE_HAVE_PYBIND11=FALSE ^
-D Boost_USE_STATIC_LIBS=FALSE ^
-D HDF5_USE_STATIC_LIBRARIES=FALSE ^
-D HWLOC_ROOT="%LIBRARY_LIB%" ^
-D HWLOC_LIBRARY="%LIBRARY_LIB%/hwloc.dll.lib" ^
-D Python3_EXECUTABLE="%PYTHON%"

if %errorlevel% neq 0 exit /b %errorlevel%

cmake --build . --config Release --target all_build --parallel 2

if %errorlevel% neq 0 exit /b %errorlevel%

if errorlevel 1 exit 1
rem rem Use parallel build for as many targets as possible, but not for framework/algorithm
rem cmake --build . --target ^
rem source/data_model/all ^
rem source/view/all ^
rem source/framework/core/all ^
rem source/framework/partitioned_array/all
rem
rem if %errorlevel% neq 0 exit /b %errorlevel%
rem
rem rem Build remaining targets with fewer cores. Compiling these modules requires more memory.
rem cmake --build . --target all --parallel 2
rem
rem if %errorlevel% neq 0 exit /b %errorlevel%

cmake --build . --target all
ctest --extra-verbose --output-on-failure --build-config Release

if errorlevel 1 exit 1
if %errorlevel% neq 0 exit /b %errorlevel%

cmake --build . --target install
cmake --install . --component core
cmake --install . --component parallelism
cmake --install . --component runtime
cmake --install . --component lue_runtime

if errorlevel 1 exit 1
if %errorlevel% neq 0 exit /b %errorlevel%
4 changes: 2 additions & 2 deletions environment/configuration/receipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ PATH=$PREFIX/bin:$PATH CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY" \
-D CMAKE_INSTALL_PREFIX:PATH="${PREFIX}" \
-D CMAKE_INSTALL_LIBDIR=lib \
-D LUE_INSTALL_PYTHON_PACKAGE_DIR="${SP_DIR}/lue" \
-D Python3_EXECUTABLE="${PYTHON}" \
-D LUE_HAVE_BOOST:BOOL=TRUE \
-D LUE_HAVE_FMT:BOOL=TRUE \
-D LUE_HAVE_PYBIND11:BOOL=TRUE \
Expand All @@ -43,7 +42,8 @@ PATH=$PREFIX/bin:$PATH CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY" \
-D HPX_WITH_MALLOC="tcmalloc" \
-D HPX_WITH_PKGCONFIG=OFF \
-D HPX_WITH_EXAMPLES=OFF \
-D HPX_WITH_TESTS=OFF
-D HPX_WITH_TESTS=OFF \
-D Python3_EXECUTABLE="${PYTHON}"

# Use parallel build for as many targets as possible, but not for framework/algorithm
cmake --build . --target source/{data_model,view}/all source/framework/{core,partitioned_array}/all
Expand Down
2 changes: 2 additions & 0 deletions environment/configuration/receipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ source:

build:
number: 0
script_env:
- TMPDIR


requirements:
Expand Down
19 changes: 13 additions & 6 deletions source/data_model/python/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@ add_test(
--pattern "*_test.py"
)

set_tests_properties(
lue_py_data_model_python_test
PROPERTIES
set_property(
TEST
lue_py_data_model_python_test
APPEND
PROPERTY
# Add the path to our Python modules to PYTHONPATH.
ENVIRONMENT_MODIFICATION "\
PYTHONPATH=path_list_prepend:$<TARGET_FILE_DIR:lue::py>/..;\
"
ENVIRONMENT_MODIFICATION
PYTHONPATH=path_list_prepend:$<TARGET_FILE_DIR:lue::py>/..
)
set_property(
TEST
lue_py_data_model_python_test
APPEND
PROPERTY
FIXTURES_REQUIRED
lue_py_test_fixture
)
40 changes: 26 additions & 14 deletions source/framework/algorithm/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,21 @@ foreach(name ${names})
"$<TARGET_FILE:${test_name}>"
)

set_tests_properties(
${test_name}
PROPERTIES
# On Windows, add the path to the HPX dlls. Only if HPX::hpx target is defined.
ENVIRONMENT_MODIFICATION
PATH=path_list_prepend:$<$<AND:$<PLATFORM_ID:Windows>,$<TARGET_EXISTS:HPX::hpx>>:$<TARGET_FILE_DIR:HPX::component_storage_component>>
)
if(WIN32)
# Ensure required DLLs can be found at runtime
set_property(
TEST
${test_name}
APPEND
PROPERTY
ENVIRONMENT_MODIFICATION
PATH=path_list_prepend:$<TARGET_FILE_DIR:HPX::component_storage_component>
PATH=path_list_prepend:$<TARGET_FILE_DIR:lue::framework_partitioned_array>
PATH=path_list_prepend:$<TARGET_FILE_DIR:lue::framework_local_operation>
PATH=path_list_prepend:$<TARGET_FILE_DIR:lue::framework_focal_operation>
PATH=path_list_prepend:$<TARGET_FILE_DIR:lue::framework_flow_direction_operation>
)
endif()
endforeach()

foreach(name ${local_operation_names})
Expand Down Expand Up @@ -180,11 +188,15 @@ foreach(name ${names})
COMMAND ${test_name}
)

set_tests_properties(
${test_name}
PROPERTIES
# On Windows, add the path to the HPX dlls. Only if HPX::hpx target is defined.
ENVIRONMENT_MODIFICATION
PATH=path_list_prepend:$<$<AND:$<PLATFORM_ID:Windows>,$<TARGET_EXISTS:HPX::hpx>>:$<TARGET_FILE_DIR:HPX::component_storage_component>>
)
if(WIN32)
# Ensure required DLLs can be found at runtime
set_property(
TEST
${test_name}
APPEND
PROPERTY
ENVIRONMENT_MODIFICATION
PATH=path_list_prepend:$<TARGET_FILE_DIR:HPX::component_storage_component>
)
endif()
endforeach()
18 changes: 11 additions & 7 deletions source/framework/core/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ foreach(name ${names})
COMMAND ${test_name}
)

set_tests_properties(
${test_name}
PROPERTIES
# On Windows, add the path to the HPX dlls. Only if HPX::hpx target is defined.
ENVIRONMENT_MODIFICATION
PATH=path_list_prepend:$<$<AND:$<PLATFORM_ID:Windows>,$<TARGET_EXISTS:HPX::hpx>>:$<TARGET_FILE_DIR:HPX::component_storage_component>>
)
if(WIN32)
# Ensure required DLLs can be found at runtime
set_property(
TEST
${test_name}
APPEND
PROPERTY
ENVIRONMENT_MODIFICATION
PATH=path_list_prepend:$<TARGET_FILE_DIR:HPX::component_storage_component>
)
endif()
endforeach()
Loading

0 comments on commit 71e8132

Please sign in to comment.