1
- name : Local Build Method of Creating Python wheels
1
+ name : Build Python wheels for MacOS-arm64
2
2
3
3
on :
4
4
workflow_dispatch
@@ -10,100 +10,48 @@ env:
10
10
11
11
jobs :
12
12
build :
13
- name : Build Python wheels for ${{ matrix.os }}
13
+ name : Wheel for python ${{ matrix.python-version }}
14
14
runs-on : ${{ matrix.os }}
15
15
16
16
strategy :
17
17
matrix :
18
- os : [ 'macos-14' ] # [ 'ubuntu-22.04', ' macos-11', 'macos-14', 'windows-2019' ]
19
- python-version : [ '3.10 ' ]
18
+ os : [ 'macos-14' ] # macos-arm64 only
19
+ python-version : [ '3.9', '3.10', '3.11', '3.12 ' ]
20
20
21
21
steps :
22
-
23
- # see https://github.com/marketplace/actions/download-workflow-artifact
24
- # - name: Download artifact
25
- # uses: dawidd6/action-download-artifact@v2
26
- # if: ${{ matrix.os == 'ubuntu-22.04' }}
27
- # with:
28
- # workflow: build-vtk.yml
29
- # path: /tmp/vtk-wheels
30
-
31
- # - name: List downloaded wheels
32
- # if: ${{ matrix.os == 'ubuntu-22.04' }}
33
- # run: |
34
- # find /tmp/vtk-wheels -ls
35
- # ls -ld /tmp/vtk-wheels/*-cp${{ matrix.python-version }}/vtk-*.whl
36
-
37
22
- name : Checkout project
38
- uses : actions/checkout@v2
39
-
40
- # See https://cibuildwheel.readthedocs.io/en/stable/
41
- # Not usable for now, because cadquery libraries require glibc 2.31,
42
- # but the manylinux images have been created only up to 2.24 (as of 2022-04-11).
43
- # - name: Build wheels
44
- # uses: pypa/cibuildwheel@v2.4.0
45
- # with:
46
- # output-dir: dist
23
+ uses : actions/checkout@v4
47
24
48
25
# see https://github.com/marketplace/actions/setup-miniconda
49
26
- name : Setup Conda
50
- uses : conda-incubator/setup-miniconda@v2
27
+ uses : conda-incubator/setup-miniconda@v3
51
28
with :
52
29
# miniforge-version: latest
53
30
miniconda-version : latest
54
31
activate-environment : build-env
55
32
python-version : ${{ matrix.python-version }}
56
33
channels : cadquery, conda-forge, defaults
57
34
58
- - name : Ubuntu Deps Setup
35
+ - name : Remove temp files
59
36
shell : bash -l {0}
60
37
run : |
61
- if [ "$RUNNER_OS" == "Linux" ]; then
62
- sudo apt install -y libegl1 libegl1-mesa-dev
63
- fi
64
-
65
- # - name: Conda Deps Setup
66
- # if: ${{ matrix.os != 'ubuntu-22.04' }}
67
- # shell: bash -l {0}
68
- # run: |
69
- # conda install -c cadquery -n cadquery-ocp -y ocp=7.7.2.* vtk=9.2.*
70
-
71
- # - name: Conda Deps Setup Linux
72
- # if: ${{ matrix.os == 'ubuntu-22.04' }}
73
- # shell: bash -l {0}
74
- # run: |
75
- # conda install -c cadquery -n cadquery-ocp -y ocp=7.7.2.* vtk=9.2.* occt=7.7.2=all*
38
+ rm -rf -v ./build
39
+ rm -rf -v ./cadquery_ocp.egg-info
76
40
77
- - name : Pip Deps Setup 1
41
+ - name : Run dependencies setup
78
42
shell : bash -l {0}
79
43
run : |
80
- python -m pip install --upgrade pip
81
- python -m pip install build setuptools wheel requests delocate delvewheel
44
+ echo 'Building wheel for Python ${{ matrix.python-version }}'
45
+ echo 'Conda Deps Setup'
46
+ CONDA_SUBDIR=osx-arm64 conda create --yes -n ocp-build-system -c cadquery -c conda-forge python=${{ matrix.python-version }} ocp=7.7.2.* vtk=9.2.* pip
47
+ conda run -n ocp-build-system conda config --env --set subdir osx-arm64
48
+ conda run -n ocp-build-system pip install build setuptools wheel requests delocate auditwheel delvewheel
82
49
83
- - name : Pip Deps Setup 2
50
+ - name : Run wheel build
84
51
shell : bash -l {0}
85
- if : ${{ matrix.os == 'ubuntu-22.04' }}
86
52
run : |
87
- python -m pip install auditwheel patchelf
88
-
89
- # - name: Manylinux Build 1
90
- # shell: bash -l {0}
91
- # if: ${{ matrix.os == 'ubuntu-22.04' }}
92
- # run: |
93
- # export VTK_MANYLINUX=/tmp/vtk-manylinux
94
- # pip install -t $VTK_MANYLINUX --no-deps /tmp/vtk-wheels/*-cp${{ matrix.python-version }}/vtk-*.whl
95
- # python -m build --no-isolation --wheel
96
-
97
- # - name: Conda-only Build
98
- # shell: bash -l {0}
99
- # if: ${{ matrix.os != 'ubuntu-22.04' }}
100
- # run: |
101
- # python -m build --no-isolation --wheel
102
-
103
- - name : Run local build script
104
- run : |
105
- ./local-build.sh
106
-
53
+ conda run --live-stream -n ocp-build-system python -m build --no-isolation --wheel
54
+
107
55
- name : Print info
108
56
shell : bash -l {0}
109
57
run : |
@@ -115,15 +63,15 @@ jobs:
115
63
shell : bash -l {0}
116
64
run : |
117
65
conda deactivate
118
- CONDA_SUBDIR=osx-arm64 conda create --yes -n cadquerytest python=3.10
66
+ CONDA_SUBDIR=osx-arm64 conda create --yes -n cadquerytest python=${{ matrix.python-version }}
119
67
conda run -n cadquerytest conda config --env --set subdir osx-arm64
120
68
conda activate cadquerytest
121
69
python -m pip install dist/*.whl
122
70
python -c "import OCP;print('OCP imported successfully')"
123
71
124
72
# see https://github.com/marketplace/actions/upload-a-build-artifact
125
73
- name : Upload Artifact
126
- uses : actions/upload-artifact@v3
74
+ uses : actions/upload-artifact@v4
127
75
with :
128
76
name : cadquery-ocp-${{ matrix.os }}-cp${{ matrix.python-version }}
129
77
path : dist/*.whl
0 commit comments