Skip to content

Commit 1fdf252

Browse files
committed
Update versions and add python3.14
1 parent 4eb7612 commit 1fdf252

10 files changed

Lines changed: 279 additions & 243 deletions

.github/workflows/bundle_with_dakota_caller.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
NEEDS_REBUILD: ${{ env.NEEDS_REBUILD }}
3737

3838
steps:
39-
- uses: actions/cache@v4
39+
- uses: actions/cache@v5
4040
name: Check cache for already built wheels
4141
id: cache-package
4242
with:
@@ -76,7 +76,7 @@ jobs:
7676
runs-on: ubuntu-latest
7777
steps:
7878
- name: "Download built artifacts"
79-
uses: actions/download-artifact@v4
79+
uses: actions/download-artifact@v8
8080
with:
8181
path: artifacts
8282

@@ -88,12 +88,12 @@ jobs:
8888
8989
- name: Cache wheels folder
9090
if: steps.cache-package.outputs.cache-hit != 'true'
91-
uses: actions/cache/save@v4
91+
uses: actions/cache/save@v5
9292
with:
9393
path: dist
9494
key: carolina_wheels_boost${{ needs.build-settings.outputs.BOOST_VERSION }}_dakota${{ needs.build-settings.outputs.DAKOTA_VERSION }}
9595

