-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trying to let the Windows runners find MSVC
Signed-off-by: Scott Wilson <[email protected]>
- Loading branch information
1 parent
4006f88
commit d7afb2b
Showing
7 changed files
with
45 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import argparse | ||
import subprocess | ||
import sys | ||
|
||
_PACKAGE_NAME_OVERRIDE = {"ninja": {"linux": "ninja-build"}} | ||
|
||
|
||
def main(package: str): | ||
package = _PACKAGE_NAME_OVERRIDE.get(package, {}).get(sys.platform, package) | ||
|
||
if sys.platform == "linux": | ||
subprocess.run(["sudo", "apt-get", "install", package], shell=True, check=True) | ||
elif sys.platform == "win32": | ||
subprocess.run(["choco", "install", package], shell=True, check=True) | ||
elif sys.platform == "darwin": | ||
subprocess.run(["brew", "install", package], shell=True, check=True) | ||
else: | ||
raise NotImplementedError(f"{sys.platform!r} is not supported") | ||
|
||
|
||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument("package") | ||
args = parser.parse_args() | ||
|
||
main(args.package) |