Skip to content

Commit ead1cec

Browse files
authored
Merge pull request #13349 from Patater/reject-tool-changes
travis: Reject changes to tools
2 parents 3fc6667 + a18a739 commit ead1cec

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

.travis.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ after_failure:
4343

4444
matrix:
4545
include:
46-
46+
4747
### Basic Tests ###
4848
- &basic-vm
4949
stage: "Basic"
@@ -128,7 +128,7 @@ matrix:
128128
| ( grep -v -f .astyleignore || true ) \
129129
| while read file; do astyle -n --options=.astylerc "${file}"; done
130130
- git diff --exit-code --diff-filter=d --color
131-
131+
132132
- <<: *docs-vm
133133
name: "spellcheck"
134134
env: NAME=doxy-spellcheck
@@ -170,13 +170,41 @@ matrix:
170170
find "(" -name "*.a" -or -name "*.ar" ")" -and -not -name "lib*" |
171171
tee BUILD/badlibs |
172172
sed -e "s/^/Bad library name found: /" && [ ! -s BUILD/badlibs ]
173-
# Assert that all assebler files are named correctly
173+
# Assert that all assembler files are named correctly
174174
# The strange command below asserts that there are exactly 0 libraries
175175
# that do end with .s
176176
- >
177177
find -name "*.s" | tee BUILD/badasm |
178178
sed -e "s/^/Bad Assembler file name found: /" && [ ! -s BUILD/badasm ]
179179
180+
- <<: *docs-vm
181+
name: "Frozen tools check"
182+
env: NAME=frozen_tools_check
183+
script:
184+
# Reject any changes to tools that would require a re-release of the
185+
# tools for the online compiler.
186+
- >-
187+
frozen_files=`\
188+
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
189+
| egrep \
190+
-e "^tools/build_api*" \
191+
-e "^tools/config*" \
192+
-e "^tools/export*" \
193+
-e "^tools/notifier*" \
194+
-e "^tools/paths*" \
195+
-e "^tools/resources*" \
196+
-e "^tools/targets*" \
197+
-e "^tools/toolchains*" \
198+
-e "^tools/utils*" \
199+
-e "^$"`
200+
if [ -z "$frozen_files" ]; then
201+
echo "Success!";
202+
else
203+
echo -e "Failure: Frozen files were modified\n$frozen_files";
204+
echo -e "Please see https://os.mbed.com/blog/entry/Introducing-the-new-Mbed-Tools/" \
205+
"\nfor why we've frozen the legacy tools.";
206+
false;
207+
fi
180208
181209
### Python Tests ###
182210
- &pytools-vm
@@ -225,7 +253,7 @@ matrix:
225253
env: NAME=tools-py3.7
226254
python: 3.7
227255

228-
256+
229257
### Extended Tests ###
230258
- &extended-vm
231259
stage: "Extended"

0 commit comments

Comments
 (0)