dump_syms/.taskcluster.yml

154 строки
5.7 KiB
YAML

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}
in:
$if: 'tasks_for in ["github-pull-request", "github-push"]'
then:
- taskId: {$eval: as_slugid("lint_task")}
created: {$fromNow: ''}
deadline: {$fromNow: '1 hour'}
provisionerId: proj-relman
workerType: ci
payload:
maxRunTime: 3600
image: "rust:bookworm"
command:
- "/bin/bash"
- "-cx"
- "rustup toolchain install stable &&
rustup default stable &&
rustup component add clippy &&
rustup component add rustfmt &&
git clone --recursive --quiet ${repository} &&
cd dump_syms &&
git -c advice.detachedHead=false checkout ${head_rev} &&
cargo fmt -- --check &&
cargo clippy --all-features --tests --all --examples -- -D clippy::all"
metadata:
name: dump_syms lint
description: dump_syms lint
owner: cdenizet@mozilla.com
source: ${repository}/raw/${head_rev}/.taskcluster.yml
- taskId: {$eval: as_slugid("test_task")}
created: {$fromNow: ''}
deadline: {$fromNow: '1 hour'}
provisionerId: proj-relman
workerType: ci
payload:
maxRunTime: 3600
image: "rust:bookworm"
env:
CODECOV_TOKEN: 0951320b-00b4-481a-b38e-2248fe45256b
CARGO_INCREMENTAL: 0
RUSTFLAGS: -Zprofile -Ccodegen-units=1 -Copt-level=0 -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests
command:
- "/bin/bash"
- "-cx"
- "apt-get -qq update &&
apt-get -qq install -y zip &&
rustup default nightly &&
curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - &&
git clone --recursive --quiet ${repository} &&
cd dump_syms &&
git -c advice.detachedHead=false checkout ${head_rev} &&
cargo test &&
zip -0 ccov.zip `find . -name 'dump_syms*.gc*' -print` &&
../grcov ccov.zip -s . -t lcov --llvm --branch --ignore-not-existing --ignore '/*' -o lcov.info &&
bash <(curl -s https://codecov.io/bash) -f lcov.info"
metadata:
name: dump_syms test
description: dump_syms test
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_release")}
dependencies:
- {$eval: as_slugid("lint_task")}
- {$eval: as_slugid("test_task")}
created: {$fromNow: ''}
deadline: {$fromNow: '2 hour'}
provisionerId: proj-relman
workerType: ci
payload:
maxRunTime: 3600
image: "rust:bookworm"
env:
PROJECT_NAME: dump_syms
command:
- "/bin/bash"
- "-cx"
- "git clone --recursive --quiet ${repository} &&
cd dump_syms &&
git -c advice.detachedHead=false checkout ${head_rev} &&
cargo build --release &&
cd target/release &&
tar -zvcf /build.tar.gz --transform 's,^,dump_syms-linux-x86_64/,' dump_syms"
artifacts:
public/dump_syms-linux-x86_64.tar.gz:
expires: {$fromNow: '2 weeks'}
path: /build.tar.gz
type: file
metadata:
name: dump_syms release build
description: dump_syms release build
owner: cdenizet@mozilla.com
source: ${repository}/raw/${head_rev}/.taskcluster.yml
- $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
then:
$let:
version: {$eval: 'head_branch[10:]'}
in:
taskId: {$eval: as_slugid("deploy_release")}
dependencies:
- {$eval: as_slugid("build_release")}
created: {$fromNow: ''}
deadline: {$fromNow: '2 hour'}
provisionerId: proj-relman
workerType: ci
scopes:
- secrets:get:project/relman/dump_syms/deploy
payload:
features:
taskclusterProxy: true
maxRunTime: 3600
image: "mozilla/taskboot:latest"
env:
TASKCLUSTER_SECRET: project/relman/dump_syms/deploy
command:
- taskboot
- github-release
- mozilla/dump_syms
- "${version}"
- "--asset=dump_syms-linux-x86_64.tar.gz:public/dump_syms-linux-x86_64.tar.gz"
metadata:
name: "dump_syms release publication ${version}"
description: dump_syms release publication on Github
owner: cdenizet@mozilla.com
source: ${repository}/raw/${head_rev}/.taskcluster.yml