11
11
# This is the manual run from the UI.
12
12
workflow_dispatch :
13
13
inputs :
14
- docker_image_tag :
14
+ vcpkg_docker_image_tag :
15
15
# Empty string means the same thing as "latest", but we use an empty string here to ensure this works,
16
16
# because `types: [published]` can't have any inputs, so there we are forced to use an empty string, so it needs to work.
17
17
default : " "
20
20
# This is the `uses:` call from other `.yml` files.
21
21
workflow_call :
22
22
inputs :
23
- docker_image_tag :
23
+ vcpkg_docker_image_tag :
24
24
required : true
25
25
type : string
26
26
@@ -52,25 +52,23 @@ jobs:
52
52
timeout-minutes : 80
53
53
runs-on : ${{ matrix.runner }}
54
54
container :
55
- image : meshlib/meshlib-${{matrix.os}}:${{inputs.docker_image_tag || 'latest'}}
55
+ image : meshlib/meshlib-${{matrix.os}}:${{inputs.vcpkg_docker_image_tag || 'latest'}}
56
56
options : ${{ matrix.container-options }}
57
57
strategy :
58
58
fail-fast : false
59
59
matrix :
60
60
platform : ["x86_64", "aarch64"]
61
61
include :
62
62
- platform : " x86_64"
63
- os : " ubuntu20 "
63
+ os : rockylinux8-vcpkg-x64
64
64
container-options : " --user root"
65
65
runner : ubuntu-latest
66
- compiler : /usr/bin/clang++-11
66
+ compiler : /usr/bin/clang++
67
67
- platform : " aarch64"
68
- os : " ubuntu20- arm64"
68
+ os : rockylinux8-vcpkg- arm64
69
69
container-options : " " # empty
70
70
runner : [ self-hosted, linux-arm64, on-demand, meshinspector ]
71
- # When using Clang 11 on Ubuntu Arm 20.04, we get some obscure ABI issues that fail some tests,
72
- # see the comments in `test_regression/test_algorithms/test_decimate.py` for more details.
73
- compiler : /usr/bin/clang++-18
71
+ compiler : /usr/bin/clang++
74
72
75
73
steps :
76
74
- name : Work-around possible permission issues
@@ -102,39 +100,50 @@ jobs:
102
100
git config --global --add safe.directory ${GITHUB_WORKSPACE}/thirdparty/mrbind
103
101
git submodule update --init --recursive --depth 1 thirdparty/imgui thirdparty/parallel-hashmap thirdparty/mrbind-pybind11 thirdparty/mrbind
104
102
105
- - name : Python setup
106
- env :
107
- ALLOW_DELETING_EXISTING_PYTHON : 1
108
- run : |
109
- scripts/mrbind-pybind11/install_all_python_versions_ubuntu_reqs.sh
110
-
111
- - name : Install thirdparty libs
103
+ - name : Install mrbind
112
104
# Also print the amount of RAM. If there's not enough RAM, building MRBind bindings can fail. Not doing it in that step, because OOM fails can erase logs from the current step.
113
105
run : |
114
- ln -s /usr/local/lib/meshlib-thirdparty-lib/lib ./lib
115
- ln -s /usr/local/lib/meshlib-thirdparty-lib/include ./include
116
- ./scripts/mrbind/install_mrbind_ubuntu.sh
106
+ ./scripts/mrbind/install_mrbind_rockylinux.sh
117
107
free -h
118
108
119
109
- name : Build
120
110
run : ./scripts/build_source.sh
121
111
env :
122
112
MESHLIB_BUILD_RELEASE : " ON"
123
113
MESHLIB_BUILD_DEBUG : " OFF"
124
- # When using Clang 11 on Ubuntu Arm 20.04, we get some obscure ABI issues that fail some tests,
125
- # see the comments in `test_regression/test_algorithms/test_decimate.py` for more details.
126
- CMAKE_CXX_COMPILER : ${{matrix.compiler}}
127
- # FIXME: OpenGL libraries are included to wheel packages when the XDE module is used
128
- # Enabling `-allow-unsupported-compiler` because we use Clang 18 on Arm, while Cuda supports at most 16.
114
+ CMAKE_CXX_COMPILER : ${{ matrix.compiler }}
129
115
MR_CMAKE_OPTIONS : >
130
- -DMRIOEXTRAS_OPENCASCADE_USE_XDE=OFF
131
116
-DMRVIEWER_NO_GTK=ON
132
- -DMESHLIB_BUILD_MRCUDA =ON
133
- ${{ fromJSON('["", "-DCMAKE_CUDA_FLAGS=-allow-unsupported-compiler"]')[matrix.platform == 'aarch64'] }}
117
+ -DMR_PCH_USE_EXTRA_HEADERS =ON
118
+ -DCMAKE_CUDA_HOST_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/g++
134
119
135
120
- name : Generate and build MRBind bindings
136
121
run : |
137
- make -f scripts/mrbind/generate.mk -B --trace FOR_WHEEL=1 CXX_FOR_ABI=${{matrix.compiler}}
122
+ make -f scripts/mrbind/generate.mk -B --trace \
123
+ FOR_WHEEL=1 \
124
+ CXX_FOR_ABI=${{ matrix.compiler }} \
125
+ CXX_FOR_BINDINGS=${{ matrix.compiler }} \
126
+ DEPS_BASE_DIR=${VCPKG_ROOT}/installed/${VCPKG_TRIPLET}
127
+
128
+ # install helper utility for Python version management
129
+ - name : Install uv
130
+ uses : astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # v6
131
+
132
+ - name : Build Python shim libs
133
+ run : |
134
+ PYTHON_VERSIONS=$(cat scripts/mrbind-pybind11/python_versions.txt | xargs)
135
+ GET_SYSCONFIG_VAR=${PWD}/scripts/wheel/get_sysconfig_var.py
136
+
137
+ for PYTHON_VER in ${PYTHON_VERSIONS} ; do
138
+ export PKG_CONFIG_PATH=$(uv run --python ${PYTHON_VER} ${GET_SYSCONFIG_VAR} LIBPC)
139
+
140
+ make shims -f scripts/mrbind/generate.mk -B --trace \
141
+ FOR_WHEEL=1 \
142
+ CXX_FOR_ABI=${{ matrix.compiler }} \
143
+ CXX_FOR_BINDINGS=${{ matrix.compiler }} \
144
+ DEPS_BASE_DIR=${VCPKG_ROOT}/installed/${VCPKG_TRIPLET} \
145
+ PYTHON_VERSIONS=${PYTHON_VER}
146
+ done
138
147
139
148
- name : Run Tests
140
149
run : MR_LOCAL_RESOURCES=1 xvfb-run -a ./build/Release/bin/MeshViewer -hidden -noEventLoop -unloadPluginsAtEnd
@@ -143,14 +152,28 @@ jobs:
143
152
run : build/Release/bin/MRTest
144
153
145
154
- name : Python Tests
146
- working-directory : ./build/Release/bin
147
- run : python3 ./../../../scripts/run_python_test_script.py -multi-cmd
155
+ run : |
156
+ PYTHON_VERSIONS=$(cat scripts/mrbind-pybind11/python_versions.txt | xargs)
157
+ REQUIREMENTS_FILE=${PWD}/requirements/python.txt
158
+ GET_SYSCONFIG_VAR=${PWD}/scripts/wheel/get_sysconfig_var.py
159
+
160
+ cd build/Release/bin
161
+ for PYTHON_VER in ${PYTHON_VERSIONS} ; do
162
+ PYTHON_LIB_DIR=$(uv run --python ${PYTHON_VER} ${GET_SYSCONFIG_VAR} LIBDIR)
163
+
164
+ LD_LIBRARY_PATH=${PYTHON_LIB_DIR} \
165
+ uv run \
166
+ --python ${PYTHON_VER} \
167
+ --with-requirements ${REQUIREMENTS_FILE} \
168
+ --with pytest \
169
+ python3 ./../../../scripts/run_python_test_script.py -d '../test_python'
170
+ done
148
171
149
172
- name : Create and fix Wheel
150
- shell : bash
151
173
run : |
152
174
python3.12 -m venv ./wheel_venv
153
175
source ./wheel_venv/bin/activate
176
+ python3.12 -m pip install patchelf
154
177
python3.12 ./scripts/wheel/build_wheel.py --version ${{needs.setup.outputs.version_tag || '0'}}
155
178
156
179
- name : Upload Python Stubs
@@ -407,7 +430,7 @@ jobs:
407
430
fail-fast : false
408
431
matrix :
409
432
platform : ["x86_64", "aarch64"]
410
- os : ["ubuntu:20.04 ", "ubuntu:22.04 ", "debian:11-slim ", "fedora:37 ", "fedora:39 "]
433
+ py-version : ["3.8 ", "3.9 ", "3.10", "3.11 ", "3.12 ", "3.13 "]
411
434
include :
412
435
- platform : " x86_64"
413
436
runner : ubuntu-latest
@@ -417,41 +440,44 @@ jobs:
417
440
runner : [ self-hosted, linux-arm64, on-demand, meshinspector ]
418
441
container-options : " " # empty
419
442
container-prefix : " arm64v8/"
420
- - os : " ubuntu:20.04"
421
- py-version : " 3.8"
422
- py-cmd : " python3.8"
423
- - os : " debian:11-slim"
424
- py-version : " 3.9"
425
- py-cmd : " python3.9"
426
- - os : " ubuntu:22.04"
427
- py-version : " 3.10"
428
- py-cmd : " python3.10"
429
- - os : " fedora:37"
430
- py-version : " 3.11"
431
- py-cmd : " python3.11"
432
- - os : " fedora:39"
433
- py-version : " 3.12"
434
- py-cmd : " python3.12"
443
+ - py-version : " 3.8"
444
+ os : " rockylinux:8"
445
+ - py-version : " 3.9"
446
+ os : " debian:11-slim"
447
+ - py-version : " 3.10"
448
+ os : " ubuntu:22.04"
449
+ - py-version : " 3.11"
450
+ os : " fedora:37"
451
+ - py-version : " 3.12"
452
+ os : " fedora:39"
453
+ - py-version : " 3.13"
454
+ os : " fedora:42"
455
+ env :
456
+ PYTHON_CMD : python${{ matrix.py-version }}
435
457
steps :
436
458
- name : Checkout
437
459
uses : actions/checkout@v4
438
460
with :
439
461
ref : ${{needs.setup.outputs.version_tag}}
440
462
441
- - name : Ubuntu system setup
442
- if : ${{ matrix.os == 'ubuntu:20.04' || matrix.os == 'ubuntu:22.04' || matrix.os == 'debian:11-slim' }}
443
- run : apt -y update && apt -y upgrade && apt -y install curl libssl-dev python3-pip
463
+ - name : Rocky Linux system setup
464
+ if : ${{ matrix.os == 'rockylinux:8' }}
465
+ run : dnf -y install python38-pip
466
+
467
+ - name : Debian/Ubuntu system setup
468
+ if : ${{ matrix.os == 'debian:11-slim' || matrix.os == 'ubuntu:22.04' }}
469
+ run : apt -y update && apt -y install curl libssl-dev python3-pip
444
470
445
- - name : Fedora 37 system setup
446
- if : ${{matrix.os == 'fedora:37' || matrix.os == 'fedora:39'}}
447
- run : dnf -y install python3 pip
471
+ - name : Fedora system setup
472
+ if : ${{ matrix.os == 'fedora:37' || matrix.os == 'fedora:39' || matrix.os == 'fedora:42' }}
473
+ run : dnf -y install python3- pip
448
474
449
475
- name : Pip setup
450
476
run : |
451
- ${{ matrix.py-cmd }} -m pip install --upgrade pip
452
- ${{ matrix.py-cmd }} -m pip uninstall -y meshlib
453
- ${{ matrix.py-cmd }} -m pip install --upgrade -r ./requirements/python.txt
454
- ${{ matrix.py-cmd }} -m pip install pytest
477
+ ${{ env.PYTHON_CMD }} -m pip install --upgrade pip
478
+ ${{ env.PYTHON_CMD }} -m pip uninstall -y meshlib
479
+ ${{ env.PYTHON_CMD }} -m pip install --upgrade -r ./requirements/python.txt
480
+ ${{ env.PYTHON_CMD }} -m pip install pytest
455
481
456
482
- name : Download Meshlib wheel from Artifact
457
483
uses : actions/download-artifact@v4
@@ -460,11 +486,11 @@ jobs:
460
486
merge-multiple : true
461
487
462
488
- name : Meshlib wheel install
463
- run : ${{ matrix.py-cmd }} -m pip install ${{ matrix.pip-options }} ./meshlib-*.whl
489
+ run : ${{ env.PYTHON_CMD }} -m pip install ${{ matrix.pip-options }} ./meshlib-*.whl
464
490
465
491
- name : Run Python tests
466
492
working-directory : test_python
467
- run : ${{ matrix.py-cmd }} -m pytest -s -v
493
+ run : ${{ env.PYTHON_CMD }} -m pytest -s -v
468
494
469
495
windows-pip-test :
470
496
needs : [windows-pip-build]
0 commit comments