96-
- uses: actions/cache/restore@v4
96+
- uses: actions/cache/restore@v5
9797
id: restore-cached-package
9898
with:
9999
key: carolina_wheels_boost${{ needs.build-settings.outputs.BOOST_VERSION }}_dakota${{ needs.build-settings.outputs.DAKOTA_VERSION }}
@@ -102,8 +102,9 @@ jobs:
102102
- name: Validate dist with twine check
103103
run: |
104104
ls dist
105+
pip install -U pip
105106
pip install twine
106-
pip install packaging==25.0
107+
pip install -U packaging
107108
twine check dist/*
108109
109110
# remove carolina dev-wheels if any
@@ -115,7 +116,7 @@ jobs:
115116
ls dist
116117
117118
- name: Publish to pypi
118-
uses: pypa/gh-action-pypi-publish@v1.12.4
119+
uses: pypa/gh-action-pypi-publish@v1.13.0
119120
if: >
120121
(github.event_name == 'workflow_dispatch' && inputs.publish) ||
121122
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags'))

.github/workflows/bundle_with_dakota_linux.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,27 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232
matrix:
33-
python-version: [ '3.11', '3.12', '3.13' ]
33+
python-version: [ '3.11', '3.12', '3.13', '3.14' ]
3434
os: [ ubuntu-24.04 ]
3535
runs-on: ${{ matrix.os }}
3636
env:
3737
ERT_SHOW_BACKTRACE: ${{ inputs.ERT_SHOW_BACKTRACE }}
3838
NO_PROJECT_RES: ${{ inputs.NO_PROJECT_RES }}
3939

4040
steps:
41-
- uses: actions/checkout@v4
41+
- uses: actions/checkout@v6
4242
with:
4343
fetch-depth: 0
4444

45-
- uses: actions/cache@v4
45+
- uses: actions/cache@v5
4646
id: cache-package-check
4747
with:
4848
key: carolina_deps_${{ matrix.os }}_python-${{ matrix.python-version }}_boost-${{ inputs.BOOST_VERSION }}_dakota-${{ inputs.DAKOTA_VERSION }}
4949
path: ./deps_build
5050

5151
- name: Build Boost & Dakota
5252
if: steps.cache-package-check.outputs.cache-hit != 'true'
53-
uses: docker://quay.io/pypa/manylinux2014_x86_64
53+
uses: docker://quay.io/pypa/manylinux_2_28
5454
env:
5555
PYTHON_VERSION: ${{ matrix.python-version }}
5656
BOOST_VERSION: ${{ inputs.BOOST_VERSION }}
@@ -59,15 +59,15 @@ jobs:
5959
entrypoint: /bin/bash
6060
args: '-c "sh dakota_manylinux_install_files/build_deps_gha.sh ${{ matrix.python-version }}"'
6161

62-
- uses: actions/cache/save@v4
62+
- uses: actions/cache/save@v5
6363
if: steps.cache-package-check.outputs.cache-hit != 'true'
6464
id: cache-package-store
6565
with:
6666
key: carolina_deps_${{ matrix.os }}_python-${{ matrix.python-version }}_boost-${{ inputs.BOOST_VERSION }}_dakota-${{ inputs.DAKOTA_VERSION }}
6767
path: ./deps_build
6868

6969
- name: Build Linux Wheel
70-
uses: docker://quay.io/pypa/manylinux2014_x86_64
70+
uses: docker://quay.io/pypa/manylinux_2_28
7171
env:
7272
PYTHON_VERSION: ${{ matrix.python-version }}
7373
BOOST_VERSION: ${{ inputs.BOOST_VERSION }}
@@ -77,13 +77,13 @@ jobs:
7777
args: '-c "sh dakota_manylinux_install_files/build_wheels_gha.sh ${{ matrix.python-version }}"'
7878

7979
- name: Checkout Carolina
80-
uses: actions/checkout@v4
80+
uses: actions/checkout@v6
8181
with:
8282
fetch-depth: 0
8383
path: carolina-main
8484

8585
- name: Set up Python ${{ matrix.python-version }}
86-
uses: actions/setup-python@v5
86+
uses: actions/setup-python@v6
8787
with:
8888
python-version: ${{ matrix.python-version }}
8989

@@ -93,6 +93,7 @@ jobs:
9393
- name: Install Carolina from wheel
9494
run: |
9595
source othervenv/bin/activate
96+
pip install -U pip
9697
pyver_nodot=$(echo ${{ matrix.python-version }} | sed 's/\.//g')
9798
wheel_path=$(find carolina_dist -name "carolina*$pyver_nodot*whl")
9899
echo "Found Carolina wheel at $wheel_path"
@@ -103,12 +104,12 @@ jobs:
103104
source othervenv/bin/activate
104105
pip install pytest numpy
105106
cd carolina-main/tests
106-
python -m pytest .
107+
pytest . -sv
107108
cd -
108109
109110
- name: Upload wheel as artifact
110111
if: always()
111-
uses: actions/upload-artifact@v4
112+
uses: actions/upload-artifact@v7
112113
with:
113114
name: ${{ matrix.os }} Python ${{ matrix.python-version }} wheel
114115
path: |

.github/workflows/bundle_with_dakota_macos.yml

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ jobs:
2929
fail-fast: true
3030
matrix:
3131
# https://github.com/actions/runner-images?tab=readme-ov-file#available-images
32-
python-version: [ '3.11', '3.12', '3.13']
33-
os: [ 'macos-14' ]
32+
python-version: [ '3.11', '3.12', '3.13', '3.14' ]
33+
os: [ 'macos-15' ]
3434

3535
runs-on: ${{ matrix.os }}
3636
name: "Build 🛞 (${{ matrix.python-version }}, ${{ matrix.os }})"
3737
env:
3838
INSTALL_DIR: ${{ inputs.INSTALL_DIR }}
3939
SYSTEM_VERSION_COMPAT: 0
40+
MACOSX_DEPLOYMENT_TARGET: '15.0'
4041
steps:
4142

4243
- name: Echo env and inputs
@@ -53,7 +54,7 @@ jobs:
5354

5455
- name: Cache Homebrew Bundler RubyGems
5556
id: cache
56-
uses: actions/cache@v4
57+
uses: actions/cache@v5
5758
with:
5859
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
5960
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
@@ -64,7 +65,7 @@ jobs:
6465
run: brew install-bundler-gems
6566

6667
- name: Set up Python ${{ matrix.python-version }}
67-
uses: actions/setup-python@v5
68+
uses: actions/setup-python@v6
6869
with:
6970
python-version: ${{ matrix.python-version }}
7071

@@ -77,14 +78,14 @@ jobs:
7778
which python
7879
which pip
7980
python -c "import platform; mac_version=platform.mac_ver(); print('macOS version: '+mac_version[0])"
80-
- uses: actions/cache@v4
81+
- uses: actions/cache@v5
8182
id: cache-package
8283
with:
8384
key: ${{ matrix.os }}_python-${{ matrix.python-version }}_boost-${{ inputs.BOOST_VERSION }}_dakota-${{ inputs.DAKOTA_VERSION }}
8485
path: ${{ github.workspace }}/python-${{ matrix.python-version}}_boost-${{ inputs.BOOST_VERSION }}_dakota-${{ inputs.DAKOTA_VERSION }}.tar.gz
8586

8687
- name: Checkout Carolina
87-
uses: actions/checkout@v4
88+
uses: actions/checkout@v6
8889
with:
8990
fetch-depth: 0
9091

@@ -96,6 +97,7 @@ jobs:
9697
run: |
9798
python -m pip install -U pip
9899
python -m pip install numpy
100+
python -m pip install "cmake<4"
99101
100102
- name: Build needed boost libraries
101103
if: steps.cache-package.outputs.cache-hit != 'true'
@@ -162,15 +164,23 @@ jobs:
162164
patch -p1 < $CAROLINA_DIR/dakota_manylinux_install_files/workdirhelper_boost_filesystem.patch
163165
patch -p1 < $CAROLINA_DIR/dakota_manylinux_install_files/CMakeLists_includes.patch
164166
167+
# Fix JEGA keyed_registry.hpp.inl bug (upstream fix: dakota-packages commit b837a87)
168+
JEGA_KEYED_REG=$(find . -path '*/JEGA/eddy/utilities/include/inline/keyed_registry.hpp.inl')
169+
if [ -n "$JEGA_KEYED_REG" ]; then
170+
echo "Applying JEGA keyed_registry fix to $JEGA_KEYED_REG ..."
171+
sed -i '' 's/const KeyType& value/const KeyType\& key/' "$JEGA_KEYED_REG"
172+
sed -i '' 's/this->find(this->key)/this->find(key)/' "$JEGA_KEYED_REG"
173+
fi
174+
165175
PYTHON_INCLUDE_DIR="$(python -c "from sysconfig import get_paths as gp; g=gp(); print(f\"{g['include']} \")")"
166176
167177
mkdir -p build
168178
cd build
169179
170180
cmake \
171-
-DCMAKE_CXX_STANDARD=14 \
181+
-DCMAKE_CXX_STANDARD=17 \
172182
-DBUILD_SHARED_LIBS=ON \
173-
-DCMAKE_CXX_FLAGS="-I$PYTHON_INCLUDE_DIR" \
183+
-DCMAKE_CXX_FLAGS="-I$PYTHON_INCLUDE_DIR -D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION -D_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS" \
174184
-DDAKOTA_PYTHON_DIRECT_INTERFACE=ON \
175185
-DDAKOTA_PYTHON_DIRECT_INTERFACE_NUMPY=ON \
176186
-DDAKOTA_DLL_API=OFF \
@@ -192,12 +202,12 @@ jobs:
192202
193203
- name: Cache boost and dakota
194204
if: steps.cache-package.outputs.cache-hit != 'true'
195-
uses: actions/cache/save@v4
205+
uses: actions/cache/save@v5
196206
with:
197207
path: ${{ github.workspace }}/python-${{ matrix.python-version}}_boost-${{ inputs.BOOST_VERSION }}_dakota-${{ inputs.DAKOTA_VERSION }}.tar.gz
198208
key: ${{ matrix.os }}_python-${{ matrix.python-version }}_boost-${{ inputs.BOOST_VERSION }}_dakota-${{ inputs.DAKOTA_VERSION }}
199209

200-
- uses: actions/cache/restore@v4
210+
- uses: actions/cache/restore@v5
201211
id: restore-cached-package
202212
with:
203213
key: ${{ matrix.os }}_python-${{ matrix.python-version }}_boost-${{ inputs.BOOST_VERSION }}_dakota-${{ inputs.DAKOTA_VERSION }}
@@ -219,7 +229,7 @@ jobs:
219229
echo "DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${HOME}/${INSTALL_DIR}/lib:$INSTALL_DIR/bin" >> ${GITHUB_ENV}
220230
221231
- name: Checkout Carolina
222-
uses: actions/checkout@v4
232+
uses: actions/checkout@v6
223233
with:
224234
fetch-depth: 0
225235

@@ -230,17 +240,10 @@ jobs:
230240
arch_ver=$(uname -m)
231241
232242
# hint regarding architecture to avoid universal wheel generated
233-
export _PYTHON_HOST_PLATFORM="macosx-11.0-$arch_ver"
243+
export _PYTHON_HOST_PLATFORM="macosx-${MACOSX_DEPLOYMENT_TARGET}-$arch_ver"
234244
export ARCHFLAGS="-arch $arch_ver"
235245
236-
target_version=$(sw_vers --productVersion | cut -d . -f 1)
237-
238-
# the arm64 builds require deployment targets >= 13.0
239-
if [ "$arch_ver" == "arm64" ]; then
240-
export MACOSX_DEPLOYMENT_TARGET="${target_version}.0"
241-
fi
242-
243-
pip install delocate==0.10.7
246+
pip install delocate
244247
python -m pip install .
245248
PYTHON_VERSION_TRIM=$(echo ${{ matrix.python-version }} | tr -d ".")
246249
echo $PYTHON_VERSION_TRIM
@@ -293,7 +296,7 @@ jobs:
293296
DYLD_LIBRARY_PATH=${EXTENDED_DYLD_LIBRARY_PATH} delocate-wheel -w /tmp/carolina_dist -v $unfixed_wheel_path
294297
echo "Output new carolina wheel to /tmp/carolina_dist"
295298
ls -lh /tmp/carolina_dist
296-
- uses: actions/upload-artifact@v4
299+
- uses: actions/upload-artifact@v7
297300
id: cache-carolina_wheel
298301
with:
299302
name: ${{ matrix.os }}_py-${{ matrix.python-version }}_wheel
@@ -309,17 +312,17 @@ jobs:
309312
strategy:
310313
fail-fast: false
311314
matrix:
312-
python-version: [ '3.11', '3.12', '3.13']
313-
os: [ 'macos-14' ]
315+
python-version: [ '3.11', '3.12', '3.13', '3.14' ]
316+
os: [ 'macos-15' ]
314317

