Skip to content

Commit

Permalink
CI: use Ubuntu 22.04 for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
henryborchers committed Oct 9, 2023
1 parent c380131 commit 360f1a0
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions ci/docker/linux/shared/update_conan_compiler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import argparse
import yaml


def get_arg_parser():
parser = argparse.ArgumentParser()
parser.add_argument("settings_file")
parser.add_argument("compiler_name")
parser.add_argument("compiler_version")
return parser


def update_settings_file(settings_file, compiler_name, compiler_version):
with open(settings_file) as file:
data = yaml.safe_load(file)
if compiler_name not in data['compiler']:
raise ValueError(f"invalid compiler name: {compiler_name}")

if compiler_version not in data['compiler'][compiler_name]['version']:
data['compiler'][compiler_name]['version'].append(compiler_version)
print("Compiler data added")
print(data['compiler'][compiler_name]['version'])
with open(settings_file, 'w') as file:
yaml.dump(data, file)

def main():
args = get_arg_parser().parse_args()
print(args)
update_settings_file(
args.settings_file,
args.compiler_name,
args.compiler_version

)

if __name__ == '__main__':
main()

0 comments on commit 360f1a0

Please sign in to comment.