-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: move compiler compatibility tests to separate workflow (#1390)
* trigger weekly, on release/master branches, and manual dispatch * autocreate compatibility report for platform/toolchain/version combos * check in initial compatibility databases, update DEVELOPER.md * switch awvwgk/setup-fortran -> fortran-lang/setup-fortran * include gcc 13 on windows, bump default gcc to 13 in ci.yml
- Loading branch information
Showing
11 changed files
with
519 additions
and
106 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
""" | ||
Inserts Markdown compatibility tables | ||
between tags in target Markdown file. | ||
""" | ||
|
||
import re | ||
import sys | ||
from pathlib import Path | ||
|
||
name = sys.argv[1] # name of the table, e.g. "compile", "test" | ||
compat_path = Path(sys.argv[2]) # compatibility table path | ||
update_path = Path(sys.argv[3]) # path to file to update | ||
|
||
assert compat_path.is_file() | ||
assert update_path.is_file() | ||
|
||
with open(compat_path, "r") as compat: | ||
table = "".join(compat.readlines()) | ||
r = re.compile( | ||
r"<!\-\- " | ||
+ name | ||
+ r" compat starts \-\->.*<!\-\- " | ||
+ name | ||
+ r" compat ends \-\->", | ||
re.DOTALL, | ||
) | ||
ct = ( | ||
"<!-- " | ||
+ name | ||
+ " compat starts -->{}<!-- ".format("\n{}\n".format(table)) | ||
+ name | ||
+ " compat ends -->" | ||
) | ||
readme = update_path.open().read() | ||
update_path.open("w").write(r.sub(ct, readme)) |
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,39 @@ | ||
""" | ||
Converts compatibility reports from long to wide format | ||
and makes a markdown table from the wide format report. | ||
""" | ||
|
||
from pathlib import Path | ||
import pandas as pd | ||
import sys | ||
|
||
ip = Path(sys.argv[1]) # input file path | ||
op = Path(sys.argv[2]) # output file path | ||
assert ip.is_file() | ||
assert ip.suffix == ".csv" | ||
assert op.suffix == ".csv" | ||
|
||
# read long CSV | ||
df = pd.read_csv(ip) | ||
|
||
# pivot and sort | ||
df = pd.pivot( | ||
df, | ||
index="runner", | ||
columns=["compiler", "version"], | ||
values="support", | ||
).sort_values(by=["runner"]) | ||
|
||
# write wide CSV | ||
df.to_csv(op) | ||
|
||
# write wide markdown table | ||
with open(op.with_suffix(".md"), "w") as file: | ||
file.write( | ||
df.to_markdown() | ||
.replace("nan", "") | ||
.replace("(", "") | ||
.replace(")", "") | ||
.replace(",", "") | ||
.replace("'", "") | ||
) |
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,9 @@ | ||
compiler,gcc,gcc,gcc,gcc,gcc,gcc,gcc,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel | ||
version,10,11,12,13,7,8,9,2021.1,2021.10,2021.2,2021.3,2021.4,2021.5,2021.6,2021.7,2021.8,2021.9,2021.1,2021.2,2021.4,2022.0,2022.1,2022.2.1,2022.2,2023.0,2023.1,2023.2 | ||
runner,,,,,,,,,,,,,,,,,,,,,,,,,,, | ||
macos-11,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,, | ||
macos-12,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,, | ||
ubuntu-20.04,✓,✓,,,✓,✓,✓,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? | ||
ubuntu-22.04,✓,✓,✓,✓,,,✓,,✓,,,,,✓,✓,✓,✓,,,,,,✓,✓,,,✓ | ||
windows-2019,✓,✓,✓,✓,,,✓,,✓,,,,,,✓,✓,✓,,,,,,,✓,,,✓ | ||
windows-2022,✓,✓,✓,✓,,,✓,,✓,,,,,✓,✓,✓,✓,,,,,,,✓,,,✓ |
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,9 @@ | ||
compiler,gcc,gcc,gcc,gcc,gcc,gcc,gcc,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel | ||
version,10,11,12,13,7,8,9,2021.1,2021.10,2021.2,2021.3,2021.4,2021.5,2021.6,2021.7,2021.8,2021.9,2021.1,2021.2,2021.4,2022.0,2022.1,2022.2.1,2022.2,2023.0,2023.1,2023.2 | ||
runner,,,,,,,,,,,,,,,,,,,,,,,,,,, | ||
macos-11,✓,✓,✓,✓,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,,,,,,,,,,,, | ||
macos-12,✓,✓,✓,✓,,,,✓,,✓,✓,✓,✓,✓,✓,,,,,,,,,,,, | ||
ubuntu-20.04,✓,✓,,,✓,✓,✓,,,,,,,,,,,,,,,,,,,, | ||
ubuntu-22.04,✓,✓,✓,✓,,,✓,,,,,,,✓,✓,,,,,,,,,,,, | ||
windows-2019,✓,✓,✓,✓,,,,,,,,,,,✓,,,,,,,,,,,, | ||
windows-2022,✓,✓,✓,✓,,,✓,,,,,,,✓,✓,,,,,,,,,,,, |
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
Oops, something went wrong.