Skip to content

Commit 43d8d1b

Browse files
graebmxiazhvera
andauthored
Fix Windows x86 CI (#360)
* Fix Windows x86 CI * Append cmake-extra options to samples Co-authored-by: xiazhvera <[email protected]>
1 parent 3223ce8 commit 43d8d1b

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.builder/actions/build_samples.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Builder
22
import os
33
import sys
4+
import argparse
45

56

67
class BuildSamples(Builder.Action):
@@ -9,6 +10,11 @@ def run(self, env):
910
print('skip_samples is defined. Skipping samples...')
1011
return
1112

13+
# parse extra cmake configs
14+
parser = argparse.ArgumentParser()
15+
parser.add_argument('--cmake-extra', action='append', default=[])
16+
cmd_args = parser.parse_known_args(env.args.args)[0]
17+
1218
steps = []
1319
samples = [
1420
'samples/mqtt/basic_pub_sub',
@@ -28,6 +34,8 @@ def run(self, env):
2834
f'-H{sample_path}',
2935
f'-DCMAKE_PREFIX_PATH={env.install_dir}',
3036
'-DCMAKE_BUILD_TYPE=RelWithDebInfo'])
37+
# append extra cmake configs
38+
steps[-1].extend(cmd_args.cmake_extra)
3139
steps.append(['cmake',
3240
'--build', build_path,
3341
'--config', 'RelWithDebInfo'])

.github/workflows/ci.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,34 +75,28 @@ jobs:
7575
aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
7676
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DUSE_CPU_EXTENSIONS=OFF
7777
78-
windows-vs16:
78+
windows:
7979
runs-on: windows-latest
8080
steps:
8181
- name: Build ${{ env.PACKAGE_NAME }} + consumers
8282
run: |
8383
md D:\a\work
8484
cd D:\a\work
8585
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz', 'builder.pyz')"
86-
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --spec=downstream
86+
python builder.pyz build -p ${{ env.PACKAGE_NAME }}
8787
8888
windows-vs14:
89-
runs-on: windows-latest
89+
runs-on: windows-2019 # windows-2019 is last env with Visual Studio 2015 (v14.0)
9090
strategy:
9191
matrix:
92-
arch: [x86, x64]
92+
arch: [Win32, x64]
9393
steps:
94-
- uses: ilammy/msvc-dev-cmd@v1
95-
with:
96-
toolset: 14.0
97-
arch: ${{ matrix.arch }}
98-
uwp: false
99-
spectre: true
10094
- name: Build ${{ env.PACKAGE_NAME }} + consumers
10195
run: |
10296
md D:\a\work
10397
cd D:\a\work
10498
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
105-
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --spec=downstream
99+
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-Tv140 --cmake-extra=-A${{ matrix.arch }}
106100
107101
windows-no-cpu-extensions:
108102
runs-on: windows-latest

0 commit comments

Comments
 (0)