-
Notifications
You must be signed in to change notification settings - Fork 13
58 lines (47 loc) · 1.54 KB
/
build-ocp-stubs.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
name: Build OCP stubs
on: workflow_dispatch
env:
OCP: 7.8.1.1
WHEEL: 7.8.1.1.post1
jobs:
stubs:
name: Build OCP stubs for ${{ matrix.os }} on ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04"]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} via micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: build-stubs
create-args: >-
python=${{ matrix.python-version }}
log-level: debug
init-shell: bash
cache-downloads: true
- name: Download official OCP source
shell: bash -l {0}
run: |
set -euo pipefail
curl -L -O https://github.com/CadQuery/OCP/releases/download/${{ env.OCP }}/OCP_src_stubs_ubuntu-20.04.zip
unzip OCP_src_stubs_*
rm *.zip
mv OCP_src_stubs_*/OCP-stubs pypi-stubs/
rm -rf OCP_src_stubs_*
- name: Create OCP stubs wheel
shell: bash -l {0}
run: |
set -euo pipefail
micromamba activate build-stubs
pip install build setuptools wheel
cd pypi-stubs
python -m build -w -n
- name: Upload cadquery_ocp stubs wheel
uses: actions/upload-artifact@v4
with:
name: cadquery-ocp-${{ env.WHEEL }}-stubs-cp${{ matrix.python-version }}
path: pypi-stubs/dist/*.whl