Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
# Enable version updates for Github Actions
- package-ecosystem: "github-actions"
# Look for `/.github/workflows` and `/action.yml` or `.yaml`
directory: "/"
# Check for updates once a week
schedule:
interval: "weekly"

6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch full history for git describe to work

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.11'
cache: 'pip'
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:

- name: Upload documentation artifact
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: documentation
path: docs/build/html/
Expand Down
45 changes: 25 additions & 20 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
cibw_archs: arm64
AL_BACKEND_HDF5: AL_BACKEND_HDF5=ON
AL_BACKEND_MDSPLUS: AL_BACKEND_MDSPLUS=OFF
AL_BACKEND_UDA: AL_BACKEND_UDA=OFF
AL_BACKEND_UDA: AL_BACKEND_UDA=ON
UDA_REF: "2.9.3"

- os: macos-14
Expand All @@ -97,7 +97,7 @@ jobs:
cibw_archs: arm64
AL_BACKEND_HDF5: AL_BACKEND_HDF5=ON
AL_BACKEND_MDSPLUS: AL_BACKEND_MDSPLUS=OFF
AL_BACKEND_UDA: AL_BACKEND_UDA=OFF
AL_BACKEND_UDA: AL_BACKEND_UDA=ON
UDA_REF: "2.9.3"

- os: macos-14
Expand All @@ -108,7 +108,7 @@ jobs:
cibw_archs: arm64
AL_BACKEND_HDF5: AL_BACKEND_HDF5=ON
AL_BACKEND_MDSPLUS: AL_BACKEND_MDSPLUS=OFF
AL_BACKEND_UDA: AL_BACKEND_UDA=OFF
AL_BACKEND_UDA: AL_BACKEND_UDA=ON
UDA_REF: "2.9.3"

- os: macos-14
Expand All @@ -119,7 +119,7 @@ jobs:
cibw_archs: arm64
AL_BACKEND_HDF5: AL_BACKEND_HDF5=ON
AL_BACKEND_MDSPLUS: AL_BACKEND_MDSPLUS=OFF
AL_BACKEND_UDA: AL_BACKEND_UDA=OFF
AL_BACKEND_UDA: AL_BACKEND_UDA=ON
UDA_REF: "2.9.3"

- os: macos-14
Expand All @@ -130,7 +130,7 @@ jobs:
cibw_archs: arm64
AL_BACKEND_HDF5: AL_BACKEND_HDF5=ON
AL_BACKEND_MDSPLUS: AL_BACKEND_MDSPLUS=OFF
AL_BACKEND_UDA: AL_BACKEND_UDA=OFF
AL_BACKEND_UDA: AL_BACKEND_UDA=ON
UDA_REF: "2.9.3"

- os: windows-2022
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
FMT_REF: "11.1.4"

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0 # unshallow for setuptools-scm.get_version to discover tags

Expand All @@ -213,7 +213,7 @@ jobs:
# core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
# core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '')

- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
# python installation used when to start cibuildwheel
python-version: "3.12"
Expand All @@ -226,7 +226,7 @@ jobs:

- name: Restore cibuildwheel cache
id: cache
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~\AppData\Local\pypa\cibuildwheel\Cache
Expand All @@ -238,7 +238,7 @@ jobs:
- name: Cache restore windows deps
if: startsWith(matrix.os, 'windows')
id: cache-win-deps
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
env:
cache-name: win-deps
with:
Expand Down Expand Up @@ -274,14 +274,14 @@ jobs:
# the cache redundantly doesn't compare to the time it takes to rebuild vcpkg packages.
if: ${{ always() && startsWith(matrix.os, 'windows') }}
id: cache-win-deps-save
uses: actions/cache/save@v4
uses: actions/cache/save@v5
env:
cache-name: win-deps
with:
path: C:\vcpkg\installed
key: ${{ matrix.os }}-${{ env.cache-name }}-a

- uses: pypa/cibuildwheel@v3.1.0
- uses: pypa/cibuildwheel@v3.4.1
if: startsWith(matrix.os, 'ubuntu-')
env:
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
Expand Down Expand Up @@ -334,7 +334,7 @@ jobs:
output-dir: wheelhouse
config-file: "{package}/pyproject.toml"

- uses: pypa/cibuildwheel@v3.1.0
- uses: pypa/cibuildwheel@v3.4.1
if: startsWith(matrix.os, 'macos-')
env:
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
Expand All @@ -347,10 +347,15 @@ jobs:
cmake.define.${{ matrix.AL_BACKEND_MDSPLUS }}
cmake.define.${{ matrix.AL_BACKEND_UDA }}

