Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
412dbe6
Test reduced Python wheel packaging size
FilipovicLado Jun 17, 2026
684aa2d
resolve too-small wheel size
FilipovicLado Jun 17, 2026
4eb47fe
remove PYTHON_INSTALL_COMPONENT
FilipovicLado Jun 17, 2026
f38cf43
fix missing closing bracket
FilipovicLado Jun 17, 2026
a28da9e
remove redundant flags in python.yml
FilipovicLado Jun 17, 2026
f6b9a41
Enable OpenMP during VTK build
FilipovicLado Jun 17, 2026
e6bca98
force VTK to build OpenMP not sequential
FilipovicLado Jun 17, 2026
3503635
use STDThread
FilipovicLado Jun 17, 2026
930722c
fix Windows LNK2001: use TYPE=OpenMP, disable STDThread
FilipovicLado Jun 17, 2026
a9bb796
remove size-optimization for windows build
FilipovicLado Jun 17, 2026
431adcd
Enable OpenMP and Rendering explicitly
FilipovicLado Jun 18, 2026
d1472b4
allow enabling ParlallelDIY
FilipovicLado Jun 18, 2026
e7936f8
remove ParallelDIY from Windows builds
FilipovicLado Jun 18, 2026
14e5724
reintroduce RenderingUI for windows
FilipovicLado Jun 18, 2026
47ee094
path VTK use of checked_array_iterator on windows builds
FilipovicLado Jun 18, 2026
5eab553
add patch for omp_set_nested warning, add macos-15-intel workflow, ad…
FilipovicLado Jun 18, 2026
9a493db
install macos depencencies to both macos builds
FilipovicLado Jun 18, 2026
848113a
add macos-15-intel to build and action yaml
FilipovicLado Jun 18, 2026
a9873ce
remove cache internal for vtk libs
FilipovicLado Jun 18, 2026
12b6284
fix omp_set_nested patch, windows viennals.libs missing
FilipovicLado Jun 18, 2026
d2ffbbc
revert copying entire lib directory, only copy dll files for windows
FilipovicLado Jun 18, 2026
d8ea852
fix cmake syntax error,
FilipovicLado Jun 18, 2026
c384748
cache vcpkg for windows
FilipovicLado Jun 19, 2026
2b41321
update dll copying to libs
FilipovicLado Jun 19, 2026
b1f8af3
add debug lines
FilipovicLado Jun 19, 2026
80cba85
inspect wheel contents, fix depreciated Node.js 20
FilipovicLado Jun 19, 2026
a41d67e
fix warnings
FilipovicLado Jun 19, 2026
308739a
fix omp_set_nested patch regex
FilipovicLado Jun 19, 2026
faab5e0
Use cached vcpkg for windows test
FilipovicLado Jun 19, 2026
e69b200
add debug lines
FilipovicLado Jun 19, 2026
c1b3ef4
format
FilipovicLado Jun 19, 2026
61531a7
format 2
FilipovicLado Jun 19, 2026
7b28682
vcpkg cache for windows iwhen running tests
FilipovicLado Jun 19, 2026
698f237
add vtk test script for omp_set_nested check
FilipovicLado Jun 19, 2026
d65946d
clean up debug scripts
FilipovicLado Jun 19, 2026
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
17 changes: 12 additions & 5 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,25 @@ runs:
using: "composite"

steps:
- name: Remove unused Homebrew taps
shell: bash
if: ${{ startsWith(inputs.os, 'macos-') }}
run: |
brew uninstall --formula azure/bicep/bicep || true
brew untap aws/tap azure/bicep || true

- name: 🩹 Enable Long Paths
shell: bash
if: ${{ inputs.os == 'windows-latest' }}
run: git config --system core.longpaths true

- name: 🖥️ Enable MSVC Dev Console
uses: ilammy/msvc-dev-cmd@v1
if: ${{ inputs.os == 'windows-latest' }}
uses: microsoft/setup-msbuild@v3

