summaryrefslogtreecommitdiff
path: root/tools/build_release_files.py
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2019-08-15 00:07:29 -0700
committerScott Shawcroft <scott@tannewt.org>2019-08-27 19:53:54 -0700
commit6106909c1094b39980dd6f94ca17782681f3be9a (patch)
tree1b85ecf7fee4915e8a8ff6abb78141f294b2f458 /tools/build_release_files.py
parent7cbae3d20c0f79511a932bbcb2d66d2620b6bb3a (diff)
Swap the CI to GitHub Actions from Travis
Diffstat (limited to 'tools/build_release_files.py')
-rwxr-xr-xtools/build_release_files.py34
1 files changed, 8 insertions, 26 deletions
diff --git a/tools/build_release_files.py b/tools/build_release_files.py
index e29b098c7..09133e51f 100755
--- a/tools/build_release_files.py
+++ b/tools/build_release_files.py
@@ -10,21 +10,14 @@ import time
for port in build_info.SUPPORTED_PORTS:
result = subprocess.run("rm -rf ../ports/{port}/build*".format(port=port), shell=True)
-ROSIE_SETUPS = ["rosie-ci"]
-rosie_ok = {}
-for rosie in ROSIE_SETUPS:
- rosie_ok[rosie] = True
-
PARALLEL = "-j 5"
-travis = False
-if "TRAVIS" in os.environ and os.environ["TRAVIS"] == "true":
+if "GITHUB_ACTION" in os.environ:
PARALLEL="-j 2"
- travis = True
all_boards = build_info.get_board_mapping()
build_boards = list(all_boards.keys())
-if "TRAVIS_BOARDS" in os.environ:
- build_boards = os.environ["TRAVIS_BOARDS"].split()
+if "BOARDS" in os.environ:
+ build_boards = os.environ["BOARDS"].split()
sha, version = build_info.get_version_info()
@@ -83,25 +76,14 @@ for board in build_boards:
if exit_status == 0:
exit_status = 1
- if travis:
- print('travis_fold:start:adafruit-bins-{}-{}\\r'.format(language, board))
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)
- # Only upload to Rosie if its a pull request.
- if travis:
- for rosie in ROSIE_SETUPS:
- if not rosie_ok[rosie]:
- break
- print("Uploading to https://{rosie}.ngrok.io/upload/{sha}".format(rosie=rosie, sha=sha))
- #curl -F "file=@$final_filename" https://$rosie.ngrok.io/upload/$sha
- if travis:
- print('travis_fold:end:adafruit-bins-{}-{}\\r'.format(language, board))
-
- # Flush so travis will see something before 10 minutes has passed.
+
+ print(make_result.stdout.decode("utf-8"))
+ print(other_output)
+
+ # Flush so we will see something before 10 minutes has passed.
print(flush=True)
sys.exit(exit_status)