-
Notifications
You must be signed in to change notification settings - Fork 14
63 lines (53 loc) · 1.93 KB
/
build-vtk.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Build VTK from source
on:
workflow_dispatch
env:
PYTHONUTF8: 1
jobs:
build:
name: Build with wrapper for Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ 'ubuntu-20.04', 'macos-11', 'macos-14', 'windows-2019' ]
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
steps:
- name: Checkout project
uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup Python Env
shell: bash -l {0}
# The `bdist_wheel` command requires the `wheel` package
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade wheel
python3 -m pip freeze
- name: Ubuntu Deps
shell: bash -l {0}
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt install -y build-essential cmake mesa-common-dev mesa-utils freeglut3-dev python3-dev python3-venv git-core ninja-build cmake wget libglvnd0 libglvnd-dev
fi
- name: Build Wheel from Scratch
shell: bash -l {0}
run: |
pip3 install --upgrade setuptools
mkdir -p ./vtk/build
curl -L https://www.vtk.org/files/release/9.2/VTK-9.2.6.tar.gz --output VTK-9.2.6.tar.gz # Update this for newer releases of VTK
ls
ls ./vtk
cat VTK-9.2.6.tar.gz
tar -zxf VTK-9.2.6.tar.gz --directory ./vtk/
cd ./vtk/build
cmake -GNinja -DVTK_WHEEL_BUILD=ON -DVTK_WRAP_PYTHON=ON -DCMAKE_BUILD_TYPE=Release ../VTK-9.2.6
ninja
python3 setup.py bdist_wheel
cd ../../
find ./ -iname *.whl
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: cadquery-vtk-${{ matrix.os }}-cp${{ matrix.python-version }}
path: vtk/build/dist/*.whl