20 lines
479 B
Python
20 lines
479 B
Python
|
import subprocess as SP
|
||
|
import os
|
||
|
from datetime import timedelta
|
||
|
from datetime import datetime
|
||
|
|
||
|
dt = timedelta(days=1)
|
||
|
d = datetime.today().date()
|
||
|
|
||
|
while True:
|
||
|
toolchain="nightly-{}".format(d.isoformat())
|
||
|
ret = os.system(
|
||
|
f"rustup default {toolchain}"
|
||
|
)
|
||
|
if ret==0:
|
||
|
os.system("cargo +{} clean".format(toolchain))
|
||
|
if os.system("cargo +{} check".format(toolchain))==0:
|
||
|
print(d)
|
||
|
break
|
||
|
d = d - dt
|