From 375f5a14e89df3cb9bfbdc4ab7ba2328dab659e8 Mon Sep 17 00:00:00 2001 From: hathach Date: Sun, 9 Jun 2019 13:53:09 +0700 Subject: [PATCH] move setting board to python script for local build --- .travis.yml | 1 - tools/build_all.py | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4f9e9a35..f3d546fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,6 @@ install: - arduino --install-library "Adafruit NeoPixel","Adafruit NeoMatrix","Adafruit GFX Library","Adafruit SSD1306","MIDI Library", before_script: - - arduino --board adafruit:nrf52:feather52840:softdevice=s140v6,debug=l0 --save-prefs script: - python3 tools/build_all.py diff --git a/tools/build_all.py b/tools/build_all.py index deebbcd5..b58c5551 100644 --- a/tools/build_all.py +++ b/tools/build_all.py @@ -16,10 +16,11 @@ if "TRAVIS" in os.environ and os.environ["TRAVIS"] == "true": success_count = 0 fail_count = 0 +print("Setting board to Feather nRF52840") +subprocess.run("arduino --board adafruit:nrf52:feather52840:softdevice=s140v6,debug=l0 --save-prefs", shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + for sketch in glob.iglob('libraries/**/*.ino', recursive=True): start_time = time.monotonic() - #build_result = subprocess.run("/home/hathach/Applications/arduino-1.8.9/arduino-builder -compile -hardware /home/hathach/Applications/arduino-1.8.9/hardware -hardware /home/hathach/.arduino15/packages -hardware /home/hathach/Arduino/hardware/ -tools /home/hathach/.arduino15/packages/adafruit/tools -tools /home/hathach/Applications/arduino-1.8.9/tools-builder -tools /home/hathach/.arduino15/packages -built-in-libraries /home/hathach/Applications/arduino-1.8.9/libraries -libraries /home/hathach/Arduino/libraries -fqbn=adafruit:nrf52:feather52840:softdevice=s140v6,debug=l0 -ide-version=10807 -warnings=none -prefs=build.warn_data_percentage=75 -verbose {}".format(sketch), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - build_result = subprocess.run("arduino --verify {}".format(sketch), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) build_duration = time.monotonic() - start_time