From e21e50224d04ea28f4cea4cc375f0a4eb4488c6a Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Fri, 9 Oct 2020 14:32:20 +0200 Subject: [PATCH 1/2] Test rust-code-analysis-cli on mozilla-central --- .taskcluster.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.taskcluster.yml b/.taskcluster.yml index 7ff5e3673..8175c3ec0 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -53,6 +53,37 @@ tasks: owner: cdenizet@mozilla.com source: ${repository}/raw/${head_rev}/.taskcluster.yml + - taskId: {$eval: as_slugid("test_mozilla_central")} + created: {$fromNow: ''} + deadline: {$fromNow: '1 hour'} + provisionerId: proj-relman + workerType: ci + payload: + maxRunTime: 3600 + image: "rust:buster" + command: + - "/bin/bash" + - "-cx" + - "git clone --recursive --quiet ${repository} && + [ ! -d \"cache/gecko-dev\" ] && + git clone --quiet https://github.com/mozilla/gecko-dev.git /cache/gecko-dev || true && + pushd /cache/gecko-dev && git pull origin master && popd && + mkdir -p /tmp/mozilla_central_output && + cd rust-code-analysis && + git -c advice.detachedHead=false checkout ${head_rev} && + cargo build --release --all --all-features && + cargo run --release -p rust-code-analysis-cli -- -p /cache/gecko-dev \ + -j24 --metrics -O json -o /tmp/mozilla_central_output" + cache: + rust-code-analysis-mozilla-central-repository: /cache + scopes: + - "docker-worker:cache:rust-code-analysis-mozilla-central-repository" + metadata: + name: rust-code-analysis mozilla-central test + description: rust-code-analysis-cli tested on mozilla-central + owner: cdenizet@mozilla.com + source: ${repository}/raw/${head_rev}/.taskcluster.yml + - taskId: {$eval: as_slugid("build_documentation")} created: {$fromNow: ''} deadline: {$fromNow: '2 hour'} From cf1b0eb80c49f7004354993a04bad2f9c93b9058 Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Wed, 11 Nov 2020 18:31:35 +0100 Subject: [PATCH 2/2] Test mozilla-central code only for release events --- .taskcluster.yml | 68 ++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/.taskcluster.yml b/.taskcluster.yml index 8175c3ec0..bbc64b46a 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -53,37 +53,6 @@ tasks: owner: cdenizet@mozilla.com source: ${repository}/raw/${head_rev}/.taskcluster.yml - - taskId: {$eval: as_slugid("test_mozilla_central")} - created: {$fromNow: ''} - deadline: {$fromNow: '1 hour'} - provisionerId: proj-relman - workerType: ci - payload: - maxRunTime: 3600 - image: "rust:buster" - command: - - "/bin/bash" - - "-cx" - - "git clone --recursive --quiet ${repository} && - [ ! -d \"cache/gecko-dev\" ] && - git clone --quiet https://github.com/mozilla/gecko-dev.git /cache/gecko-dev || true && - pushd /cache/gecko-dev && git pull origin master && popd && - mkdir -p /tmp/mozilla_central_output && - cd rust-code-analysis && - git -c advice.detachedHead=false checkout ${head_rev} && - cargo build --release --all --all-features && - cargo run --release -p rust-code-analysis-cli -- -p /cache/gecko-dev \ - -j24 --metrics -O json -o /tmp/mozilla_central_output" - cache: - rust-code-analysis-mozilla-central-repository: /cache - scopes: - - "docker-worker:cache:rust-code-analysis-mozilla-central-repository" - metadata: - name: rust-code-analysis mozilla-central test - description: rust-code-analysis-cli tested on mozilla-central - owner: cdenizet@mozilla.com - source: ${repository}/raw/${head_rev}/.taskcluster.yml - - taskId: {$eval: as_slugid("build_documentation")} created: {$fromNow: ''} deadline: {$fromNow: '2 hour'} @@ -178,6 +147,42 @@ tasks: owner: cdenizet@mozilla.com source: ${repository}/raw/${head_rev}/.taskcluster.yml + - $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"' + then: + taskId: {$eval: as_slugid("test_mozilla_central")} + dependencies: + - {$eval: as_slugid("lint_test_task")} + - {$eval: as_slugid("windows_test_task")} + created: {$fromNow: ''} + deadline: {$fromNow: '1 hour'} + provisionerId: proj-relman + workerType: ci + payload: + maxRunTime: 3600 + image: "rust:buster" + command: + - "/bin/bash" + - "-cx" + - "git clone --recursive --quiet ${repository} && + [ ! -d \"cache/gecko-dev\" ] && + git clone --quiet https://github.com/mozilla/gecko-dev.git /cache/gecko-dev || true && + pushd /cache/gecko-dev && git pull origin master && popd && + mkdir -p /tmp/mozilla_central_output && + cd rust-code-analysis && + git -c advice.detachedHead=false checkout ${head_rev} && + cargo build --release --all --all-features && + cargo run --release -p rust-code-analysis-cli -- -p /cache/gecko-dev \ + -j4 --metrics -O json -o /tmp/mozilla_central_output" + cache: + rust-code-analysis-mozilla-central-repository: /cache + scopes: + - "docker-worker:cache:rust-code-analysis-mozilla-central-repository" + metadata: + name: rust-code-analysis mozilla-central test + description: rust-code-analysis-cli tested on mozilla-central + owner: cdenizet@mozilla.com + source: ${repository}/raw/${head_rev}/.taskcluster.yml + - $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"' then: taskId: {$eval: as_slugid("build_linux_release")} @@ -300,6 +305,7 @@ tasks: dependencies: - {$eval: as_slugid("build_linux_release")} - {$eval: as_slugid("strip_windows_binary")} + - {$eval: as_slugid("test_mozilla_central")} - {$eval: as_slugid("build_documentation")} created: {$fromNow: ''} deadline: {$fromNow: '2 hour'}