1212
1313env :
1414 CIBW_TEST_COMMAND : python {project}/tests/test.py
15- # This is a hack that can be removed when we start using wheels for pybind11
16- CIBW_BEFORE_BUILD : pip install cmake git+https://github.com/pybind/pybind11.git@master
15+ # This allows us to test against current master of pybind11.
16+ CIBW_ENVIRONMENT : " PIP_FIND_LINKS=${{ github.workspace }}/dist"
17+ PIP_FIND_LINKS : " $GITHUB_WORKSPACE/dist"
1718
1819
1920jobs :
21+ build_pybind11 :
22+ name : Build pybind11 packages from source
23+ runs-on : ubuntu-latest
24+
25+ steps :
26+ - uses : actions/checkout@v2
27+ with :
28+ repository : pybind/pybind11
29+
30+ - uses : actions/setup-python@v2
31+
32+ - name : Download requirements
33+ run : python -m pip install build
34+
35+ - name : Build files
36+ run : |
37+ python -m build
38+
39+ - uses : actions/upload-artifact@v2
40+ with :
41+ name : pybind11
42+ path : dist/*
43+
44+
2045 build_sdist :
2146 name : Build SDist
2247 runs-on : ubuntu-latest
2348 steps :
2449 - uses : actions/checkout@v2
50+
2551 - uses : actions/setup-python@v2
2652
2753 - name : Install deps
4167 build_wheels :
4268 name : Wheels on ${{ matrix.os }}
4369 runs-on : ${{ matrix.os }}
70+ needs : [build_pybind11]
4471 strategy :
4572 fail-fast : false
4673 matrix :
@@ -51,15 +78,18 @@ jobs:
5178
5279 - uses : actions/setup-python@v2
5380
81+ - uses : actions/download-artifact@v2
82+ with :
83+ name : pybind11
84+ path : dist
85+
5486 - name : Install cibuildwheel
5587 run : python -m pip install cibuildwheel==1.6.0
5688
5789 - name : Build wheel
5890 run : python -m cibuildwheel --output-dir wheelhouse
5991 env :
60- # We have to skip Win 3.5 for now, because it doesn't support PEP 518
61- # build from a portable install (can re-add when using wheels for pybind11)
62- CIBW_SKIP : cp27-win* cp35-win*
92+ CIBW_SKIP : cp27-win*
6393
6494 - name : Show files
6595 run : ls -lh wheelhouse
@@ -79,14 +109,18 @@ jobs:
79109 build_win27_wheels :
80110 name : Py 2.7 wheels on Windows
81111 runs-on : windows-latest
112+ needs : [build_pybind11]
82113
83114 steps :
84- - uses : actions/checkout@v1
85- with :
86- submodules : true
115+ - uses : actions/checkout@v2
87116
88117 - uses : actions/setup-python@v2
89118
119+ - uses : actions/download-artifact@v2
120+ with :
121+ name : pybind11
122+ path : dist
123+
90124 - name : Install cibuildwheel
91125 run : python -m pip install cibuildwheel==1.6.0
92126
0 commit comments