315318
runs-on: ${{ matrix.os }}
316319
steps:
317-
- uses: actions/checkout@v4
320+
- uses: actions/checkout@v6
318321
with:
319322
fetch-depth: 0
320323

321324
- name: Set up Python ${{ matrix.python-version }}
322-
uses: actions/setup-python@v5
325+
uses: actions/setup-python@v6
323326
with:
324327
python-version: ${{ matrix.python-version }}
325328
cache: "pip"
@@ -328,13 +331,14 @@ jobs:
328331
pyproject.toml
329332
330333
- name: Download Carolina artifact
331-
uses: actions/download-artifact@v4
334+
uses: actions/download-artifact@v8
332335
with:
333336
path: /tmp/artifacts
334337

335338
- name: Find the Carolina wheel
336339
run: |
337340
python --version
341+
pip install -U pip
338342
339343
pyver_nodot=$(echo ${{ matrix.python-version }} | sed 's/\.//g')
340344
arch_ver=$(uname -m)

dakota_manylinux_install_files/CMakeLists.txt.patch

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/CMakeLists.txt 2023-11-24 10:57:08
22
+++ b/CMakeLists.txt 2023-11-24 15:13:47
3-
@@ -150,10 +150,19 @@
3+
@@ -150,10 +150,15 @@
44
# Perl is required for examples, docs, and system tests
55
find_package(Perl REQUIRED)
66

@@ -9,18 +9,14 @@
99
# for components here at top-level:
1010
+include_directories(${PYTHON_INCLUDE_DIRS})
1111
+include_directories(/usr/include)
12-
+include_directories(/usr/lib64)
13-
+include_directories(/tmp/INSTALL_DIR/dakota-6.21.0-public-src-cli/packages/external/eigen3/include/)
1412
+find_package(Threads REQUIRED)
15-
+set (PYBIND11_PYTHON_VERSION "3.11")
1613
+
1714
include(DakotaFindPython)
1815
dakota_find_python()
19-
+add_link_options()
2016

2117
# Conditionally find Java JDK needed for input spec, docs, Java API
2218
include(DakotaFindJava)
23-
@@ -194,6 +203,8 @@
19+
@@ -194,6 +199,8 @@
2420
endif()
2521
endif()
2622

0 commit comments

Comments
 (0)