- name: 📋 Install OpenMP
shell: bash
if: ${{ inputs.os == 'macos-latest' }}
if: ${{ startsWith(inputs.os, 'macos-') }}
run: |
brew install libomp
echo "OpenMP_ROOT=$(brew --prefix)/opt/libomp" >> $GITHUB_ENV
Expand All @@ -36,7 +44,7 @@ runs:
echo "CMAKE_GIT_COMMAND=$(which git)" >> "$GITHUB_ENV"

- name: Install Git LFS and configure (macOS)
if: ${{ inputs.os == 'macos-latest' }}
if: ${{ startsWith(inputs.os, 'macos-') }}
shell: bash
run: |
brew install git-lfs || true
Expand All @@ -47,7 +55,6 @@ runs:

- name: 💻 Setup Deployment Target
shell: bash
if: ${{ inputs.os == 'macos-latest' }}
if: ${{ startsWith(inputs.os, 'macos-') }}
run: |
echo "MACOSX_DEPLOYMENT_TARGET=15.0" >> $GITHUB_ENV

18 changes: 10 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- Debug

os:
- macos-15-intel
- macos-latest
- windows-latest

Expand All @@ -40,15 +41,15 @@ jobs:

steps:
- name: 📥 Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: 🖥️ Setup Environment
uses: ./.github/actions/setup
with:
os: ${{ matrix.os }}

- name: 📋 Install MacOS Dependencies
if: ${{ matrix.os == 'macos-latest' }}
if: ${{ startsWith(matrix.os, 'macos-') }}
run: brew install vtk

- name: 🖥️ Setup vcpkg (Windows)
Expand All @@ -65,23 +66,24 @@ jobs:

New-Item -ItemType Directory -Force -Path "${{ env.VCPKG_DEFAULT_BINARY_CACHE }}"

- name: 🦥 Cache vcpkg binary (Windows)
- name: 🦥 Cache vcpkg installed
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/cache@v4
id: vcpkg-installed-cache
uses: actions/cache@v5
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: vcpkg-${{ matrix.os }}-${{ matrix.config }}-${{ env.VCPKG_COMMIT }}
path: ${{ github.workspace }}/vcpkg_installed
key: vcpkg-installed-${{ matrix.os }}-${{ env.VCPKG_COMMIT }}-${{ hashFiles('vcpkg.json') }}

- name: 🛠️ Build Dependencies (Windows)
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-latest' && steps.vcpkg-installed-cache.outputs.cache-hit != 'true' }}
shell: pwsh
run: |
./vcpkg/vcpkg install --triplet x64-windows

