Skip to content

Fix Windows x86 CI #360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Mar 24, 2022
Merged

Fix Windows x86 CI #360

merged 12 commits into from
Mar 24, 2022

Conversation

graebm
Copy link
Contributor

@graebm graebm commented Nov 30, 2021

Issue:
Previously, "windows-vs14 (x86)" was just doing an x64 build with the latest Visual Studio

Description of changes:
Now, the 14.0 toolset and Win32 (aka x86) architecture is actually used

Visual Studio 2015 isn't actually available on Github's Windows image but we can pass -T v140 and compile with the "toolset" from Visual Studio 2015.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor Author

@graebm graebm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Github isn't letting me approve this because I originally opened this Pull Request.

But "Fix & Ship"!

# parse extra cmake configs
parser = argparse.ArgumentParser()
parser.add_argument('--cmake-extra', action='append', default=[])
cmd_args = parser.parse_known_args(env.args.args)[0]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLEVER!

@@ -28,6 +34,9 @@ def run(self, env):
f'-H{sample_path}',
f'-DCMAKE_PREFIX_PATH={env.install_dir}',
'-DCMAKE_BUILD_TYPE=RelWithDebInfo'])
# append extra cmake configs
for cmake_step in cmd_args.cmake_extra:
steps[-1].append(cmake_step)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style/trivial: python has the extend() method for gluing lists together. this could be like:

steps[-1].extend(cmd_args.cmake_extra)

@xiazhvera xiazhvera merged commit 43d8d1b into main Mar 24, 2022
@xiazhvera xiazhvera deleted the windows-variants branch March 24, 2022 17:29
@graebm graebm mentioned this pull request Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants