@@ -28,32 +28,7 @@ tasks:
28
28
in :
29
29
$if : ' tasks_for == "github-push" || (tasks_for == "github-pull-request" && event["action"] in ["opened", "reopened", "synchronize"])'
30
30
then :
31
- - taskId : {$eval: as_slugid("lint_test_task")}
32
- created : {$fromNow: ''}
33
- deadline : {$fromNow: '1 hour'}
34
- provisionerId : proj-relman
35
- workerType : ci
36
- payload :
37
- maxRunTime : 3600
38
- image : " rust:buster"
39
- command :
40
- - " /bin/bash"
41
- - " -cx"
42
- - " curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py &&
43
- rustup component add clippy rustfmt &&
44
- git clone --recursive --quiet ${repository} &&
45
- cd rust-code-analysis &&
46
- git -c advice.detachedHead=false checkout --recurse-submodules ${head_rev} &&
47
- pip3 install --quiet pre-commit &&
48
- pre-commit run -a --show-diff-on-failure &&
49
- cargo test --all --verbose --all-features"
50
- metadata :
51
- name : rust-code-analysis lint and test
52
- description : rust-code-analysis lint and test
53
-
54
- source : ${repository}/raw/${head_rev}/.taskcluster.yml
55
-
56
- - taskId : {$eval: as_slugid("build_documentation")}
31
+ - taskId : {$eval: as_slugid("build_linux_release")}
57
32
created : {$fromNow: ''}
58
33
deadline : {$fromNow: '2 hour'}
59
34
provisionerId : proj-relman
@@ -64,86 +39,29 @@ tasks:
64
39
command :
65
40
- " /bin/bash"
66
41
- " -cx"
67
- - " git clone --recursive --quiet ${repository} &&
42
+ - " apt-get update &&
43
+ apt-get install -y musl &&
44
+ rustup target add x86_64-unknown-linux-musl &&
45
+ git clone --recursive --quiet ${repository} &&
68
46
cd rust-code-analysis &&
69
47
git -c advice.detachedHead=false checkout --recurse-submodules ${head_rev} &&
70
- cargo install mdbook --no-default-features --features search,output --vers \" ^0.1.0 \" &&
71
- cargo doc -- release &&
72
- cd rust-code-analysis-book &&
73
- mdbook build &&
74
- tar -zvcf /book .tar.gz book/ "
48
+ env CC= \" gcc \" CXX= \" g++ \" cargo build --workspace --release --target x86_64-unknown-linux-musl &&
49
+ cd target/x86_64-unknown-linux-musl/ release &&
50
+ strip rust-code-analysis-cli rust-code-analysis-web &&
51
+ tar -zvcf /rust-code-analysis-linux-cli-x86_64.tar.gz rust-code-analysis-cli &&
52
+ tar -zvcf /rust-code-analysis-linux-web-x86_64 .tar.gz rust-code-analysis-web "
75
53
artifacts :
76
- public/book .tar.gz :
54
+ public/rust-code-analysis-linux-cli-x86_64 .tar.gz :
77
55
expires : {$fromNow: '2 weeks'}
78
- path : /book.tar.gz
56
+ path : /rust-code-analysis-linux-cli-x86_64.tar.gz
57
+ type : file
58
+ public/rust-code-analysis-linux-web-x86_64.tar.gz :
59
+ expires : {$fromNow: '2 weeks'}
60
+ path : /rust-code-analysis-linux-web-x86_64.tar.gz
79
61
type : file
80
62
metadata :
81
- name : rust-code-analysis documentation
82
- description : rust-code-analysis build documentation
83
-
84
- source : ${repository}/raw/${head_rev}/.taskcluster.yml
85
-
86
- - taskId : {$eval: as_slugid("ccov_test_task")}
87
- created : {$fromNow: ''}
88
- deadline : {$fromNow: '1 hour'}
89
- provisionerId : proj-relman
90
- workerType : ci
91
- payload :
92
- maxRunTime : 3600
93
- image : " rustlang/rust:nightly"
94
- env :
95
- CODECOV_TOKEN : 4df01912-087e-489a-be28-25aa911cb9d2
96
- CARGO_INCREMENTAL : 0
97
- RUSTFLAGS : -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort
98
- RUSTDOCFLAGS : -Cpanic=abort
99
- command :
100
- - " /bin/bash"
101
- - " -cx"
102
- - " apt-get -qq update &&
103
- apt-get -qq install -y zip &&
104
- curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-linux-x86_64.tar.bz2 | tar jxf - &&
105
- git clone --recursive --quiet ${repository} &&
106
- cd rust-code-analysis &&
107
- git -c advice.detachedHead=false checkout --recurse-submodules ${head_rev} &&
108
- cargo test --all --verbose --all-features &&
109
- zip -0 ccov.zip `find . -name 'rust_code_analysis*.gc*' -print` &&
110
- ../grcov ccov.zip -s . -t lcov --llvm --branch --ignore-not-existing --ignore '/*' -o lcov.info &&
111
- bash <(curl -s https://codecov.io/bash) -f lcov.info"
112
- metadata :
113
- name : rust-code-analysis grcov test
114
- description : rust-code-analysis grcov test
115
-
116
- source : ${repository}/raw/${head_rev}/.taskcluster.yml
117
-
118
- - taskId : {$eval: as_slugid("windows_test_task")}
119
- created : {$fromNow: ''}
120
- deadline : {$fromNow: '1 hour'}
121
- provisionerId : proj-relman
122
- workerType : win2012r2
123
- payload :
124
- maxRunTime : 3600
125
- command :
126
- - set VSWHERE=%programfiles(x86)%\Microsoft Visual Studio\Installer
127
- - set VS_BINS=VC\Tools\MSVC\*\bin\Hostx64\x64
128
- - set RUSTUP_INIT_PATH=%CD%\rustup-init
129
- - set CARGO_PATH=%USERPROFILE%\.cargo\bin
130
- - set PATH=%RUSTUP_INIT_PATH%;%CARGO_PATH%;%VSWHERE%;%PATH%
131
- - set VSWHERE_CMD=vswhere -latest -products * -find %VS_BINS%
132
- - FOR /F "tokens=*" %%o IN ('%VSWHERE_CMD%') do (SET LIB_PATH=%%o)
133
- - set PATH=%LIB_PATH%;%PATH%
134
- - rustup-init -yv --default-toolchain stable ^
135
- --default-host x86_64-pc-windows-msvc
136
- - git clone --recursive --quiet ${repository}
137
- - cd rust-code-analysis
138
- - git -c advice.detachedHead=false checkout --recurse-submodules ${head_rev}
139
- - cargo test --all --verbose --all-features
140
- mounts :
141
- - content :
142
- url : https://win.rustup.rs/
143
- file : rustup-init\rustup-init.exe
144
- metadata :
145
- name : rust-code-analysis windows test
146
- description : rust-code-analysis windows test
63
+ name : rust-code-analysis linux release build
64
+ description : rust-code-analysis linux release build
147
65
148
66
source : ${repository}/raw/${head_rev}/.taskcluster.yml
149
67
0 commit comments