Merge pull request #1909 from dhalbert/update-frozen-4.0.x

Update frozen libs; implement clean builds for translations which need it
This commit is contained in:
Scott Shawcroft 2019-05-30 13:51:12 -07:00 committed by GitHub
commit cbb102f541
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 58 additions and 17 deletions

View File

@ -1,4 +1,4 @@
# Makefile for Sphinx documentation
# Top-level Makefile for documentation builds and miscellaneous tasks.
#
# You can set these variables from the command line.
@ -203,3 +203,7 @@ translate: locale/circuitpython.pot
check-translate: locale/circuitpython.pot $(wildcard locale/*.po)
$(PYTHON) tools/check_translations.py $^
update-frozen-libraries:
@echo "Updating all frozen libraries to latest tagged version."
cd frozen; for library in *; do cd $$library; ../../tools/git-checkout-latest-tag.sh; cd ..; done

@ -1 +1 @@
Subproject commit 6b3402965999d068316882d63fae3ab26006477c
Subproject commit 182eebdc8168e3d14cd0cb28db3abb734c9e45f3

@ -1 +1 @@
Subproject commit 1d38fd81edd30f1bd70c0cfe77819ab610ea89a3
Subproject commit 0cc2e975ed22ace0d679c6fb8f3388034b88bcf1

@ -1 +1 @@
Subproject commit a1686803566793ec2de7e043bf6822e47cfa31d1
Subproject commit 617bb0787f2c61283d248632a62b27be80f64b29

@ -1 +1 @@
Subproject commit 836bb9843fd793683061c15150944f8897d806e9
Subproject commit c9e07857dc10ff5e6c743e5e8c00e9b049800d09

@ -1 +1 @@
Subproject commit aa4428f304b982aa19a5800822e78c47dc8a3b6c
Subproject commit 70865ac6e09f821b26ec727e2df300a6d9ebf6b3

@ -1 +1 @@
Subproject commit a03f9011279f9e630549432589463912831fcee1
Subproject commit f5892e24f7235c4bde2908cbb3cd0a3d6b34d421

@ -1 +1 @@
Subproject commit 98563ab65800aac6464f671c0d005df56ecaa6c6
Subproject commit 5a50830814aaeeb1fda34ed0ba2f8397415d9796

@ -1 +1 @@
Subproject commit c0ed34813a608b64ed044826553918ddbad12f0c
Subproject commit c0bdd8b10383725ee9293f5d88fb8d47eb1272bd

@ -1 +1 @@
Subproject commit 1d12cfc0b729b4ae0a2f3f4e7c1933a0fbd3b166
Subproject commit 4b101f00320d36b23f8cc28cf3f12127085894c1

View File

@ -28,6 +28,7 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Thermistor
# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 25
RELEASE_NEEDS_CLEAN_BUILD = 1
else
CFLAGS_INLINE_LIMIT = 55
endif

View File

@ -20,7 +20,8 @@ CHIP_FAMILY = samd21
# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 35
CFLAGS_INLINE_LIMIT = 23
RELEASE_NEEDS_CLEAN_BUILD = 1
else
CFLAGS_INLINE_LIMIT = 55
endif

View File

@ -15,4 +15,5 @@ CHIP_FAMILY = samd21
# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 60
RELEASE_NEEDS_CLEAN_BUILD = 1
endif

View File

@ -15,6 +15,7 @@ CHIP_FAMILY = samd21
# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 45
RELEASE_NEEDS_CLEAN_BUILD = 1
else
CFLAGS_INLINE_LIMIT = 70
endif

View File

@ -16,4 +16,5 @@ CHIP_FAMILY = samd21
# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 50
RELEASE_NEEDS_CLEAN_BUILD = 1
endif

View File

@ -25,4 +25,5 @@ CIRCUITPY_SMALL_BUILD = 1
# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 40
RELEASE_NEEDS_CLEAN_BUILD = 1
endif

View File

@ -16,4 +16,5 @@ EXTERNAL_FLASH_DEVICES = "W25Q32FV"
# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 50
RELEASE_NEEDS_CLEAN_BUILD = 1
endif

View File

@ -361,3 +361,8 @@ $(addprefix lib/,\
libm/atan2f.c \
)
endif
.PHONY: check-release-needs-clean-build
check-release-needs-clean-build:
@echo "RELEASE_NEEDS_CLEAN_BUILD = $(RELEASE_NEEDS_CLEAN_BUILD)"

View File

@ -1,3 +1,5 @@
#! /usr/bin/env python3
import os
import sys
import subprocess
@ -6,7 +8,7 @@ import build_board_info as build_info
import time
for port in build_info.SUPPORTED_PORTS:
result = subprocess.run("rm -rf ../ports/{}/build*".format(port), shell=True)
result = subprocess.run("rm -rf ../ports/{port}/build*".format(port=port), shell=True)
ROSIE_SETUPS = ["rosie-ci"]
rosie_ok = {}
@ -37,7 +39,25 @@ for board in build_boards:
bin_directory = "../bin/{board}/{language}".format(board=board, language=language)
os.makedirs(bin_directory, exist_ok=True)
start_time = time.monotonic()
make_result = subprocess.run("make -C ../ports/" + board_info["port"] + " TRANSLATION=" + language + " BOARD=" + board, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
# Normally different language builds are all done based on the same set of compiled sources.
# But sometimes a particular language needs to be built from scratch, if, for instance,
# CFLAGS_INLINE_LIMIT is set for a particular language to make it fit.
clean_build_check_result = subprocess.run(
"make -C ../ports/{port} TRANSLATION={language} BOARD={board} check-release-needs-clean-build | fgrep 'RELEASE_NEEDS_CLEAN_BUILD = 1'".format(
port = board_info["port"], language=language, board=board),
shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
clean_build = clean_build_check_result.returncode == 0
build_dir = "build-{board}".format(board=board)
if clean_build:
build_dir += "-{language}".format(language=language)
make_result = subprocess.run(
"make -C ../ports/{port} TRANSLATION={language} BOARD={board} BUILD={build}".format(
port = board_info["port"], language=language, board=board, build=build_dir),
shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
build_duration = time.monotonic() - start_time
success = "\033[32msucceeded\033[0m"
if make_result.returncode != 0:
@ -47,11 +67,14 @@ for board in build_boards:
other_output = ""
for extension in board_info["extensions"]:
temp_filename = "../ports/{port}/build-{board}/firmware.{extension}".format(port=board_info["port"], board=board, extension=extension)
temp_filename = "../ports/{port}/{build}/firmware.{extension}".format(
port=board_info["port"], build=build_dir, extension=extension)
for alias in board_info["aliases"] + [board]:
bin_directory = "../bin/{alias}/{language}".format(alias=alias, language=language)
bin_directory = "../bin/{alias}/{language}".format(
alias=alias, language=language)
os.makedirs(bin_directory, exist_ok=True)
final_filename = "adafruit-circuitpython-{alias}-{language}-{version}.{extension}".format(alias=alias, language=language, version=version, extension=extension)
final_filename = "adafruit-circuitpython-{alias}-{language}-{version}.{extension}".format(
alias=alias, language=language, version=version, extension=extension)
final_filename = os.path.join(bin_directory, final_filename)
try:
shutil.copyfile(temp_filename, final_filename)
@ -62,7 +85,9 @@ for board in build_boards:
if travis:
print('travis_fold:start:adafruit-bins-{}-{}\\r'.format(language, board))
print("Build {} for {} took {:.2f}s and {}".format(board, language, build_duration, success))
print("Build {board} for {language}{clean_build} took {build_duration:.2f}s and {success}".format(
board=board, language=language, clean_build=(" (clean_build)" if clean_build else ""),
build_duration=build_duration, success=success))
if make_result.returncode != 0:
print(make_result.stdout.decode("utf-8"))
print(other_output)