upload bin and uf2 for arduino boards; remove unneeded build steps

crypto-aes
Dan Halbert 3 years ago
parent c24a4f7d66
commit 98a03fc935
  1. 3
      .github/workflows/build.yml
  2. 8
      tools/build_board_info.py
  3. 35
      tools/upload_release_files.py

@ -273,6 +273,3 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
- name: Install upload deps
run: |
pip install uritemplate

@ -37,10 +37,10 @@ extension_by_port = {
# Per board overrides
extension_by_board = {
# samd
"arduino_mkr1300": BIN,
"arduino_mkrzero": BIN,
"arduino_nano_33_iot": BIN,
"arduino_zero": BIN,
"arduino_mkr1300": BIN_UF2,
"arduino_mkrzero": BIN_UF2,
"arduino_nano_33_iot": BIN_UF2,
"arduino_zero": BIN_UF2,
"feather_m0_adalogger": BIN_UF2,
"feather_m0_basic": BIN_UF2,
"feather_m0_rfm69": BIN_UF2,

@ -1,35 +0,0 @@
#! /usr/bin/env python3
import os
import os.path
import sys
import uritemplate
sys.path.append("adabot")
import adabot.github_requests as github
exit_status = 0
for dirpath, dirnames, filenames in os.walk("../bin"):
if not filenames:
continue
for filename in filenames:
full_filename = os.path.join(dirpath, filename)
label = filename.replace("adafruit-circuitpython-", "")
url_vars = {}
url_vars["name"] = filename
url_vars["label"] = label
url = uritemplate.expand(os.environ["UPLOAD_URL"], url_vars)
headers = {"content-type": "application/octet-stream"}
print(url)
with open(full_filename, "rb") as f:
response = github.post(url, data=f, headers=headers)
if not response.ok:
if response.status_code == 422 and response.json().get("errors", [{"code":""}])[0]["code"] == "already_exists":
print("File already uploaded. Skipping.")
continue
print("Upload of {} failed with {}.".format(filename, response.status_code))
print(response.text)
sys.exit(response.status_code)
sys.exit(exit_status)
Loading…
Cancel
Save