Skip to content

Commit 37167c1

Browse files
committed
use ocp-build-system branch of ocp-addons
1 parent 5e22cb3 commit 37167c1

File tree

1 file changed

+24
-60
lines changed

1 file changed

+24
-60
lines changed

.github/actions/build-ocp-addons/action.yml

Lines changed: 24 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ runs:
9696
9797
# - - -
9898

99-
- name: Download OCCT and VTK SDK
99+
- name: Download OCCT SDK
100100
uses: actions/download-artifact@v4
101101
with:
102102
name: SDK_${{ inputs.os }}-py_${{ inputs.python-version }}-novtk
@@ -105,69 +105,33 @@ runs:
105105

106106
# - - -
107107

108-
- name: Clone ocp-addons
108+
- name: Clone ocp-addons and build wheel
109109
shell: bash -l {0}
110110
run: |
111-
# Clone ocp-addons
111+
# Clone ocp-addons and build wheel
112112
set -e
113113
set -o pipefail
114114
115115
git clone https://github.com/jdegenstein/ocp-addons.git
116-
117-
cd ocp-addons
118-
119-
${{ inputs.sed-i }} '/include_dirs=\[/,/\],/c\
120-
include_dirs=[\
121-
os.path.join(os.environ["GITHUB_WORKSPACE"], "occt-${{ env.OCCT }}-novtk", "include", "opencascade")\
122-
],
123-
' setup.py
124-
${{ inputs.sed-i }} '/library_dirs=\[/,/\],/c\
125-
library_dirs=[\
126-
os.path.join(os.environ["GITHUB_WORKSPACE"], "occt-${{ env.OCCT }}-novtk", "lib")\
127-
],
128-
' setup.py
129-
130-
if [[ "$RUNNER_OS" == "Linux" ]]; then
116+
git switch ocp-build-system
131117
132-
${{ inputs.sed-i }} 's/\(extra_compile_args=\["-O3"\)\(.*\)/\1, "-D_GLIBCXX_USE_CXX11_ABI=0", "-std=c++17"\2/' setup.py
133-
${{ inputs.sed-i }} '/^if platform\.system/,+8d' setup.py
134-
135-
elif [[ "$RUNNER_OS" == "macOS" ]]; then
136-
137-
${{ inputs.sed-i }} '/extra_compile_args=\[/a\
138-
extra_link_args=[\
139-
"-Wl,-headerpad_max_install_names",\
140-
"-mmacosx-version-min=11.1",\
141-
],
142-
' setup.py
143-
fi
144-
145-
cat setup.py
146-
147-
# - - -
148-
149-
- name: Build Wheel
150-
shell: bash -l {0}
151-
run: |
152-
# Build Wheel
153-
set -e
154-
set -o pipefail
155-
156118
cd ocp-addons
157-
if [[ "$RUNNER_OS" == "macOS" ]]; then
158-
export CC=clang
159-
export CXX=clang++
119+
# if [[ "$RUNNER_OS" == "macOS" ]]; then
120+
# export CC=clang
121+
# export CXX=clang++
160122
161-
clang++ --version
123+
# clang++ --version
162124
163-
elif [[ "$RUNNER_OS" == "Linux" ]]; then
125+
# elif [[ "$RUNNER_OS" == "Linux" ]]; then
164126
165-
export CC=/usr/bin/gcc
166-
export CXX=/usr/bin/g++
167-
g++ --version
168-
fi
127+
# export CC=/usr/bin/gcc
128+
# export CXX=/usr/bin/g++
129+
# g++ --version
130+
# fi
169131
132+
$CXX --version
170133
134+
export OCCT_SDK="$GITHUB_WORKSPACE/occt-${{ env.OCCT }}-novtk"
171135
python -m build -n -w
172136
ls -l dist
173137
@@ -214,15 +178,15 @@ runs:
214178
VERSION=$(awk -F'"' '/^__version__/ {print $2}' setup.py)
215179
216180
# Patch @rpath/libc++.1.dylib to /usr/lib/libc++.1.dylib
217-
cd dist
218-
python -m wheel unpack ocp_addons-${VERSION}*.whl
219-
rm ocp_addons-${VERSION}*.whl
220-
# install_name_tool -change @rpath/libc++.1.dylib /usr/lib/libc++.1.dylib ocp_addons*/*.so
221-
install_name_tool -add_rpath /usr/lib ocp_addons*/*.so
222-
223-
otool -L ocp_addons*/*.so
224-
python -m wheel pack ocp_addons-${VERSION}
225-
cd ..
181+
# cd dist
182+
# python -m wheel unpack ocp_addons-${VERSION}*.whl
183+
# rm ocp_addons-${VERSION}*.whl
184+
# # install_name_tool -change @rpath/libc++.1.dylib /usr/lib/libc++.1.dylib ocp_addons*/*.so
185+
# install_name_tool -add_rpath /usr/lib ocp_addons*/*.so
186+
187+
# otool -L ocp_addons*/*.so
188+
# python -m wheel pack ocp_addons-${VERSION}
189+
# cd ..
226190
227191
# @rpath/libc++.1.dylib confuses delocate but can safely be ignored
228192
DYLD_LIBRARY_PATH=$GITHUB_WORKSPACE/occt-${{ env.OCCT }}-novtk/lib:/usr/lib python \

0 commit comments

Comments
 (0)