Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a79ecf4

Browse files
committed
Move the configuration file for Bazel jobs to our own repository
This will allow to update the file that explains how to build and test Bazel at the same time that Bazel evolves. Fixes bazelbuild/continuous-integration#99 Change-Id: I2ab8641a6eb5d8cf7ea95667bd6b3af42be5a420 PiperOrigin-RevId: 163320005
1 parent 154cfb2 commit a79ecf4

3 files changed

Lines changed: 252 additions & 0 deletions

File tree

scripts/ci/bazel-docker-tests.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[
2+
{
3+
"node": "docker",
4+
"variation": "",
5+
"parameters": {
6+
"targets": [],
7+
"tests": [
8+
"//tools/cpp/...",
9+
"filter(\"^//src/test/docker\", //src/test/...)"
10+
]
11+
}
12+
}
13+
]

scripts/ci/bazel-tests.json

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
// This is a list of configuration for the bazel-tests job.
2+
// See https://github.com/bazelbuild/continuous-integration/blob/master/docs/owner.md#customizing-a-project.
3+
[
4+
{
5+
"configurations": [
6+
{
7+
"node": "linux-x86_64",
8+
"variation": ""
9+
},
10+
{
11+
"node": "ubuntu_16.04-x86_64",
12+
"variation": ""
13+
}
14+
],
15+
"parameters": {
16+
"configure": [
17+
"echo >>WORKSPACE",
18+
"cat >>WORKSPACE <<EOF",
19+
"android_sdk_repository(",
20+
" name = \"androidsdk\",",
21+
" path = \"${ANDROID_SDK_PATH}\",",
22+
")",
23+
"android_ndk_repository(",
24+
" name = \"androidndk\",",
25+
" path = \"${ANDROID_NDK_PATH}\",",
26+
")",
27+
"EOF"
28+
],
29+
"tests": [
30+
"//scripts/...",
31+
"filter(\"^(?!//src/test/docker).*$\", //src/test/...)",
32+
"//third_party/ijar/...",
33+
"//tools/android/..."
34+
],
35+
"targets": []
36+
}
37+
}, {
38+
"configurations": [
39+
{
40+
"node": "freebsd-11",
41+
"variation": ""
42+
},
43+
{
44+
"node": "freebsd-12",
45+
"variation": ""
46+
}
47+
],
48+
"parameters": {
49+
// As configure step, we redo the USES=shebangfix of the devel/bazel
50+
// port. In other words, we replace every #!-line calling bash by a
51+
// line containing the correct path to bash on our test machines.
52+
"configure": [
53+
"find -E . -type f -iregex '.*(sh|txt|_stub|stub_.*|bazel|get_workspace_status|protobuf_support|_so)' \\",
54+
"-exec sed -i '' \\",
55+
"-e '1s|^\\#![[:space:]]*/bin/bash\\([[:space:]]\\)|\\#!/usr/local/bin/bash\\1|' \\",
56+
"-e '1s|^\\#![[:space:]]*/bin/bash$|\\#!/usr/local/bin/bash|' \\",
57+
"-e '1s|^\\#![[:space:]]*/usr/bin/env bash\\([[:space:]]\\)|\\#!/usr/local/bin/bash\\1|' \\",
58+
"-e '1s|^\\#![[:space:]]*/usr/bin/env bash$|\\#!/usr/local/bin/bash|' \\",
59+
"{} +"
60+
],
61+
"tests": [
62+
"//src/test/shell/integration/..."
63+
],
64+
"targets": []
65+
}
66+
}, {
67+
"node": "darwin-x86_64",
68+
"variation": "",
69+
"parameters": {
70+
"configure": [
71+
"echo >>WORKSPACE",
72+
"cat >>WORKSPACE <<EOF",
73+
"android_sdk_repository(",
74+
" name = \"androidsdk\",",
75+
" path = \"${ANDROID_SDK_PATH}\",",
76+
")",
77+
"android_ndk_repository(",
78+
" name = \"androidndk\",",
79+
" path = \"${ANDROID_NDK_PATH}\",",
80+
")",
81+
"EOF"
82+
],
83+
"build_opts": ["--define IPHONE_SDK=1"],
84+
"tests": [
85+
"//scripts/...",
86+
"filter(\"^(?!//src/test/docker).*$\", //src/test/...)",
87+
"//third_party/ijar/...",
88+
"//tools/android/..."
89+
],
90+
"targets": []
91+
}
92+
}, {
93+
"toolchain": "msvc",
94+
"configurations": [{
95+
"node": "windows-x86_64",
96+
"variation": ""
97+
}],
98+
"parameters": {
99+
"build_opts": [
100+
"--copt=-w",
101+
"--host_copt=-w",
102+
// TODO(pcloudy):.
103+
// Remove it after wrapper-less CROSSTOOL becomes default
104+
"--action_env=NO_MSVC_WRAPPER=1"
105+
],
106+
"test_opts": [
107+
// TODO(pcloudy): Remove this after TEMP is properly set.
108+
// A workaround for ASSERT_DEATH in gtest on Windows.
109+
// When running tests, Bazel doesn't set TEMP,
110+
// ASSERT_DEATH will try to write to C:/Windows, then fails.
111+
"--test_env=TEMP",
112+
],
113+
"test_tag_filters": ["-no_windows"],
114+
"tests": [
115+
"//src/test/py/...",
116+
"//src/test/java/...",
117+
"//src/test/cpp/...",
118+
"//src/test/native:all_tests",
119+
"//src/tools/launcher/util/...",
120+
"//src/test/shell/bazel:bazel_bootstrap_distfile_test",
121+
"//src/test/shell/bazel:bazel_windows_example_test"
122+
],
123+
"targets": ["//src:bazel"]
124+
}
125+
}, {
126+
"toolchain": "msys",
127+
"configurations": [{
128+
"node": "windows-x86_64",
129+
"variation": ""
130+
}],
131+
"parameters": {
132+
"build_opts": ["--cpu=x64_windows_msys", "--host_cpu=x64_windows_msys"],
133+
"test_tag_filters": ["-no_windows"],
134+
"tests": ["//src/test/shell/bazel:bazel_windows_example_test"],
135+
"targets": []
136+
}
137+
}
138+
]

scripts/ci/bootstrap.json

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
// Configure the nodes to bootstrap bazel on.
2+
// See https://github.com/bazelbuild/continuous-integration/blob/master/docs/owner.md#bazel-bootstrap
3+
[
4+
{
5+
"node": "linux-x86_64",
6+
"variation": "",
7+
"parameters": {
8+
"archive": {
9+
"bazel-bin/src/bazel": "bazel",
10+
"bazel-bin/scripts/packages/with-jdk/install.sh": "bazel-%{release_name}-installer-linux-x86_64.sh",
11+
"bazel-bin/scripts/packages/without-jdk/install.sh": "bazel-%{release_name}-without-jdk-installer-linux-x86_64.sh",
12+
"bazel-bin/scripts/packages/debian/bazel-debian.deb": "bazel_%{release_name}-linux-x86_64.deb",
13+
"bazel-genfiles/bazel-distfile.zip": "bazel-%{release_name}-dist.zip"
14+
},
15+
"stash": {
16+
"bazel-genfiles/scripts/packages/debian/bazel.dsc": "bazel.dsc",
17+
"bazel-genfiles/scripts/packages/debian/bazel.tar.gz": "bazel.tar.gz",
18+
"bazel-genfiles/site/jekyll-tree.tar": "docs.bazel.build.tar",
19+
"bazel-bin/src/tools/benchmark/webapp/site.tar": "perf.bazel.build.tar.nobuild"
20+
},
21+
"targets": [
22+
"//scripts/packages",
23+
"//site:jekyll-tree",
24+
"//src/tools/benchmark/webapp:site"
25+
]
26+
}
27+
},
28+
{ "node": "ubuntu_16.04-x86_64", "variation": "" },
29+
{
30+
"variation": "",
31+
"node": "freebsd-11",
32+
"parameters": {
33+
"configure": [
34+
"find -E . -type f -iregex '.*(sh|txt|_stub|stub_.*|bazel|get_workspace_status|protobuf_support|_so)' \\",
35+
"-exec sed -i '' \\",
36+
"-e '1s|^\\#![[:space:]]*/bin/bash\\([[:space:]]\\)|\\#!/usr/local/bin/bash\\1|' \\",
37+
"-e '1s|^\\#![[:space:]]*/bin/bash$|\\#!/usr/local/bin/bash|' \\",
38+
"-e '1s|^\\#![[:space:]]*/usr/bin/env bash\\([[:space:]]\\)|\\#!/usr/local/bin/bash\\1|' \\",
39+
"-e '1s|^\\#![[:space:]]*/usr/bin/env bash$|\\#!/usr/local/bin/bash|' \\",
40+
"{} +"
41+
],
42+
"archive": {"bazel-bin/src/bazel": "bazel"}
43+
}
44+
},
45+
{
46+
"variation": "",
47+
"node": "freebsd-12",
48+
"parameters": {
49+
"configure": [
50+
"find -E . -type f -iregex '.*(sh|txt|_stub|stub_.*|bazel|get_workspace_status|protobuf_support|_so)' \\",
51+
"-exec sed -i '' \\",
52+
"-e '1s|^\\#![[:space:]]*/bin/bash\\([[:space:]]\\)|\\#!/usr/local/bin/bash\\1|' \\",
53+
"-e '1s|^\\#![[:space:]]*/bin/bash$|\\#!/usr/local/bin/bash|' \\",
54+
"-e '1s|^\\#![[:space:]]*/usr/bin/env bash\\([[:space:]]\\)|\\#!/usr/local/bin/bash\\1|' \\",
55+
"-e '1s|^\\#![[:space:]]*/usr/bin/env bash$|\\#!/usr/local/bin/bash|' \\",
56+
"{} +"
57+
],
58+
"archive": {"bazel-bin/src/bazel": "bazel"}
59+
}
60+
},
61+
{
62+
"variation": "",
63+
"node": "darwin-x86_64",
64+
"parameters": {
65+
"archive": {
66+
"bazel-bin/src/bazel": "bazel",
67+
"bazel-bin/scripts/packages/with-jdk/install.sh": "bazel-%{release_name}-installer-darwin-x86_64.sh",
68+
"bazel-bin/scripts/packages/without-jdk/install.sh": "bazel-%{release_name}-without-jdk-installer-darwin-x86_64.sh"
69+
},
70+
"targets": [
71+
"//scripts/packages"
72+
],
73+
// TODO(dmarting): Do we still needs that? this could be done as an external repo
74+
// instead.
75+
"opts": ["--define IPHONE_SDK=1"]
76+
}
77+
},
78+
// TODO(dmarting): windows build zip with "zip -j", add it to //packages
79+
{
80+
"variation": "",
81+
"node": "windows-x86_64",
82+
"parameters": {
83+
"archive": {
84+
"bazel-bin/src/bazel": ["bazel.exe", "bazel-%{release_name}-without-jdk-windows-x86_64.exe"],
85+
"bazel-bin/src/bazel_with_jdk": "bazel-%{release_name}-windows-x86_64.exe",
86+
"bazel-genfiles/scripts/packages/bazel.zip": "bazel-%{release_name}-without-jdk-windows-x86_64.zip",
87+
"bazel-genfiles/scripts/packages/bazel_with_jdk.zip": "bazel-%{release_name}-windows-x86_64.zip"
88+
},
89+
"targets": [
90+
"//scripts/packages"
91+
],
92+
"opts": [
93+
"--copt=-w",
94+
"--host_copt=-w",
95+
// TODO(pcloudy):
96+
// Remove it after wrapper-less CROSSTOOL becomes default
97+
"--action_env=NO_MSVC_WRAPPER=1"
98+
]
99+
}
100+
}
101+
]

0 commit comments

Comments
 (0)