-
Notifications
You must be signed in to change notification settings - Fork 129
/
presubmit.yml
137 lines (125 loc) · 4.59 KB
/
presubmit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
---
x_defaults:
# YAML has a feature for "repeated nodes", BazelCI is fine with extra nodes
# it doesn't know about; so that is used to avoid repeating common subparts.
mac_common: &mac_common
platform: macos_arm64
xcode_version: "15.2"
build_targets:
- "//examples/..."
test_targets:
- "//examples/..."
- "//test/..."
linux_common: &linux_common
platform: ubuntu2004
environment:
CC: clang
SWIFT_VERSION: "5.7.2"
SWIFT_HOME: "$HOME/swift-$SWIFT_VERSION"
PATH: "$PATH:$SWIFT_HOME/usr/bin"
build_flags: &linux_flags
# On Linux, we look for Swift toolchain binaries on the path. We may be
# able to change this when we start auto-downloading toolchains (see
# https://github.com/bazelbuild/rules_swift/issues/4).
- "--action_env=PATH"
build_targets:
- "//examples/..."
- "-//examples/apple/..."
test_flags: *linux_flags
test_targets:
- "//examples/..."
- "//test/..."
- "-//examples/apple/..."
# The following tests require Swift >5.8.
- "-//test:const_values_empty_const_values_multiple_files"
- "-//test:const_values_empty_const_values_single_file"
- "-//test:const_values_expected_argv"
- "-//test:const_values_wmo_single_values_file"
- "-//test:output_file_map_default"
windows_common: &windows_common
platform: windows
build_flags:
# Override 'sandboxed' strategy set in .bazelrc because it's not
# available on Windows
- "--strategy=SwiftCompile="
build_targets:
- "//tools/..."
tasks:
macos_6:
name: "6.x LTS"
bazel: 6.x
<<: *mac_common
build_flags:
# Bazel 6.x has dependencies that produce warnings now
- "--features=-treat_warnings_as_errors"
test_flags:
# Bazel 6.x has dependencies that produce warnings now
- "--features=-treat_warnings_as_errors"
macos_latest:
name: "Current LTS"
bazel: latest
<<: *mac_common
macos_latest_bzlmod:
name: "Current LTS using bzlmod"
bazel: latest
<<: *mac_common
macos_last_green:
name: "Last Green Bazel"
bazel: last_green
<<: *mac_common
macos_latest_head_deps:
name: "Current LTS with Head Deps"
bazel: latest
shell_commands:
# Update the WORKSPACE to use head versions of some deps to ensure nothing
# has landed on them breaking this project.
- .bazelci/update_workspace_to_deps_heads.sh
<<: *mac_common
ubuntu2004_lts:
name: "Previous LTS"
bazel: latest-1
shell_commands:
- "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME"
- "mkdir $SWIFT_HOME"
- "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2004/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu20.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
<<: *linux_common
ubuntu2004_latest:
name: "Current LTS"
bazel: latest
shell_commands:
- "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME"
- "mkdir $SWIFT_HOME"
- "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2004/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu20.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
<<: *linux_common
ubuntu2004_last_green:
name: "Last Green Bazel"
bazel: last_green
shell_commands:
- "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME"
- "mkdir $SWIFT_HOME"
- "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2004/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu20.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
<<: *linux_common
ubuntu2004_latest_head_deps:
name: "Current LTS with Head Deps"
bazel: latest
shell_commands:
- "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME"
- "mkdir $SWIFT_HOME"
- "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2004/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu20.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
# Update the WORKSPACE to use head versions of some deps to ensure nothing
# has landed on them breaking this project.
- .bazelci/update_workspace_to_deps_heads.sh
<<: *linux_common
windows_last_green:
name: "Last Green Bazel"
bazel: last_green
<<: *windows_common
doc_tests:
name: "Doc tests"
bazel: last_green
platform: ubuntu2004
test_flags:
- "--enable_bzlmod=false"
test_targets:
- "doc/..."
buildifier: 6.3.2