You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows not yet supported by matlab-actions. When it becomes available, to add it, such that at least the minimal-install tests are also run on windows.
Adaptations required
Put directory names in the github xml files such that they are updated for windows/linux (see a next comment)
Add a matrix to the test definition .yml with both ubuntu and windows (see a next comment)
Implement install scripts for windows, and call from trigger_install.py. Can be done gradually, for minimal-install tests very little is needed.
Put directory names in the github xml files such that they are updated for windows/linux
Replace all occurrences of "/home/runner" in the aap_parameters_defaults_Github files with "$HOME"
Add parameter_xml_env_var_replace() to trigger_install.py, and call it in the main() there before do_install()
def parameter_xml_env_var_replace():
"""Platform-indepent replacement of environment variables in the source parameter xml
Path specifications in the parameter xml use environment variable references because
paths are different on the different runner platforms. However, environment variable
references themselves are also platform-dependent.
Replace specific unix-style environment variable references in the parameter xml file
with the value of the environment variable on the current runner platform, to produce
a parameter xml file without env var references."""
var_workspace = os.environ['GITHUB_WORKSPACE']
var_par_xml = os.environ['PARAMETER_XML']
# TODO: check that home is also ok on windows.
var_home = os.environ['HOME']
# Read in the file
fname = os.path.join(var_workspace, '.github', 'workflows', var_par_xml)
with open(fname, 'r') as file :
filedata = file.read()
# Replace $HOME with its value
filedata = filedata.replace('$HOME', var_home)
# Write the file out again
with open(fname, 'w') as file:
file.write(filedata)
Activity
AljenU commentedon Dec 8, 2021
Put directory names in the github xml files such that they are updated for windows/linux
AljenU commentedon Dec 8, 2021
Add a matrix to the test definition .yml with both ubuntu and windows
Also a few other parts needed updating. At least, replace
With