|
7 | 7 | workflow_dispatch:
|
8 | 8 |
|
9 | 9 | jobs:
|
| 10 | + build_stubs: |
| 11 | + name: Build VCL Stubs |
| 12 | + runs-on: ${{ matrix.os }} |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + python: ['3.11'] |
| 16 | + include: |
| 17 | + - os: [windows-latest] |
| 18 | + arch: ["AMD64"] |
| 19 | + |
| 20 | + steps: |
| 21 | + - name: Check out repository |
| 22 | + uses: actions/checkout@v3 |
| 23 | + |
| 24 | + - name: Build and Install VCL |
| 25 | + run: | |
| 26 | + python -m pip install setuptools --upgrade |
| 27 | + python -m pip install wheel --upgrade |
| 28 | + python setup.py install |
| 29 | +
|
| 30 | + - name: Install mypy |
| 31 | + run: | |
| 32 | + python -m pip install git+https://github.com/lmbelo/mypy.git |
| 33 | +
|
| 34 | + - name: Build Stubs |
| 35 | + run: | |
| 36 | + python -m mypy.stubgen -m delphivcl -o .\delphivcl --include-docstrings |
| 37 | + ren .\delphivcl\delphivcl.pyi __init__.pyi |
| 38 | +
|
| 39 | + - name: Cache Stubs |
| 40 | + id: cache-stubs |
| 41 | + uses: actions/cache@v3 |
| 42 | + with: |
| 43 | + path: .\delphivcl\__init__.pyi |
| 44 | + key: ${{ runner.os }}-stubs |
| 45 | + |
10 | 46 | build_wheels_win_32:
|
11 | 47 | name: Build Windows x86 wheels for Python ${{ matrix.python }}
|
| 48 | + needs: [build_stubs] |
12 | 49 | runs-on: ${{ matrix.os }}
|
13 | 50 | strategy:
|
14 | 51 | matrix:
|
|
21 | 58 | uses: actions/checkout@v3
|
22 | 59 | with:
|
23 | 60 | fetch-depth: 0
|
| 61 | + |
| 62 | + - name: Restore Cached Stubs |
| 63 | + id: cache-stubs |
| 64 | + uses: actions/cache@v3 |
| 65 | + with: |
| 66 | + path: .\delphivcl\__init__.pyi |
| 67 | + key: ${{ runner.os }}-stubs |
24 | 68 |
|
25 | 69 | - name: Set up Python ${{ matrix.python }}
|
26 | 70 | uses: actions/setup-python@v3
|
|
42 | 86 |
|
43 | 87 | build_wheels_win_64:
|
44 | 88 | name: Build Windows x64 wheels for Python ${{ matrix.python }}
|
| 89 | + needs: [build_stubs] |
45 | 90 | runs-on: ${{ matrix.os }}
|
46 | 91 | strategy:
|
47 | 92 | matrix:
|
|
54 | 99 | uses: actions/checkout@v3
|
55 | 100 | with:
|
56 | 101 | fetch-depth: 0
|
| 102 | + |
| 103 | + - name: Restore Cached Stubs |
| 104 | + id: cache-stubs |
| 105 | + uses: actions/cache@v3 |
| 106 | + with: |
| 107 | + path: .\delphivcl\__init__.pyi |
| 108 | + key: ${{ runner.os }}-stubs |
57 | 109 |
|
58 | 110 | - name: Set up Python ${{ matrix.python }}
|
59 | 111 | uses: actions/setup-python@v3
|
|
0 commit comments