- name: 🏗️ Compile (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
cmake -DVIENNALS_BUILD_TESTS=ON -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -B build
cmake -DVIENNALS_BUILD_TESTS=ON -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DVCPKG_INSTALLED_DIR=${{ github.workspace }}/vcpkg_installed -DVCPKG_MANIFEST_INSTALL=OFF -B build
cmake --build build --config ${{ matrix.config }}

- name: 🏗️ Compile (other)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: pacman --noconfirm -Syu doxygen git

- name: 📥 Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
submodules: "recursive"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- name: 📥 Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
set-safe-directory: true

Expand All @@ -35,6 +35,6 @@ jobs:

- name: 🔍 Check Format
run: |
git config --global --add safe.directory $(pwd) # "set-safe-directory" seems bugged in actions/checkout@v4
git config --global --add safe.directory $(pwd) # "set-safe-directory" seems bugged in actions/checkout@v5
cmake -B build
cmake --build build --target format-check
132 changes: 92 additions & 40 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- os: ubuntu-latest
container: ghcr.io/viennatools/vienna-builder:cuda-suite-python-nocuda
- os: windows-latest
- os: macos-15-intel
- os: macos-latest

runs-on: ${{ matrix.os }}
Expand All @@ -37,7 +38,7 @@ jobs:

steps:
- name: 📥 Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: 🖥️ Setup Environment
uses: ./.github/actions/setup
Expand All @@ -59,28 +60,23 @@ jobs:
New-Item -ItemType Directory -Force -Path "${{ env.VCPKG_DEFAULT_BINARY_CACHE }}"

- name: 📋 Install MacOS Dependencies
if: ${{ matrix.os == 'macos-latest' }}
if: ${{ startsWith(matrix.os, 'macos-') }}
run: brew install vtk

- name: 🦥 Cache vcpkg binary
- name: 🦥 Cache vcpkg installed
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/cache@v4
id: vcpkg-installed-cache
uses: actions/cache@v5
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: vcpkg-${{ matrix.os }}-Release-${{ env.VCPKG_COMMIT }}
path: ${{ github.workspace }}/vcpkg_installed
key: vcpkg-installed-${{ matrix.os }}-${{ env.VCPKG_COMMIT }}-${{ hashFiles('vcpkg.json') }}

- name: 🛠️ Build VTK (Windows)
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-latest' && steps.vcpkg-installed-cache.outputs.cache-hit != 'true' }}
shell: pwsh
run: |
./vcpkg/vcpkg install --triplet x64-windows

- name: 🛠️ Disable IPO
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sed -i 's/\(DVIENNALS_BUILD_PYTHON=ON"\)/\1,"-DUSE_IPO=off"/g' pyproject.toml
cat pyproject.toml

- name: 🐍 Build and check Python Module (Windows)
if: ${{ matrix.os == 'windows-latest' }}
shell: pwsh
Expand All @@ -89,9 +85,13 @@ jobs:
$toolchain = "${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake".Replace('\', '/')

.\venv\Scripts\python -m pip install --upgrade pip
$vcpkgInstalled = "${{ github.workspace }}/vcpkg_installed".Replace('\', '/')

.\venv\Scripts\python -m pip install . `
--config-settings=cmake.define.CMAKE_TOOLCHAIN_FILE="$toolchain" `
--config-settings=cmake.define.VCPKG_TARGET_TRIPLET="x64-windows"
--config-settings=cmake.define.VCPKG_TARGET_TRIPLET="x64-windows" `
--config-settings=cmake.define.VCPKG_INSTALLED_DIR="$vcpkgInstalled" `
--config-settings=cmake.define.VCPKG_MANIFEST_INSTALL=OFF
.\venv\Scripts\python -c "import viennals; print(viennals.__doc__)"

- name: 🐍 Build and check Python Module (Other)
Expand All @@ -102,7 +102,7 @@ jobs:
./venv/bin/python -c "import viennals; print(viennals.__doc__)"

- name: 📦 Upload Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: Pre-Built (${{ matrix.os }})
path: venv
Expand All @@ -114,13 +114,18 @@ jobs:
matrix:
include:
- os: ubuntu-latest
skip: "cp36-* cp37-* cp38-* cp39-* pp37-* pp38-* pp39-* *-manylinux_i686 *-musllinux_*"
skip: "cp38-* cp39-* *-manylinux_i686 *-musllinux_*"

- os: windows-latest
skip: "cp36-* cp37-* cp38-* cp39-* pp37-* pp38-* pp39-*"
skip: "cp38-* cp39-*"

- os: macos-15-intel
archs: x86_64
skip: "cp38-* cp39-* cp310-*"

- os: macos-latest
skip: "cp36-* cp37-* cp38-* cp39-* cp310-* pp37-* pp38-* pp39-*"
archs: arm64
skip: "cp38-* cp39-* cp310-*"

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

Expand All @@ -132,7 +137,7 @@ jobs:

steps:
- name: 📥 Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: 🖥️ Setup Environment
uses: ./.github/actions/setup
Expand All @@ -142,41 +147,88 @@ jobs:
- name: 🛞 CIBuildWheel
run: pip install cibuildwheel==3.4.0 --break-system-packages

- name: 🛠️ Package Config (Windows)
if: ${{ matrix.os == 'windows-latest' }}
shell: pwsh
run: |
sed -i 's/\(DVIENNALS_BUILD_PYTHON=ON"\)/\1,"-DVIENNALS_PACKAGE_PYTHON=ON","-DVIENNALS_IS_CI=ON","-DVIENNALS_VTK_RENDERING=OFF"/g' pyproject.toml
type pyproject.toml

- name: 🛠️ Package Config (MacOs)
if: ${{ matrix.os == 'macos-latest' }}
run: |
sed -i .bak 's/\(DVIENNALS_BUILD_PYTHON=ON"\)/\1,"-DVIENNALS_PACKAGE_PYTHON=ON","-DVIENNALS_IS_CI=ON","-DVIENNALS_VTK_RENDERING=OFF"/g' pyproject.toml
cat pyproject.toml

- name: 🛠️ Package Config (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sed -i 's/\(DVIENNALS_BUILD_PYTHON=ON"\)/\1,"-DVIENNALS_PACKAGE_PYTHON=ON","-DVIENNALS_IS_CI=ON","-DVIENNALS_VTK_RENDERING=OFF"/g' pyproject.toml
cat pyproject.toml

- name: 🏗️ Build Wheels (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: ${{ matrix.skip }}
CIBW_MANYLINUX_X86_64_IMAGE: ghcr.io/viennatools/vienna-builder:cuda-python-nocuda
CIBW_TEST_COMMAND: >-
python -c "import viennals;
print(viennals.__file__);
print(viennals.d2);
print(viennals.d3)"
CIBW_CONFIG_SETTINGS: >-
cmake.define.VIENNALS_PACKAGE_PYTHON=ON
cmake.define.VIENNALS_IS_CI=ON
cmake.define.VIENNALS_VTK_RENDERING=ON
cmake.define.USE_IPO=OFF

- name: 🏗️ Build Wheels (Other)
if: ${{ matrix.os != 'ubuntu-latest' }}
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: ${{ matrix.skip }}
CIBW_ARCHS_WINDOWS: auto64
CIBW_ARCHS_MACOS: ${{ matrix.archs }}
CIBW_TEST_COMMAND: >-
python -c "import viennals;
print(viennals.__file__);
print(viennals.d2);
print(viennals.d3)"
CIBW_CONFIG_SETTINGS: >-
cmake.define.VIENNALS_PACKAGE_PYTHON=ON
cmake.define.VIENNALS_IS_CI=ON
cmake.define.VIENNALS_VTK_RENDERING=ON

- name: 🔎 Inspect wheel contents
shell: bash
run: |
python - <<'PY'
import glob
import sys
import zipfile

missing = []

for wheel in glob.glob("wheelhouse/*.whl"):
print("\n" + wheel)
with zipfile.ZipFile(wheel) as zf:
entries = sorted(zf.infolist(), key=lambda item: item.file_size, reverse=True)
for entry in entries[:40]:
size_mb = entry.file_size / 1024 / 1024
print(f"{size_mb:8.2f} MB {entry.filename}")

names = [entry.filename for entry in entries]
if "win_amd64" in wheel:
libs = [name for name in names if name.startswith("viennals.libs/")]
openmp = [
name
for name in libs
if name.lower() == "viennals.libs/libomp140.x86_64.dll"
]
core = next(name for name in names if name.startswith("viennals/_core") and name.endswith(".pyd"))
core_bytes = zf.read(core)

print("\nWindows runtime libraries:")
for name in libs:
print(f" {name}")

if not libs:
missing.append(f"{wheel}: missing viennals.libs/")
if not openmp:
missing.append(f"{wheel}: missing viennals.libs/libomp140.x86_64.dll")
if b"omp_set_nested" in core_bytes:
missing.append(f"{wheel}: _core.pyd still references deprecated omp_set_nested")

if missing:
print("\nWheel runtime checks failed:", file=sys.stderr)
for item in missing:
print(f" {item}", file=sys.stderr)
raise SystemExit(1)
PY

- name: 📦 Upload Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
Expand Down
Loading