Skip to content

Commit f66dc37

Browse files
committed
Use cross-platform C++ setup action
Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
1 parent ad5b077 commit f66dc37

2 files changed

Lines changed: 6 additions & 24 deletions

File tree

cpp/.github/workflows/build.yaml.jinja

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,10 @@ jobs:
5959
with:
6060
version: {% raw %}${{ matrix.python.version }}{% endraw %}
6161

62-
- name: Install dependencies
63-
run: make develop
64-
if: matrix.os != 'windows-latest'
62+
- uses: actions-ext/cpp/setup@51c484ef64088c62434226039d0e3359f5fc8df6
6563

6664
- name: Install dependencies
67-
run: |
68-
for /f "usebackq tokens=*" %%i in (`vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do call "%%i\VC\Auxiliary\Build\vcvars64.bat"
69-
make develop
70-
shell: cmd
71-
if: matrix.os == 'windows-latest'
65+
run: make develop
7266

7367
- name: Lint
7468
run: make lint
@@ -124,13 +118,10 @@ jobs:
124118

125119
- name: Make dist (Windows)
126120
run: |
127-
if exist dist rmdir /s /q dist
128-
for /f "usebackq tokens=*" %%i in (`vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do call "%%i\VC\Auxiliary\Build\vcvars64.bat"
121+
if (Test-Path dist) { Remove-Item dist -Recurse -Force }
129122
make dist-py-wheel
130-
shell: cmd
131123
env:
132124
CIBW_BUILD: {% raw %}"${{ matrix.python.cibuildwheel }}-win_amd64"{% endraw %}
133-
CIBW_BEFORE_ALL: for /f "usebackq tokens=*" %i in (`vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do call "%i\VC\Auxiliary\Build\vcvars64.bat"
134125
if: matrix.os == 'windows-latest'
135126

136127
- uses: actions-ext/python/test-wheel@5f78fa2cadf4dad2a7cded3c72655bcdd3dda735

cppjswasm/.github/workflows/build.yaml.jinja

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,12 @@ jobs:
4747
with:
4848
version: {% raw %}${{ matrix.node-version }}{% endraw %}
4949

50+
- uses: actions-ext/cpp/setup@51c484ef64088c62434226039d0e3359f5fc8df6
51+
5052
- uses: mymindstorm/setup-emsdk@4528d102f7230f0e7b276855c01ea1159be0e984 # v16
5153

5254
- name: Install dependencies
5355
run: make develop
54-
if: matrix.os != 'windows-latest'
55-
56-
- name: Install dependencies
57-
run: |
58-
for /f "usebackq tokens=*" %%i in (`vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do call "%%i\VC\Auxiliary\Build\vcvars64.bat"
59-
make develop
60-
shell: cmd
61-
if: matrix.os == 'windows-latest'
6256

6357
- name: Lint
6458
run: make lint
@@ -114,13 +108,10 @@ jobs:
114108

115109
- name: Make dist (Windows)
116110
run: |
117-
if exist dist rmdir /s /q dist
118-
for /f "usebackq tokens=*" %%i in (`vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do call "%%i\VC\Auxiliary\Build\vcvars64.bat"
111+
if (Test-Path dist) { Remove-Item dist -Recurse -Force }
119112
make dist-py-wheel
120-
shell: cmd
121113
env:
122114
CIBW_BUILD: {% raw %}"${{ matrix.cibuildwheel }}-win_amd64"{% endraw %}
123-
CIBW_BEFORE_ALL: for /f "usebackq tokens=*" %i in (`vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do call "%i\VC\Auxiliary\Build\vcvars64.bat"
124115
if: matrix.os == 'windows-latest'
125116

126117
- uses: actions-ext/python/test-wheel@5f78fa2cadf4dad2a7cded3c72655bcdd3dda735

0 commit comments

Comments
 (0)