Skip to content

Commit e1fc1fc

Browse files
committed
cibuildwheel updates - run-vcpkg action
Attempting to cache vcpkg install artifacts to speed up the Github action build time. A little bit tricky in the case of the cibuildwheel linux target because it builds in the context of a Docker container hosted by the Github 'ubuntu-latest' runner. For now, I'm hoping that the ubuntu-built artifacts "just work" when linked to the manylinux container build artifacts but we will see.
1 parent 0a15475 commit e1fc1fc

File tree

2 files changed

+46
-10
lines changed

2 files changed

+46
-10
lines changed

.github/workflows/build-wheels.yml

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,51 @@ on:
66

77
jobs:
88
build_wheels:
9-
name: Build wheels on ${{ matrix.os }}
9+
name: ${{ matrix.os }}-${{ github.workflow }}
1010
runs-on: ${{ matrix.os }}
1111
strategy:
12+
fail-fast: true
1213
matrix:
13-
os: [ubuntu-20.04, macos-11]
14+
os: [ubuntu-latest, macos-latest]
15+
include:
16+
- os: ubuntu-latest
17+
# tag '2023.04.15'
18+
vcpkgCommitId: '501db0f17ef6df184fcdbfbe0f87cde2313b6ab1'
19+
triplet: 'x64-linux-dynamic'
20+
- os: macos-latest
21+
# tag '2023.04.15'
22+
vcpkgCommitId: '501db0f17ef6df184fcdbfbe0f87cde2313b6ab1'
23+
triplet: 'x64-osx-dynamic'
24+
25+
env:
26+
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
1427

1528
steps:
1629
- uses: actions/checkout@v3
1730

18-
- name: Build wheels
19-
uses: pypa/[email protected]
31+
- name: run vcpkg
32+
uses: lukka/run-vcpkg@main
33+
id: run_vcpkg
2034
with:
21-
package-dir: .
22-
output-dir: wheelhouse
23-
config-file: "{package}/pyproject.toml"
35+
vcpkgDirectory: '{{ runner.workspace }}/b/vcpkg'
36+
vcpkgGitCommitId: '{{ matrix.vcpkgCommitId }}'
37+
runVcpkgInstall: true
38+
vcpkgJsonGlob: '${{ github.workspace }}/build-scripts/vcpkg.json'
2439

25-
- uses: actions/upload-artifact@v3
26-
with:
27-
path: ./wheelhouse/*.whl
40+
- name: List $RUNNER_WORKSPACE before build
41+
run: find $RUNNER_WORKSPACE
42+
shell: bash
43+
44+
- name: Prints output of run-vcpkg action.
45+
run: echo "root='${{ steps.run_vcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.run_vcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}' "
46+
47+
# - name: Build wheels
48+
# uses: pypa/[email protected]
49+
# with:
50+
# package-dir: .
51+
# output-dir: wheelhouse
52+
# config-file: "{package}/pyproject.toml"
53+
54+
# - uses: actions/upload-artifact@v3
55+
# with:
56+
# path: ./wheelhouse/*.whl

build-scripts/vcpkg.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
3+
"dependencies": [
4+
"imath",
5+
"pybind11"
6+
]
7+
}

0 commit comments

Comments
 (0)