mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Convert python-2.7.15.amd64.msi to a ZIP file, for generic-worker mount
This commit is contained in:
parent
f9038a78df
commit
522445f609
2 changed files with 101 additions and 2 deletions
|
@ -30,6 +30,7 @@ def main():
|
|||
|
||||
ping_on_daily_task_failure = "SimonSapin, nox, emilio"
|
||||
build_artifacts_expiry = "1 week"
|
||||
build_dependencies_artifacts_expiry = "1 month"
|
||||
log_artifacts_expiry = "1 year"
|
||||
|
||||
build_env = {
|
||||
|
@ -96,12 +97,20 @@ def android_arm32():
|
|||
|
||||
|
||||
def windows_dev():
|
||||
python27_task = extract_msi(
|
||||
"https://www.python.org/ftp/python/2.7.15/python-2.7.15.amd64.msi",
|
||||
sha256="5e85f3c4c209de98480acbf2ba2e71a907fd5567a838ad4b6748c76deb286ad7",
|
||||
)
|
||||
return decision.create_task(
|
||||
task_name="Windows x86_64: clone only",
|
||||
task_name="Windows x86_64: clone only (for now)",
|
||||
worker_type="servo-win2016",
|
||||
# script="""
|
||||
# python mach --help
|
||||
# """,
|
||||
script="""
|
||||
dir
|
||||
python -c "import sys; print(sys.path)"
|
||||
""",
|
||||
with_repo=False,
|
||||
mounts=[
|
||||
{
|
||||
"directory": "git",
|
||||
|
@ -112,10 +121,20 @@ def windows_dev():
|
|||
"sha256": "424d24b5fc185a9c5488d7872262464f2facab4f1d4693ea8008196f14a3c19b",
|
||||
}
|
||||
},
|
||||
{
|
||||
"directory": "python2",
|
||||
"format": "tar.gz",
|
||||
"content": {
|
||||
"artifact": "public/extracted.tar.gz",
|
||||
"taskId": python27_task,
|
||||
}
|
||||
},
|
||||
],
|
||||
homedir_path=[
|
||||
"git\\cmd",
|
||||
"python2",
|
||||
],
|
||||
dependencies=[python27_task],
|
||||
**build_kwargs
|
||||
)
|
||||
|
||||
|
@ -238,6 +257,38 @@ def daily_tasks_setup():
|
|||
decision.task_name_template = "Servo daily: %s. On failure, ping: " + ping_on_daily_task_failure
|
||||
|
||||
|
||||
def extract_msi(url, sha256):
|
||||
return decision.find_or_create_task(
|
||||
index_bucket="extract-msi.v4",
|
||||
index_key=sha256,
|
||||
index_expiry=build_dependencies_artifacts_expiry,
|
||||
|
||||
task_name="Extracting MSI file " + url,
|
||||
dockerfile=dockerfile_path("msiextract"),
|
||||
script="""
|
||||
curl --retry 5 --connect-timeout 10 --location --fail "$MSI_URL" -o input.msi
|
||||
echo "$EXPECTED_SHA256 input.msi" | sha256sum --check
|
||||
msiextract input.msi -C output
|
||||
|
||||
# May contains directories with names too long for Windows to even create:
|
||||
# https://gitlab.gnome.org/GNOME/msitools/issues/5
|
||||
rm -rf output/Windows/winsxs
|
||||
|
||||
ls output/
|
||||
tar -czf /extracted.tar.gz -C output .
|
||||
""",
|
||||
env={
|
||||
"MSI_URL": url,
|
||||
"EXPECTED_SHA256": sha256,
|
||||
},
|
||||
artifacts=[
|
||||
"/extracted.tar.gz"
|
||||
],
|
||||
max_run_time_minutes=20,
|
||||
with_repo=False,
|
||||
)
|
||||
|
||||
|
||||
def dockerfile_path(name):
|
||||
return os.path.join(os.path.dirname(__file__), "docker", name + ".dockerfile")
|
||||
|
||||
|
@ -246,6 +297,7 @@ decision = DecisionTask(
|
|||
task_name_template="Servo: %s",
|
||||
index_prefix="project.servo.servo",
|
||||
default_worker_type="servo-docker-worker",
|
||||
docker_image_cache_expiry=build_dependencies_artifacts_expiry,
|
||||
)
|
||||
|
||||
# https://docs.taskcluster.net/docs/reference/workers/docker-worker/docs/caches
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue