From 168d30c23e59375defa3cc3419ccd80227fee7ce Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 20 Sep 2018 17:02:40 +0200 Subject: [PATCH] WPT --- decision-task.py | 88 +++++++++++++++++++++++++++++++++++-- run-x86_64-linux.dockerfile | 14 ++++++ 2 files changed, 98 insertions(+), 4 deletions(-) create mode 100644 run-x86_64-linux.dockerfile diff --git a/decision-task.py b/decision-task.py index c794933e96f..ac6c66ca3ff 100644 --- a/decision-task.py +++ b/decision-task.py @@ -15,6 +15,7 @@ def main(): route_prefix="project.servo.servo", worker_type="servo-docker-worker", ) + create_task = decision.create_task_with_in_tree_dockerfile # FIXME: remove this before merging in servo/servo os.environ["GIT_URL"] = "https://github.com/SimonSapin/servo" @@ -35,6 +36,7 @@ def main(): "cargo-rustup": "/root/.rustup", "cargo-sccache": "/root/.cache/sccache", } + build_artifacts_expiry = "1 week" build_env = { "RUST_BACKTRACE": "1", "RUSTFLAGS": "-Dwarnings", @@ -45,13 +47,17 @@ def main(): } build_kwargs = { "max_run_time_minutes": 60, - "dockerfile": dockerfile("build-x86_64-linux"), + "dockerfile": "build-x86_64-linux.dockerfile", "env": build_env, "scopes": cache_scopes, "cache": build_caches, } + run_kwargs = { + "max_run_time_minutes": 60, + "dockerfile": "run-x86_64-linux.dockerfile", + } - decision.create_task_with_in_tree_dockerfile( + create_task( task_name="Linux x86_64: tidy + dev build + unit tests", script=""" ./mach test-tidy --no-progress --all @@ -66,9 +72,83 @@ def main(): **build_kwargs ) -def dockerfile(name): - return os.path.join(os.path.dirname(__file__), name + ".dockerfile") + release_build_task = create_task( + task_name="Linux x86_64: release build", + script=""" + ./mach build --release --with-debug-assertions -p servo + ./etc/ci/lockfile_changed.sh + gzip target/release/servo + """, + artifacts=[ + ("/repo/target/release/servo.gz", build_artifacts_expiry), + ], + **build_kwargs + ) + + fetch_build = """ + mkdir -p target/release + curl \ + "https://queue.taskcluster.net/v1/task/${BUILD_TASK_ID}/artifacts/public/servo.gz" \ + --retry 5 \ + --connect-timeout 10 \ + --location \ + | gunzip > target/release/servo + """ + + total_chunks = 4 + for i in range(total_chunks): + chunk = i + 1 + create_task( + task_name="Linux x86_64: WPT chunk %s / %s" % (chunk, total_chunks), + script=fetch_build + """ + mkdir -p target/release + curl \ + "https://queue.taskcluster.net/v1/task/${BUILD_TASK_ID}/artifacts/public/servo.gz" \ + --retry 5 \ + --connect-timeout 10 \ + --location \ + | gunzip > target/release/servo + + ./mach test-wpt-failure + ./mach test-wpt \ + --release \ + --processes 24 \ + --total-chunks "$TOTAL_CHUNKS" \ + --this-chunk "$THIS_CHUNK" \ + --log-raw test-wpt.log \ + --log-errorsummary wpt-errorsummary.log \ + --always-succeed + ./mach filter-intermittents\ + wpt-errorsummary.log \ + --log-intermittents intermittents.log \ + --log-filteredsummary filtered-wpt-errorsummary.log \ + --tracker-api default \ + --reporter-api default + """, + env={ + "TOTAL_CHUNKS": total_chunks, + "THIS_CHUNK": chunk, + "BUILD_TASK_ID": release_build_task, + }, + **run_kwargs + ) + + create_task( + task_name="Linux x86_64: WPT extra", + script=fetch_build + """ + ./mach test-wpt-failure + ./mach test-wpt --release --binary-arg=--multiprocess --processes 24 \ + --log-raw test-wpt-mp.log \ + --log-errorsummary wpt-mp-errorsummary.log \ + eventsource + """, + env={ + "BUILD_TASK_ID": release_build_task, + }, + **run_kwargs + ) if __name__ == "__main__": + os.chdir(os.path.join(".", os.path.dirname(__file__))) main() diff --git a/run-x86_64-linux.dockerfile b/run-x86_64-linux.dockerfile new file mode 100644 index 00000000000..814d018497c --- /dev/null +++ b/run-x86_64-linux.dockerfile @@ -0,0 +1,14 @@ +FROM ubuntu:bionic-20180821 + +RUN \ + apt-get update -q && \ + apt-get install -qy --no-install-recommends \ + # + # Cloning the repository + git \ + ca-certificates \ + # + # Running mach + python2.7 \ + python-virtualenv \ + virtualenv