2019-07-17 19:05:07 +03:00
|
|
|
version: 1
|
|
|
|
policy:
|
|
|
|
pullRequests: public
|
|
|
|
tasks:
|
|
|
|
$let:
|
|
|
|
user: ${event.sender.login}
|
|
|
|
|
|
|
|
head_branch:
|
|
|
|
$if: 'tasks_for == "github-pull-request"'
|
|
|
|
then: ${event.pull_request.head.ref}
|
|
|
|
else:
|
|
|
|
$if: 'tasks_for == "github-push"'
|
|
|
|
then: ${event.ref}
|
|
|
|
else: ${event.release.target_commitish}
|
|
|
|
|
|
|
|
head_rev:
|
|
|
|
$if: 'tasks_for == "github-pull-request"'
|
|
|
|
then: ${event.pull_request.head.sha}
|
|
|
|
else:
|
|
|
|
$if: 'tasks_for == "github-push"'
|
|
|
|
then: ${event.after}
|
|
|
|
else: ${event.release.tag_name}
|
|
|
|
|
|
|
|
repository:
|
|
|
|
$if: 'tasks_for == "github-pull-request"'
|
|
|
|
then: ${event.pull_request.head.repo.html_url}
|
|
|
|
else: ${event.repository.html_url}
|
2023-01-13 12:17:06 +03:00
|
|
|
|
2024-08-06 16:32:03 +03:00
|
|
|
taskboot_image: "mozilla/taskboot:0.4.3"
|
2019-07-17 19:05:07 +03:00
|
|
|
in:
|
2020-04-07 19:41:19 +03:00
|
|
|
$if: 'tasks_for == "github-push" || (tasks_for == "github-pull-request" && event["action"] in ["opened", "reopened", "synchronize"])'
|
2019-07-17 19:05:07 +03:00
|
|
|
then:
|
|
|
|
- taskId: {$eval: as_slugid("lint_test_task")}
|
|
|
|
created: {$fromNow: ''}
|
|
|
|
deadline: {$fromNow: '1 hour'}
|
2019-11-05 20:50:33 +03:00
|
|
|
provisionerId: proj-relman
|
|
|
|
workerType: ci
|
2019-07-17 19:05:07 +03:00
|
|
|
payload:
|
|
|
|
maxRunTime: 3600
|
2024-08-06 18:00:53 +03:00
|
|
|
image: "rust:bookworm"
|
2019-07-17 19:05:07 +03:00
|
|
|
command:
|
|
|
|
- "/bin/bash"
|
2019-08-05 15:28:08 +03:00
|
|
|
- "-cx"
|
2024-08-06 18:00:53 +03:00
|
|
|
- "apt update && apt install -y python3-full &&
|
2020-06-26 16:51:12 +03:00
|
|
|
rustup component add clippy rustfmt &&
|
2021-12-22 12:24:55 +03:00
|
|
|
rustup toolchain install nightly &&
|
2022-12-12 22:06:22 +03:00
|
|
|
curl -L https://github.com/est31/cargo-udeps/releases/download/v0.1.35/cargo-udeps-v0.1.35-x86_64-unknown-linux-gnu.tar.gz | tar xz -C /usr/local/cargo/bin --strip-components 2 &&
|
2021-12-22 12:01:46 +03:00
|
|
|
curl -L https://github.com/rustsec/rustsec/releases/download/cargo-audit%2Fv0.16.0/cargo-audit-x86_64-unknown-linux-musl-v0.16.0.tgz | tar xzv -C /usr/local/cargo/bin --strip-components 1 &&
|
2021-03-31 11:10:04 +03:00
|
|
|
git clone --quiet ${repository} &&
|
2019-07-17 19:05:07 +03:00
|
|
|
cd rust-code-analysis &&
|
2021-03-31 11:10:04 +03:00
|
|
|
git -c advice.detachedHead=false checkout ${head_rev} &&
|
2022-12-19 17:27:52 +03:00
|
|
|
git submodule update --init &&
|
2024-08-06 18:00:53 +03:00
|
|
|
python3 -m venv myenv &&
|
|
|
|
. myenv/bin/activate &&
|
2019-07-17 19:05:07 +03:00
|
|
|
pip3 install --quiet pre-commit &&
|
2020-02-26 17:03:52 +03:00
|
|
|
pre-commit run -a --show-diff-on-failure &&
|
2021-12-22 12:01:46 +03:00
|
|
|
pre-commit run --show-diff-on-failure -c .pre-commit-audit-config.yaml &&
|
2023-04-08 12:57:55 +03:00
|
|
|
cargo test --workspace --verbose --all-features --no-fail-fast -- --nocapture &&
|
2021-02-08 18:29:49 +03:00
|
|
|
cd enums &&
|
|
|
|
cargo build --verbose --all-features"
|
2019-07-17 19:05:07 +03:00
|
|
|
metadata:
|
|
|
|
name: rust-code-analysis lint and test
|
|
|
|
description: rust-code-analysis lint and test
|
2019-10-01 14:32:23 +03:00
|
|
|
owner: cdenizet@mozilla.com
|
2020-04-03 20:04:34 +03:00
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
|
|
|
|
2020-06-22 17:12:39 +03:00
|
|
|
- taskId: {$eval: as_slugid("build_documentation")}
|
|
|
|
created: {$fromNow: ''}
|
|
|
|
deadline: {$fromNow: '2 hour'}
|
|
|
|
provisionerId: proj-relman
|
|
|
|
workerType: ci
|
|
|
|
payload:
|
|
|
|
maxRunTime: 3600
|
2024-08-06 18:00:53 +03:00
|
|
|
image: "rust:bookworm"
|
2020-06-22 17:12:39 +03:00
|
|
|
command:
|
|
|
|
- "/bin/bash"
|
|
|
|
- "-cx"
|
2021-03-31 11:10:04 +03:00
|
|
|
- "git clone --quiet ${repository} &&
|
2020-06-22 17:12:39 +03:00
|
|
|
cd rust-code-analysis &&
|
2021-03-31 11:10:04 +03:00
|
|
|
git -c advice.detachedHead=false checkout ${head_rev} &&
|
2021-09-16 11:55:05 +03:00
|
|
|
cargo install mdbook --no-default-features --features output --vers \"^0.1.0\" &&
|
2020-06-22 17:12:39 +03:00
|
|
|
cargo doc --release &&
|
|
|
|
cd rust-code-analysis-book &&
|
|
|
|
mdbook build &&
|
|
|
|
tar -zvcf /book.tar.gz book/"
|
|
|
|
artifacts:
|
|
|
|
public/book.tar.gz:
|
|
|
|
expires: {$fromNow: '2 weeks'}
|
|
|
|
path: /book.tar.gz
|
|
|
|
type: file
|
|
|
|
metadata:
|
|
|
|
name: rust-code-analysis documentation
|
|
|
|
description: rust-code-analysis build documentation
|
|
|
|
owner: cdenizet@mozilla.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
|
|
|
|
2020-05-11 17:27:55 +03:00
|
|
|
- taskId: {$eval: as_slugid("ccov_test_task")}
|
2020-04-03 20:04:34 +03:00
|
|
|
created: {$fromNow: ''}
|
|
|
|
deadline: {$fromNow: '1 hour'}
|
|
|
|
provisionerId: proj-relman
|
|
|
|
workerType: ci
|
|
|
|
payload:
|
|
|
|
maxRunTime: 3600
|
2024-08-06 18:00:53 +03:00
|
|
|
image: "rust:bookworm"
|
2020-04-03 20:04:34 +03:00
|
|
|
env:
|
|
|
|
CODECOV_TOKEN: 4df01912-087e-489a-be28-25aa911cb9d2
|
2023-01-29 18:12:15 +03:00
|
|
|
CARGO_INCREMENTAL: "0"
|
2022-07-04 16:01:43 +03:00
|
|
|
RUSTFLAGS: -Cinstrument-coverage -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off
|
|
|
|
RUSTDOCFLAGS: -Cinstrument-coverage -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off
|
|
|
|
LLVM_PROFILE_FILE: rust-code-analysis-%p-%m.profraw
|
2020-04-03 20:04:34 +03:00
|
|
|
command:
|
|
|
|
- "/bin/bash"
|
|
|
|
- "-cx"
|
|
|
|
- "apt-get -qq update &&
|
|
|
|
apt-get -qq install -y zip &&
|
2022-02-10 19:04:30 +03:00
|
|
|
curl -L https://github.com/mozilla/grcov/releases/download/v0.8.6/grcov-v0.8.6-x86_64-unknown-linux-gnu.tar.gz | tar xz &&
|
2022-07-04 16:01:43 +03:00
|
|
|
rustup component add llvm-tools-preview &&
|
2021-03-31 11:10:04 +03:00
|
|
|
git clone --quiet ${repository} &&
|
2020-04-03 20:04:34 +03:00
|
|
|
cd rust-code-analysis &&
|
2021-03-31 11:10:04 +03:00
|
|
|
git -c advice.detachedHead=false checkout ${head_rev} &&
|
2022-12-19 17:27:52 +03:00
|
|
|
git submodule update --init &&
|
2022-07-04 16:01:43 +03:00
|
|
|
cargo test --workspace --verbose --all-features --target x86_64-unknown-linux-gnu &&
|
|
|
|
../grcov . --binary-path ./target/ -s . -t lcov --llvm --branch --ignore-not-existing --ignore '/*' -o lcov.info &&
|
2020-04-03 20:04:34 +03:00
|
|
|
bash <(curl -s https://codecov.io/bash) -f lcov.info"
|
|
|
|
metadata:
|
|
|
|
name: rust-code-analysis grcov test
|
|
|
|
description: rust-code-analysis grcov test
|
|
|
|
owner: cdenizet@mozilla.com
|
2019-07-17 19:05:07 +03:00
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
2019-12-19 17:02:45 +03:00
|
|
|
|
2020-03-30 12:37:59 +03:00
|
|
|
- taskId: {$eval: as_slugid("windows_test_task")}
|
|
|
|
created: {$fromNow: ''}
|
|
|
|
deadline: {$fromNow: '1 hour'}
|
|
|
|
provisionerId: proj-relman
|
2023-05-25 01:08:19 +03:00
|
|
|
workerType: win2022
|
2020-03-30 12:37:59 +03:00
|
|
|
payload:
|
|
|
|
maxRunTime: 3600
|
|
|
|
command:
|
2020-05-06 13:51:19 +03:00
|
|
|
- set VSWHERE=%programfiles(x86)%\Microsoft Visual Studio\Installer
|
|
|
|
- set VS_BINS=VC\Tools\MSVC\*\bin\Hostx64\x64
|
2020-03-30 12:37:59 +03:00
|
|
|
- set RUSTUP_INIT_PATH=%CD%\rustup-init
|
2020-05-06 13:51:19 +03:00
|
|
|
- set CARGO_PATH=%USERPROFILE%\.cargo\bin
|
|
|
|
- set PATH=%RUSTUP_INIT_PATH%;%CARGO_PATH%;%VSWHERE%;%PATH%
|
|
|
|
- set VSWHERE_CMD=vswhere -latest -products * -find %VS_BINS%
|
|
|
|
- FOR /F "tokens=*" %%o IN ('%VSWHERE_CMD%') do (SET LIB_PATH=%%o)
|
|
|
|
- set PATH=%LIB_PATH%;%PATH%
|
2020-03-30 12:37:59 +03:00
|
|
|
- rustup-init -yv --default-toolchain stable ^
|
|
|
|
--default-host x86_64-pc-windows-msvc
|
2023-01-13 02:00:34 +03:00
|
|
|
- git config --global core.autocrlf input
|
2021-03-31 11:10:04 +03:00
|
|
|
- git clone --quiet ${repository}
|
2020-03-30 12:37:59 +03:00
|
|
|
- cd rust-code-analysis
|
2021-03-31 11:10:04 +03:00
|
|
|
- git -c advice.detachedHead=false checkout ${head_rev}
|
2022-12-19 17:27:52 +03:00
|
|
|
- git submodule update --init
|
2023-04-08 12:57:55 +03:00
|
|
|
- cargo test --workspace --verbose --all-features --no-fail-fast -- --nocapture
|
2020-03-30 12:37:59 +03:00
|
|
|
mounts:
|
|
|
|
- content:
|
|
|
|
url: https://win.rustup.rs/
|
|
|
|
file: rustup-init\rustup-init.exe
|
|
|
|
metadata:
|
|
|
|
name: rust-code-analysis windows test
|
|
|
|
description: rust-code-analysis windows test
|
|
|
|
owner: cdenizet@mozilla.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
|
|
|
|
2022-12-19 17:29:05 +03:00
|
|
|
- taskId: {$eval: as_slugid("check_tree_sitter_mozcpp")}
|
2021-03-09 19:24:37 +03:00
|
|
|
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"
|
2021-03-31 11:10:04 +03:00
|
|
|
- "git clone --quiet ${repository} &&
|
2021-03-09 19:24:37 +03:00
|
|
|
cd rust-code-analysis &&
|
2021-03-31 11:10:04 +03:00
|
|
|
git -c advice.detachedHead=false checkout ${head_rev} &&
|
2022-12-19 17:29:05 +03:00
|
|
|
./check-grammars-crates.sh tree-sitter-mozcpp"
|
2021-03-09 19:24:37 +03:00
|
|
|
cache:
|
|
|
|
rust-code-analysis-mozilla-central-repository: /cache
|
|
|
|
artifacts:
|
2022-12-19 17:29:05 +03:00
|
|
|
public/json-diffs-and-minimal-tests-mozcpp.tar.gz:
|
2021-03-09 19:24:37 +03:00
|
|
|
expires: {$fromNow: '2 weeks'}
|
2022-12-19 17:29:05 +03:00
|
|
|
path: /tmp/json-diffs-and-minimal-tests-mozcpp.tar.gz
|
2021-03-09 19:24:37 +03:00
|
|
|
type: file
|
|
|
|
scopes:
|
|
|
|
- "docker-worker:cache:rust-code-analysis-mozilla-central-repository"
|
|
|
|
metadata:
|
2022-12-19 17:29:05 +03:00
|
|
|
name: rust-code-analysis check tree-sitter-mozcpp
|
|
|
|
description: rust-code-analysis check tree-sitter-mozcpp grammar
|
|
|
|
owner: cdenizet@mozilla.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
|
|
|
|
|
|
|
- taskId: {$eval: as_slugid("check_tree_sitter_mozjs")}
|
|
|
|
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 --quiet ${repository} &&
|
|
|
|
cd rust-code-analysis &&
|
|
|
|
git -c advice.detachedHead=false checkout ${head_rev} &&
|
|
|
|
./check-grammars-crates.sh tree-sitter-mozjs"
|
|
|
|
cache:
|
|
|
|
rust-code-analysis-mozilla-central-repository: /cache
|
|
|
|
artifacts:
|
|
|
|
public/json-diffs-and-minimal-tests-mozjs.tar.gz:
|
|
|
|
expires: {$fromNow: '2 weeks'}
|
|
|
|
path: /tmp/json-diffs-and-minimal-tests-mozjs.tar.gz
|
|
|
|
type: file
|
|
|
|
scopes:
|
|
|
|
- "docker-worker:cache:rust-code-analysis-mozilla-central-repository"
|
|
|
|
metadata:
|
|
|
|
name: rust-code-analysis check tree-sitter-mozjs
|
|
|
|
description: rust-code-analysis check tree-sitter-mozjs grammar
|
|
|
|
owner: cdenizet@mozilla.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
|
|
|
|
|
|
|
- taskId: {$eval: as_slugid("check_tree_sitter_rust")}
|
|
|
|
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 --quiet ${repository} &&
|
|
|
|
cd rust-code-analysis &&
|
|
|
|
git -c advice.detachedHead=false checkout ${head_rev} &&
|
|
|
|
./check-grammars-crates.sh tree-sitter-rust"
|
|
|
|
cache:
|
|
|
|
rust-code-analysis-mozilla-central-repository: /cache
|
|
|
|
artifacts:
|
|
|
|
public/json-diffs-and-minimal-tests-rust.tar.gz:
|
|
|
|
expires: {$fromNow: '2 weeks'}
|
|
|
|
path: /tmp/json-diffs-and-minimal-tests-rust.tar.gz
|
|
|
|
type: file
|
|
|
|
scopes:
|
|
|
|
- "docker-worker:cache:rust-code-analysis-mozilla-central-repository"
|
|
|
|
metadata:
|
|
|
|
name: rust-code-analysis check tree-sitter-rust
|
|
|
|
description: rust-code-analysis check tree-sitter-rust grammar
|
|
|
|
owner: cdenizet@mozilla.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
|
|
|
|
|
|
|
- taskId: {$eval: as_slugid("check_tree_sitter_java")}
|
|
|
|
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 --quiet ${repository} &&
|
|
|
|
cd rust-code-analysis &&
|
|
|
|
git -c advice.detachedHead=false checkout ${head_rev} &&
|
|
|
|
./check-grammars-crates.sh tree-sitter-java"
|
|
|
|
cache:
|
|
|
|
rust-code-analysis-mozilla-central-repository: /cache
|
|
|
|
artifacts:
|
|
|
|
public/json-diffs-and-minimal-tests-java.tar.gz:
|
|
|
|
expires: {$fromNow: '2 weeks'}
|
|
|
|
path: /tmp/json-diffs-and-minimal-tests-java.tar.gz
|
|
|
|
type: file
|
|
|
|
scopes:
|
|
|
|
- "docker-worker:cache:rust-code-analysis-mozilla-central-repository"
|
|
|
|
metadata:
|
|
|
|
name: rust-code-analysis check tree-sitter-java
|
|
|
|
description: rust-code-analysis check tree-sitter-java grammar
|
|
|
|
owner: cdenizet@mozilla.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
|
|
|
|
2023-01-16 14:23:56 +03:00
|
|
|
- taskId: {$eval: as_slugid("check_tree_sitter_kotlin")}
|
|
|
|
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 --quiet ${repository} &&
|
|
|
|
cd rust-code-analysis &&
|
|
|
|
git -c advice.detachedHead=false checkout ${head_rev} &&
|
|
|
|
./check-grammars-crates.sh tree-sitter-kotlin"
|
|
|
|
cache:
|
|
|
|
rust-code-analysis-mozilla-central-repository: /cache
|
|
|
|
artifacts:
|
|
|
|
public/json-diffs-and-minimal-tests-kotlin.tar.gz:
|
|
|
|
expires: {$fromNow: '2 weeks'}
|
|
|
|
path: /tmp/json-diffs-and-minimal-tests-kotlin.tar.gz
|
|
|
|
type: file
|
|
|
|
scopes:
|
|
|
|
- "docker-worker:cache:rust-code-analysis-mozilla-central-repository"
|
|
|
|
metadata:
|
|
|
|
name: rust-code-analysis check tree-sitter-kotlin
|
|
|
|
description: rust-code-analysis check tree-sitter-kotlin grammar
|
|
|
|
owner: cdenizet@mozilla.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
|
|
|
|
2022-12-19 17:29:05 +03:00
|
|
|
- taskId: {$eval: as_slugid("check_tree_sitter_python")}
|
|
|
|
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 --quiet ${repository} &&
|
|
|
|
cd rust-code-analysis &&
|
|
|
|
git -c advice.detachedHead=false checkout ${head_rev} &&
|
|
|
|
./check-grammars-crates.sh tree-sitter-python"
|
|
|
|
cache:
|
|
|
|
rust-code-analysis-mozilla-central-repository: /cache
|
|
|
|
artifacts:
|
|
|
|
public/json-diffs-and-minimal-tests-python.tar.gz:
|
|
|
|
expires: {$fromNow: '2 weeks'}
|
|
|
|
path: /tmp/json-diffs-and-minimal-tests-python.tar.gz
|
|
|
|
type: file
|
|
|
|
scopes:
|
|
|
|
- "docker-worker:cache:rust-code-analysis-mozilla-central-repository"
|
|
|
|
metadata:
|
|
|
|
name: rust-code-analysis check tree-sitter-python
|
|
|
|
description: rust-code-analysis check tree-sitter-python grammar
|
|
|
|
owner: cdenizet@mozilla.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
|
|
|
|
|
|
|
- taskId: {$eval: as_slugid("check_tree_sitter_typescript")}
|
|
|
|
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 --quiet ${repository} &&
|
|
|
|
cd rust-code-analysis &&
|
|
|
|
git -c advice.detachedHead=false checkout ${head_rev} &&
|
|
|
|
./check-grammars-crates.sh tree-sitter-typescript"
|
|
|
|
cache:
|
|
|
|
rust-code-analysis-mozilla-central-repository: /cache
|
|
|
|
artifacts:
|
|
|
|
public/json-diffs-and-minimal-tests-typescript.tar.gz:
|
|
|
|
expires: {$fromNow: '2 weeks'}
|
|
|
|
path: /tmp/json-diffs-and-minimal-tests-typescript.tar.gz
|
|
|
|
type: file
|
|
|
|
scopes:
|
|
|
|
- "docker-worker:cache:rust-code-analysis-mozilla-central-repository"
|
|
|
|
metadata:
|
|
|
|
name: rust-code-analysis check tree-sitter-typescript
|
|
|
|
description: rust-code-analysis check tree-sitter-typescript grammar
|
2021-03-09 19:24:37 +03:00
|
|
|
owner: cdenizet@mozilla.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
|
|
|
|
2020-11-12 01:34:15 +03:00
|
|
|
- $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"
|
2021-03-31 11:10:04 +03:00
|
|
|
- "git clone --quiet ${repository} &&
|
2021-01-13 13:29:13 +03:00
|
|
|
[ ! -d \"/cache/gecko-dev\" ] &&
|
2020-11-12 01:34:15 +03:00
|
|
|
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 &&
|
2021-03-31 11:10:04 +03:00
|
|
|
git -c advice.detachedHead=false checkout ${head_rev} &&
|
2021-01-13 15:15:04 +03:00
|
|
|
cargo build --release --workspace --all-features &&
|
2020-11-12 01:34:15 +03:00
|
|
|
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
|
|
|
|
|
2022-01-14 14:50:51 +03:00
|
|
|
- $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
|
|
|
|
then:
|
|
|
|
taskId: {$eval: as_slugid("publish_crates")}
|
|
|
|
dependencies:
|
|
|
|
- {$eval: as_slugid("test_mozilla_central")}
|
|
|
|
- {$eval: as_slugid("build_documentation")}
|
|
|
|
created: {$fromNow: ''}
|
|
|
|
deadline: {$fromNow: '2 hour'}
|
|
|
|
provisionerId: proj-relman
|
|
|
|
workerType: ci
|
|
|
|
scopes:
|
|
|
|
- secrets:get:project/relman/rust-code-analysis/deploy
|
|
|
|
payload:
|
|
|
|
features:
|
|
|
|
taskclusterProxy: true
|
|
|
|
maxRunTime: 3600
|
2023-01-13 12:17:06 +03:00
|
|
|
image: "${taskboot_image}"
|
2022-01-14 14:50:51 +03:00
|
|
|
env:
|
|
|
|
TASKCLUSTER_SECRET: project/relman/rust-code-analysis/deploy
|
|
|
|
command:
|
|
|
|
- "/bin/sh"
|
|
|
|
- "-cx"
|
|
|
|
- "git config --global user.email moz-tools-bot@moz.tools &&
|
|
|
|
git config --global user.name moz.tools Bot &&
|
|
|
|
git clone --quiet ${repository} &&
|
|
|
|
cd rust-code-analysis &&
|
|
|
|
cd tree-sitter-ccomment && taskboot cargo-publish --ignore-published && cd .. &&
|
|
|
|
cd tree-sitter-preproc && taskboot cargo-publish --ignore-published && cd .. &&
|
|
|
|
cd tree-sitter-mozjs && taskboot cargo-publish --ignore-published && cd .. &&
|
|
|
|
cd tree-sitter-mozcpp && taskboot cargo-publish --ignore-published && cd .. &&
|
2023-01-13 12:30:19 +03:00
|
|
|
taskboot cargo-publish --ignore-published &&
|
|
|
|
cd rust-code-analysis-cli && taskboot cargo-publish --ignore-published && cd .. &&
|
|
|
|
cd rust-code-analysis-web && taskboot cargo-publish --ignore-published"
|
2022-01-14 14:50:51 +03:00
|
|
|
metadata:
|
|
|
|
name: "rust-code-analysis crates publishing on crates.io ${head_branch[10:]}"
|
|
|
|
description: rust-code-analysis crates publishing on crates.io
|
|
|
|
owner: cdenizet@mozilla.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
|
|
|
|
2019-12-19 17:02:45 +03:00
|
|
|
- $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
|
|
|
|
then:
|
2020-05-10 13:48:49 +03:00
|
|
|
taskId: {$eval: as_slugid("build_linux_release")}
|
2019-12-19 17:02:45 +03:00
|
|
|
dependencies:
|
2022-01-14 14:50:51 +03:00
|
|
|
- {$eval: as_slugid("publish_crates")}
|
2019-12-19 17:02:45 +03:00
|
|
|
created: {$fromNow: ''}
|
|
|
|
deadline: {$fromNow: '2 hour'}
|
|
|
|
provisionerId: proj-relman
|
|
|
|
workerType: ci
|
|
|
|
payload:
|
|
|
|
maxRunTime: 3600
|
2021-04-08 17:07:36 +03:00
|
|
|
image: "rust:buster"
|
2019-12-19 17:02:45 +03:00
|
|
|
command:
|
|
|
|
- "/bin/bash"
|
|
|
|
- "-cx"
|
2021-03-31 11:10:04 +03:00
|
|
|
- "git clone --quiet ${repository} &&
|
2019-12-19 17:02:45 +03:00
|
|
|
cd rust-code-analysis &&
|
2021-03-31 11:10:04 +03:00
|
|
|
git -c advice.detachedHead=false checkout ${head_rev} &&
|
2022-12-20 16:11:11 +03:00
|
|
|
cargo update &&
|
2021-04-08 17:07:36 +03:00
|
|
|
cargo build --workspace --release &&
|
|
|
|
cargo package --all-features &&
|
|
|
|
pushd rust-code-analysis-cli && cargo package --all-features && popd &&
|
|
|
|
pushd rust-code-analysis-web && cargo package --all-features && popd &&
|
|
|
|
cd target/release &&
|
|
|
|
tar -zvcf /rust-code-analysis-linux-cli-x86_64.tar.gz rust-code-analysis-cli &&
|
|
|
|
tar -zvcf /rust-code-analysis-linux-web-x86_64.tar.gz rust-code-analysis-web"
|
2019-12-19 17:02:45 +03:00
|
|
|
artifacts:
|
2021-01-06 13:44:21 +03:00
|
|
|
public/rust-code-analysis-linux-cli-x86_64.tar.gz:
|
2019-12-19 17:02:45 +03:00
|
|
|
expires: {$fromNow: '2 weeks'}
|
2021-04-08 17:07:36 +03:00
|
|
|
path: /rust-code-analysis-linux-cli-x86_64.tar.gz
|
2021-01-06 13:44:21 +03:00
|
|
|
type: file
|
|
|
|
public/rust-code-analysis-linux-web-x86_64.tar.gz:
|
|
|
|
expires: {$fromNow: '2 weeks'}
|
2021-04-08 17:07:36 +03:00
|
|
|
path: /rust-code-analysis-linux-web-x86_64.tar.gz
|
2019-12-19 17:02:45 +03:00
|
|
|
type: file
|
2022-12-20 16:11:11 +03:00
|
|
|
public/Cargo.lock:
|
|
|
|
expires: {$fromNow: '2 weeks'}
|
2023-01-13 14:50:08 +03:00
|
|
|
path: /rust-code-analysis/Cargo.lock
|
2022-12-20 16:11:11 +03:00
|
|
|
type: file
|
2019-12-19 17:02:45 +03:00
|
|
|
metadata:
|
2020-05-10 13:48:49 +03:00
|
|
|
name: rust-code-analysis linux release build
|
|
|
|
description: rust-code-analysis linux release build
|
|
|
|
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_windows_release")}
|
|
|
|
dependencies:
|
|
|
|
- {$eval: as_slugid("lint_test_task")}
|
|
|
|
- {$eval: as_slugid("windows_test_task")}
|
|
|
|
created: {$fromNow: ''}
|
|
|
|
deadline: {$fromNow: '2 hour'}
|
|
|
|
provisionerId: proj-relman
|
2023-05-25 01:08:19 +03:00
|
|
|
workerType: win2022
|
2020-05-10 13:48:49 +03:00
|
|
|
payload:
|
|
|
|
maxRunTime: 3600
|
|
|
|
command:
|
|
|
|
- set VSWHERE=%programfiles(x86)%\Microsoft Visual Studio\Installer
|
|
|
|
- set VS_BINS=VC\Tools\MSVC\*\bin\Hostx64\x64
|
|
|
|
- set RUSTUP_INIT_PATH=%CD%\rustup-init
|
|
|
|
- set CARGO_PATH=%USERPROFILE%\.cargo\bin
|
|
|
|
- set PATH=%RUSTUP_INIT_PATH%;%CARGO_PATH%;%VSWHERE%;%PATH%
|
|
|
|
- set VSWHERE_CMD=vswhere -latest -products * -find %VS_BINS%
|
|
|
|
- FOR /F "tokens=*" %%o IN ('%VSWHERE_CMD%') do (SET LIB_PATH=%%o)
|
|
|
|
- set PATH=%LIB_PATH%;%PATH%
|
|
|
|
- rustup-init -yv --default-toolchain stable ^
|
|
|
|
--default-host x86_64-pc-windows-msvc
|
2021-03-31 11:10:04 +03:00
|
|
|
- git clone --quiet ${repository}
|
2020-05-10 13:48:49 +03:00
|
|
|
- cd rust-code-analysis
|
2021-03-31 11:10:04 +03:00
|
|
|
- git -c advice.detachedHead=false checkout ${head_rev}
|
2021-01-13 15:15:04 +03:00
|
|
|
- cargo build --workspace --release
|
2021-02-08 18:06:00 +03:00
|
|
|
- 7z a rust-code-analysis-win-cli-x86_64.zip "target\release\rust-code-analysis-cli.exe"
|
|
|
|
- 7z a rust-code-analysis-win-web-x86_64.zip "target\release\rust-code-analysis-web.exe"
|
2020-05-10 13:48:49 +03:00
|
|
|
mounts:
|
|
|
|
- content:
|
|
|
|
url: https://win.rustup.rs/
|
|
|
|
file: rustup-init\rustup-init.exe
|
|
|
|
artifacts:
|
2021-02-08 18:06:00 +03:00
|
|
|
- name: public/rust-code-analysis-win-cli-x86_64.zip
|
2020-05-10 13:48:49 +03:00
|
|
|
expires: {$fromNow: '2 weeks'}
|
2021-02-08 18:06:00 +03:00
|
|
|
path: rust-code-analysis\rust-code-analysis-win-cli-x86_64.zip
|
2020-05-10 13:48:49 +03:00
|
|
|
type: file
|
2021-02-08 18:06:00 +03:00
|
|
|
- name: public/rust-code-analysis-win-web-x86_64.zip
|
2021-01-06 13:44:21 +03:00
|
|
|
expires: {$fromNow: '2 weeks'}
|
2021-02-08 18:06:00 +03:00
|
|
|
path: rust-code-analysis\rust-code-analysis-win-web-x86_64.zip
|
2021-01-06 13:44:21 +03:00
|
|
|
type: file
|
2020-05-10 13:48:49 +03:00
|
|
|
metadata:
|
|
|
|
name: rust-code-analysis windows release build
|
|
|
|
description: rust-code-analysis windows release build
|
|
|
|
owner: cdenizet@mozilla.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|
|
|
|
|
2019-12-19 17:02:45 +03:00
|
|
|
- $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
|
|
|
|
then:
|
2021-01-13 15:15:41 +03:00
|
|
|
$let:
|
|
|
|
linux_cli: rust-code-analysis-linux-cli-x86_64.tar.gz
|
|
|
|
linux_web: rust-code-analysis-linux-web-x86_64.tar.gz
|
|
|
|
win_cli: rust-code-analysis-win-cli-x86_64.zip
|
|
|
|
win_web: rust-code-analysis-win-web-x86_64.zip
|
|
|
|
in:
|
|
|
|
taskId: {$eval: as_slugid("deploy_release")}
|
|
|
|
dependencies:
|
|
|
|
- {$eval: as_slugid("build_linux_release")}
|
2021-02-08 18:06:00 +03:00
|
|
|
- {$eval: as_slugid("build_windows_release")}
|
2021-01-13 15:15:41 +03:00
|
|
|
- {$eval: as_slugid("test_mozilla_central")}
|
|
|
|
- {$eval: as_slugid("build_documentation")}
|
|
|
|
created: {$fromNow: ''}
|
|
|
|
deadline: {$fromNow: '2 hour'}
|
|
|
|
provisionerId: proj-relman
|
|
|
|
workerType: ci
|
|
|
|
scopes:
|
|
|
|
- secrets:get:project/relman/rust-code-analysis/deploy
|
|
|
|
payload:
|
|
|
|
features:
|
|
|
|
taskclusterProxy: true
|
|
|
|
maxRunTime: 3600
|
2023-01-13 12:17:06 +03:00
|
|
|
image: "${taskboot_image}"
|
2021-01-13 15:15:41 +03:00
|
|
|
env:
|
|
|
|
TASKCLUSTER_SECRET: project/relman/rust-code-analysis/deploy
|
|
|
|
command:
|
|
|
|
- "/bin/sh"
|
|
|
|
- "-cx"
|
|
|
|
- "git config --global user.email moz-tools-bot@moz.tools &&
|
|
|
|
git config --global user.name moz.tools Bot &&
|
2021-03-31 11:10:04 +03:00
|
|
|
git clone --quiet ${repository} &&
|
2021-01-13 15:15:41 +03:00
|
|
|
cd rust-code-analysis &&
|
|
|
|
taskboot retrieve-artifact --output-path=. --artifacts=public/book.tar.gz &&
|
|
|
|
tar xfz book.tar.gz -C rust-code-analysis-book &&
|
|
|
|
./rust-code-analysis-book/deploy-to-GitHub-Pages &&
|
|
|
|
taskboot git-push --force-push github.com/mozilla/rust-code-analysis moz-tools-bot gh-pages &&
|
2022-12-20 16:11:11 +03:00
|
|
|
taskboot github-release mozilla/rust-code-analysis ${head_branch[10:]} --asset Cargo.lock:public/Cargo.lock ${linux_cli}:public/${linux_cli} ${linux_web}:public/${linux_web} ${win_cli}:public/${win_cli} ${win_web}:public/${win_web} &&
|
2022-01-14 14:50:51 +03:00
|
|
|
rm -rf book.tar.gz"
|
2021-01-13 15:15:41 +03:00
|
|
|
metadata:
|
|
|
|
name: "rust-code-analysis release publication ${head_branch[10:]}"
|
|
|
|
description: rust-code-analysis release publication on Github
|
|
|
|
owner: cdenizet@mozilla.com
|
|
|
|
source: ${repository}/raw/${head_rev}/.taskcluster.yml
|