Skip to content

Commit 989e09e

Browse files
committed
Syncing local-build.yml
1 parent d6c1097 commit 989e09e

File tree

1 file changed

+20
-72
lines changed

1 file changed

+20
-72
lines changed

.github/workflows/local-build.yml

Lines changed: 20 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Local Build Method of Creating Python wheels
1+
name: Build Python wheels for MacOS-arm64
22

33
on:
44
workflow_dispatch
@@ -10,100 +10,48 @@ env:
1010

1111
jobs:
1212
build:
13-
name: Build Python wheels for ${{ matrix.os }}
13+
name: Wheel for python ${{ matrix.python-version }}
1414
runs-on: ${{ matrix.os }}
1515

1616
strategy:
1717
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' ]
2020

2121
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-
3722
- 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
4724

4825
# see https://github.com/marketplace/actions/setup-miniconda
4926
- name: Setup Conda
50-
uses: conda-incubator/setup-miniconda@v2
27+
uses: conda-incubator/setup-miniconda@v3
5128
with:
5229
#miniforge-version: latest
5330
miniconda-version: latest
5431
activate-environment: build-env
5532
python-version: ${{ matrix.python-version }}
5633
channels: cadquery, conda-forge, defaults
5734

58-
- name: Ubuntu Deps Setup
35+
- name: Remove temp files
5936
shell: bash -l {0}
6037
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
7640
77-
- name: Pip Deps Setup 1
41+
- name: Run dependencies setup
7842
shell: bash -l {0}
7943
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
8249
83-
- name: Pip Deps Setup 2
50+
- name: Run wheel build
8451
shell: bash -l {0}
85-
if: ${{ matrix.os == 'ubuntu-22.04' }}
8652
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+
10755
- name: Print info
10856
shell: bash -l {0}
10957
run: |
@@ -115,15 +63,15 @@ jobs:
11563
shell: bash -l {0}
11664
run: |
11765
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 }}
11967
conda run -n cadquerytest conda config --env --set subdir osx-arm64
12068
conda activate cadquerytest
12169
python -m pip install dist/*.whl
12270
python -c "import OCP;print('OCP imported successfully')"
12371
12472
# see https://github.com/marketplace/actions/upload-a-build-artifact
12573
- name: Upload Artifact
126-
uses: actions/upload-artifact@v3
74+
uses: actions/upload-artifact@v4
12775
with:
12876
name: cadquery-ocp-${{ matrix.os }}-cp${{ matrix.python-version }}
12977
path: dist/*.whl

0 commit comments

Comments
 (0)