Skip to content

Commit b45f4c8

Browse files
committed
fixed mathsat5 and smtrat, stop workflow if no asset is found
1 parent 2dc443f commit b45f4c8

File tree

8 files changed

+41
-10
lines changed

8 files changed

+41
-10
lines changed

cvc5-latest/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ def main():
3333

3434
if not matching_asset:
3535
print("No matching asset found.")
36-
return
36+
print("Available assets:")
37+
for asset in latest_release['assets']:
38+
print(f" - {asset['name']}")
39+
exit(1)
3740

3841
latest_version = latest_release['tag_name']
3942
current_version = read_version(repo)

mathsat5-latest/main.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,15 @@ def fetch_mathsat_binary():
2525

2626
soup = BeautifulSoup(response.text, 'html.parser')
2727

28-
link = soup.find('a', href=re.compile(r'download\.php\?file=mathsat-\d+\.\d+\.\d+-linux-x86_64\.tar\.gz'))
28+
# Debug: print all links to see what's available
29+
print("Available links on MathSAT download page:")
30+
for link in soup.find_all('a', href=True):
31+
href = link['href']
32+
if 'mathsat' in href.lower() or 'download' in href.lower():
33+
print(f" - {href}")
34+
35+
# Look for the new direct release URL format
36+
link = soup.find('a', href=re.compile(r'/release/mathsat-\d+\.\d+\.\d+-linux-x86_64\.tar\.gz'))
2937

3038
if not link:
3139
print("No matching MathSAT binary found.")
@@ -38,7 +46,7 @@ def fetch_mathsat_binary():
3846
return False, None, None
3947

4048
version = match.group(1)
41-
download_url = f"https://mathsat.fbk.eu/{href}"
49+
download_url = f"https://mathsat.fbk.eu{href}"
4250

4351
return True, version, download_url
4452

@@ -72,6 +80,8 @@ def main():
7280
generate_tests(theory, NUM_TESTS)
7381
else:
7482
print("Failed to download MathSAT binary.")
83+
print("This might be due to changes in the download page structure.")
84+
exit(1)
7585

7686
if __name__ == '__main__':
7787
main()

opensmt2-latest/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ def main():
2929

3030
if not matching_asset:
3131
print("No matching asset found.")
32-
return
32+
print("Available assets:")
33+
for asset in latest_release['assets']:
34+
print(f" - {asset['name']}")
35+
exit(1)
3336

3437
latest_version = latest_release['tag_name']
3538
current_version = read_version(solver_name)

ostrich-latest/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ def main():
2626

2727
if not matching_asset:
2828
print("No matching asset found.")
29-
return
29+
print("Available assets:")
30+
for asset in latest_release['assets']:
31+
print(f" - {asset['name']}")
32+
exit(1)
3033

3134
latest_version = latest_release['tag_name']
3235
current_version = read_version(repo)

smtrat-latest/main.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
def main():
1818
owner = 'ths-rwth'
1919
repo = 'smtrat'
20-
pattern = re.compile(r'smtrat\.tgz')
20+
pattern = re.compile(r'smtrat-static\.tar\.gz')
2121
path_to_solver_binary = "./smtrat-static"
2222
NUM_TESTS = int(os.getenv("NUM_TESTS", 100))
2323
latest_release = get_latest_release(owner, repo)
@@ -30,7 +30,10 @@ def main():
3030

3131
if not matching_asset:
3232
print("No matching asset found.")
33-
return
33+
print("Available assets:")
34+
for asset in latest_release['assets']:
35+
print(f" - {asset['name']}")
36+
exit(1)
3437

3538
latest_version = latest_release['tag_name']
3639
current_version = read_version(repo)

stp-latest/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ def main():
2727

2828
if not matching_asset:
2929
print("No matching asset found.")
30-
return
30+
print("Available assets:")
31+
for asset in latest_release['assets']:
32+
print(f" - {asset['name']}")
33+
exit(1)
3134

3235
latest_version = latest_release['tag_name']
3336
current_version = read_version(repo)

yices2-latest/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ def main():
3131

3232
if not matching_asset:
3333
print("No matching asset found.")
34-
return
34+
print("Available assets:")
35+
for asset in latest_release['assets']:
36+
print(f" - {asset['name']}")
37+
exit(1)
3538

3639
latest_version = latest_release['tag_name']
3740
current_version = read_version(repo)

z3-latest/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ def main():
3333

3434
if not matching_asset:
3535
print("No matching asset found.")
36-
return
36+
print("Available assets:")
37+
for asset in latest_release['assets']:
38+
print(f" - {asset['name']}")
39+
exit(1)
3740

3841
latest_version = latest_release['tag_name']
3942
current_version = read_version(repo)

0 commit comments

Comments
 (0)