-
Notifications
You must be signed in to change notification settings - Fork 12
69 lines (57 loc) · 2.05 KB
/
build-wheel.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
64
65
66
67
68
69
name: Create Python wheel using Conda
on:
workflow_dispatch
# push:
# branches: [ master ]
env:
PYTHONUTF8: 1
jobs:
build:
name: Build for python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ 'ubuntu', 'macos', 'windows' ]
python-version: [ '3.8', '3.9', '3.10' ]
steps:
- name: Checkout project
uses: actions/checkout@v2
# See https://cibuildwheel.readthedocs.io/en/stable/
# Not usable for now, because cadquery libraries require glibc 2.31,
# but the manylinux images have been created only up to 2.24 (as of 2022-04-11).
# - name: Build wheels
# uses: pypa/[email protected]
# with:
# output-dir: dist
# see https://github.com/marketplace/actions/setup-miniconda
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
activate-environment: ocp-vtk
python-version: ${{ matrix.python-version }}
channels: conda-forge
- name: Build wheel
shell: bash -l {0}
run: |
conda install -n ocp-vtk -y ocp=7.5.3.0 vtk=9.0.1
pip install --upgrade pip
pip install build setuptools wheel requests auditwheel delocate delvewheel
python -m build --no-isolation
- name: Print info
shell: bash -l {0}
run: |
conda info
conda list --explicit
echo '${{ github.event_name }} ${{ github.ref }}'
- name: Test wheel
shell: bash -l {0}
run: |
pip install 'git+https://github.com/CadQuery/cadquery' ezdxf multimethod nlopt nptyping typish
python -c "import cadquery; cadquery.Workplane('XY').box(1,2,3).toSvg()"
# see https://github.com/marketplace/actions/upload-a-build-artifact
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ocp-vtk-${{ matrix.os }}-cp${{ matrix.python-version }}
path: dist/*.whl