# Dependency installationinto /tmp
# Dependency installation into /tmp/imas-core-install
CIBW_BEFORE_ALL_MACOS: >
brew update >&2;
brew install cmake pkg-config boost hdf5 libomp ninja fmt spdlog libxml2 openssl capnp libmemcached >&2;
brew install cmake pkg-config boost hdf5 libomp ninja fmt spdlog libxml2 openssl libmemcached >&2;
git clone -b master https://github.com/capnproto/capnproto.git >&2 &&
cd capnproto >&2;
cmake -B build . \
-DCMAKE_INSTALL_PREFIX=/tmp/imas-core-install >&2 &&
cmake --build build --target install -j >&2;
git clone --depth 1 --branch ${{ matrix.UDA_REF }} https://github.com/ukaea/UDA.git >&2 &&
cd UDA >&2;
cmake -G Ninja -B build . \
Expand All @@ -359,21 +364,21 @@ jobs:
-DCLIENT_ONLY=ON \
-DENABLE_CAPNP=ON \
-DMACOSX_DEPLOYMENT_TARGET=14.0 \
-DCMAKE_INSTALL_PREFIX=/tmp/uda-install >&2 &&
-DCMAKE_INSTALL_PREFIX=/tmp/imas-core-install >&2 &&
cmake --build build --target install -j >&2;

# Where to find the dependencies
CIBW_ENVIRONMENT_MACOS: >
MACOSX_DEPLOYMENT_TARGET=14.0
CMAKE_PREFIX_PATH="/tmp/uda-install:/opt/homebrew:/usr/local"
PKG_CONFIG_PATH="/tmp/uda-install/lib/pkgconfig:/opt/homebrew/lib/pkgconfig:/usr/local/lib/pkgconfig"
CMAKE_PREFIX_PATH="/tmp/imas-core-install:/opt/homebrew:/usr/local"
PKG_CONFIG_PATH="/tmp/imas-core-install/lib/pkgconfig:/opt/homebrew/lib/pkgconfig:/usr/local/lib/pkgconfig"

with:
package-dir: .
output-dir: wheelhouse
config-file: "{package}/pyproject.toml"

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: cibw-wheels-cp${{ matrix.python }}-${{ matrix.platform_id }}
path: wheelhouse/*.whl
Expand All @@ -392,7 +397,7 @@ jobs:
name: testpypi
url: https://test.pypi.org/p/imas-core
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
pattern: cibw-wheels-*
merge-multiple: true # avoid artifact subdirs below wheelhouse
Expand All @@ -419,7 +424,7 @@ jobs:
name: pypi
url: https://pypi.org/p/imas-core
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
pattern: cibw-wheels-*
merge-multiple: true # avoid artifact subdirs below wheelhouse
Expand Down
20 changes: 13 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ option(AL_BACKEND_MDSPLUS "Build the MDSplus backend" OFF)
option(AL_BACKEND_HDF5 "Build the HDF5 backend" ON)
option(AL_BACKEND_UDA "Build the UDA backend" OFF)
option(AL_BACKEND_UDAFAT "Build the UDA backend (use FAT UDA)" OFF)
include(CMakeDependentOption)
cmake_dependent_option(AL_BUILD_MDSPLUS_MODELS "Build MDSplus models" ON
AL_BACKEND_MDSPLUS OFF)
# AL_BUILD_MDSPLUS_MODELS defaults to ON when AL_BACKEND_MDSPLUS is ON, otherwise OFF.
# This can be overridde by user by setting AL_BUILD_MDSPLUS_MODELS explicitly to ON or OFF.
if(AL_BACKEND_MDSPLUS)
option(AL_BUILD_MDSPLUS_MODELS "Build MDSplus models" ON)
else()
option(AL_BUILD_MDSPLUS_MODELS "Build MDSplus models" OFF)
endif()

# Configuration options for python bindings
# ##############################################################################
Expand Down Expand Up @@ -73,13 +77,10 @@ if(NOT PROJECT_VERSION_TWEAK EQUAL 0)
message("Building a development version of the Access Layer core")
endif()

if(APPLE)
if(APPLE AND CMAKE_OSX_ARCHITECTURES MATCHES "arm64")
# Disable MDSPlus:
message(STATUS "Disabling MDSPlus backend on macOS")
set(AL_BACKEND_MDSPLUS OFF CACHE BOOL "MDSPlus backend" FORCE)
# Disable UDA:
message(STATUS "Disabling UDA backend on macOS")
set(AL_BACKEND_UDA OFF CACHE BOOL "UDA backend" FORCE)
endif()


Expand Down Expand Up @@ -126,6 +127,9 @@ if(WIN32)
find_package(dlfcn-win32 CONFIG REQUIRED)
endif()

# build AL_CORE library only if backend is enabled
if(AL_BACKEND_HDF5 OR AL_BACKEND_MDSPLUS OR AL_BACKEND_UDA OR AL_BACKEND_UDAFAT OR AL_PYTHON_BINDINGS)

# Core dependencies
set(Boost_USE_MULTITHREADED FALSE)
find_package(
Expand Down Expand Up @@ -242,6 +246,8 @@ if(AL_PYTHON_BINDINGS)
include(skbuild.cmake)
endif()

endif() # AL core library (AL_BACKEND_HDF5 OR AL_BACKEND_MDSPLUS OR AL_BACKEND_UDA OR AL_BACKEND_UDAFAT OR AL_PYTHON_BINDINGS)


# MDSplus models
# ##############################################################################
Expand Down
Loading
Loading