Fixes and improvements (#1)
This commit is contained in:
@@ -15,12 +15,12 @@ runs:
|
|||||||
uses: espressif/esp-idf-ci-action@v1
|
uses: espressif/esp-idf-ci-action@v1
|
||||||
with:
|
with:
|
||||||
esp_idf_version: v5.5
|
esp_idf_version: v5.5
|
||||||
path: './Apps/${{ app_name }}'
|
path: ./Apps/${{ inputs.app_name }}
|
||||||
command: 'tactility.py build'
|
command: 'python tactility.py build --no-animations'
|
||||||
- name: 'Upload Artifact'
|
- name: 'Upload Artifact'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ app_name }}
|
name: ${{ inputs.app_name }}
|
||||||
path: 'Apps/${{ app_name}}/build/${{ app_name }}.app'
|
path: Apps/${{ inputs.app_name}}/build/${{ inputs.app_name }}.app
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Build Firmware
|
name: Build App
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
|||||||
@@ -14,13 +14,14 @@ import shutil
|
|||||||
import configparser
|
import configparser
|
||||||
|
|
||||||
ttbuild_path = ".tactility"
|
ttbuild_path = ".tactility"
|
||||||
ttbuild_version = "2.2.0"
|
ttbuild_version = "2.3.0"
|
||||||
ttbuild_cdn = "https://cdn.tactility.one"
|
ttbuild_cdn = "https://cdn.tactility.one"
|
||||||
ttbuild_sdk_json_validity = 3600 # seconds
|
ttbuild_sdk_json_validity = 3600 # seconds
|
||||||
ttport = 6666
|
ttport = 6666
|
||||||
verbose = False
|
verbose = False
|
||||||
use_local_sdk = False
|
use_local_sdk = False
|
||||||
valid_platforms = ["esp32", "esp32s3"]
|
valid_platforms = ["esp32", "esp32s3"]
|
||||||
|
no_anmimations = False
|
||||||
|
|
||||||
spinner_pattern = [
|
spinner_pattern = [
|
||||||
"⠋",
|
"⠋",
|
||||||
@@ -71,6 +72,7 @@ def print_help():
|
|||||||
print(" --local-sdk Use SDK specified by environment variable TACTILITY_SDK_PATH")
|
print(" --local-sdk Use SDK specified by environment variable TACTILITY_SDK_PATH")
|
||||||
print(" --skip-build Run everything except the idf.py/CMake commands")
|
print(" --skip-build Run everything except the idf.py/CMake commands")
|
||||||
print(" --verbose Show extra console output")
|
print(" --verbose Show extra console output")
|
||||||
|
print(" --no-animations Disable animations during building (e.g. for CI jobs)")
|
||||||
|
|
||||||
# region Core
|
# region Core
|
||||||
|
|
||||||
@@ -319,13 +321,17 @@ def build_all(version, platforms, skip_build):
|
|||||||
break
|
break
|
||||||
|
|
||||||
def wait_for_build(process, platform):
|
def wait_for_build(process, platform):
|
||||||
|
global no_animations
|
||||||
buffer = []
|
buffer = []
|
||||||
os.set_blocking(process.stdout.fileno(), False)
|
os.set_blocking(process.stdout.fileno(), False)
|
||||||
|
if no_animations:
|
||||||
|
print(f"Building for {platform}")
|
||||||
while process.poll() is None:
|
while process.poll() is None:
|
||||||
for i in spinner_pattern:
|
for i in spinner_pattern:
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
progress_text = f"Building for {platform} {shell_color_cyan}" + str(i) + shell_color_reset
|
if not no_animations:
|
||||||
sys.stdout.write(progress_text + "\r")
|
progress_text = f"Building for {platform} {shell_color_cyan}" + str(i) + shell_color_reset
|
||||||
|
sys.stdout.write(progress_text + "\r")
|
||||||
while True:
|
while True:
|
||||||
line = process.stdout.readline()
|
line = process.stdout.readline()
|
||||||
decoded_line = line.decode("UTF-8")
|
decoded_line = line.decode("UTF-8")
|
||||||
@@ -562,10 +568,21 @@ if __name__ == "__main__":
|
|||||||
if len(sys.argv) == 1:
|
if len(sys.argv) == 1:
|
||||||
print_help()
|
print_help()
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
if "--verbose" in sys.argv:
|
||||||
|
verbose = True
|
||||||
|
sys.argv.remove("--verbose")
|
||||||
|
skip_build = False
|
||||||
|
if "--skip-build" in sys.argv:
|
||||||
|
skip_build = True
|
||||||
|
sys.argv.remove("--skip-build")
|
||||||
|
if "--local-sdk" in sys.argv:
|
||||||
|
use_local_sdk = True
|
||||||
|
sys.argv.remove("--local-sdk")
|
||||||
|
if "--no-animations" in sys.argv:
|
||||||
|
no_animations = True
|
||||||
|
sys.argv.remove("--no-animations")
|
||||||
action_arg = sys.argv[1]
|
action_arg = sys.argv[1]
|
||||||
verbose = "--verbose" in sys.argv
|
|
||||||
skip_build = "--skip-build" in sys.argv
|
|
||||||
use_local_sdk = "--local-sdk" in sys.argv
|
|
||||||
# Environment setup
|
# Environment setup
|
||||||
setup_environment()
|
setup_environment()
|
||||||
if not os.path.isfile("manifest.properties"):
|
if not os.path.isfile("manifest.properties"):
|
||||||
|
|||||||
@@ -14,13 +14,14 @@ import shutil
|
|||||||
import configparser
|
import configparser
|
||||||
|
|
||||||
ttbuild_path = ".tactility"
|
ttbuild_path = ".tactility"
|
||||||
ttbuild_version = "2.2.0"
|
ttbuild_version = "2.3.0"
|
||||||
ttbuild_cdn = "https://cdn.tactility.one"
|
ttbuild_cdn = "https://cdn.tactility.one"
|
||||||
ttbuild_sdk_json_validity = 3600 # seconds
|
ttbuild_sdk_json_validity = 3600 # seconds
|
||||||
ttport = 6666
|
ttport = 6666
|
||||||
verbose = False
|
verbose = False
|
||||||
use_local_sdk = False
|
use_local_sdk = False
|
||||||
valid_platforms = ["esp32", "esp32s3"]
|
valid_platforms = ["esp32", "esp32s3"]
|
||||||
|
no_anmimations = False
|
||||||
|
|
||||||
spinner_pattern = [
|
spinner_pattern = [
|
||||||
"⠋",
|
"⠋",
|
||||||
@@ -71,6 +72,7 @@ def print_help():
|
|||||||
print(" --local-sdk Use SDK specified by environment variable TACTILITY_SDK_PATH")
|
print(" --local-sdk Use SDK specified by environment variable TACTILITY_SDK_PATH")
|
||||||
print(" --skip-build Run everything except the idf.py/CMake commands")
|
print(" --skip-build Run everything except the idf.py/CMake commands")
|
||||||
print(" --verbose Show extra console output")
|
print(" --verbose Show extra console output")
|
||||||
|
print(" --no-animations Disable animations during building (e.g. for CI jobs)")
|
||||||
|
|
||||||
# region Core
|
# region Core
|
||||||
|
|
||||||
@@ -319,13 +321,17 @@ def build_all(version, platforms, skip_build):
|
|||||||
break
|
break
|
||||||
|
|
||||||
def wait_for_build(process, platform):
|
def wait_for_build(process, platform):
|
||||||
|
global no_animations
|
||||||
buffer = []
|
buffer = []
|
||||||
os.set_blocking(process.stdout.fileno(), False)
|
os.set_blocking(process.stdout.fileno(), False)
|
||||||
|
if no_animations:
|
||||||
|
print(f"Building for {platform}")
|
||||||
while process.poll() is None:
|
while process.poll() is None:
|
||||||
for i in spinner_pattern:
|
for i in spinner_pattern:
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
progress_text = f"Building for {platform} {shell_color_cyan}" + str(i) + shell_color_reset
|
if not no_animations:
|
||||||
sys.stdout.write(progress_text + "\r")
|
progress_text = f"Building for {platform} {shell_color_cyan}" + str(i) + shell_color_reset
|
||||||
|
sys.stdout.write(progress_text + "\r")
|
||||||
while True:
|
while True:
|
||||||
line = process.stdout.readline()
|
line = process.stdout.readline()
|
||||||
decoded_line = line.decode("UTF-8")
|
decoded_line = line.decode("UTF-8")
|
||||||
@@ -562,10 +568,21 @@ if __name__ == "__main__":
|
|||||||
if len(sys.argv) == 1:
|
if len(sys.argv) == 1:
|
||||||
print_help()
|
print_help()
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
if "--verbose" in sys.argv:
|
||||||
|
verbose = True
|
||||||
|
sys.argv.remove("--verbose")
|
||||||
|
skip_build = False
|
||||||
|
if "--skip-build" in sys.argv:
|
||||||
|
skip_build = True
|
||||||
|
sys.argv.remove("--skip-build")
|
||||||
|
if "--local-sdk" in sys.argv:
|
||||||
|
use_local_sdk = True
|
||||||
|
sys.argv.remove("--local-sdk")
|
||||||
|
if "--no-animations" in sys.argv:
|
||||||
|
no_animations = True
|
||||||
|
sys.argv.remove("--no-animations")
|
||||||
action_arg = sys.argv[1]
|
action_arg = sys.argv[1]
|
||||||
verbose = "--verbose" in sys.argv
|
|
||||||
skip_build = "--skip-build" in sys.argv
|
|
||||||
use_local_sdk = "--local-sdk" in sys.argv
|
|
||||||
# Environment setup
|
# Environment setup
|
||||||
setup_environment()
|
setup_environment()
|
||||||
if not os.path.isfile("manifest.properties"):
|
if not os.path.isfile("manifest.properties"):
|
||||||
|
|||||||
@@ -14,13 +14,14 @@ import shutil
|
|||||||
import configparser
|
import configparser
|
||||||
|
|
||||||
ttbuild_path = ".tactility"
|
ttbuild_path = ".tactility"
|
||||||
ttbuild_version = "2.2.0"
|
ttbuild_version = "2.3.0"
|
||||||
ttbuild_cdn = "https://cdn.tactility.one"
|
ttbuild_cdn = "https://cdn.tactility.one"
|
||||||
ttbuild_sdk_json_validity = 3600 # seconds
|
ttbuild_sdk_json_validity = 3600 # seconds
|
||||||
ttport = 6666
|
ttport = 6666
|
||||||
verbose = False
|
verbose = False
|
||||||
use_local_sdk = False
|
use_local_sdk = False
|
||||||
valid_platforms = ["esp32", "esp32s3"]
|
valid_platforms = ["esp32", "esp32s3"]
|
||||||
|
no_anmimations = False
|
||||||
|
|
||||||
spinner_pattern = [
|
spinner_pattern = [
|
||||||
"⠋",
|
"⠋",
|
||||||
@@ -71,6 +72,7 @@ def print_help():
|
|||||||
print(" --local-sdk Use SDK specified by environment variable TACTILITY_SDK_PATH")
|
print(" --local-sdk Use SDK specified by environment variable TACTILITY_SDK_PATH")
|
||||||
print(" --skip-build Run everything except the idf.py/CMake commands")
|
print(" --skip-build Run everything except the idf.py/CMake commands")
|
||||||
print(" --verbose Show extra console output")
|
print(" --verbose Show extra console output")
|
||||||
|
print(" --no-animations Disable animations during building (e.g. for CI jobs)")
|
||||||
|
|
||||||
# region Core
|
# region Core
|
||||||
|
|
||||||
@@ -319,13 +321,17 @@ def build_all(version, platforms, skip_build):
|
|||||||
break
|
break
|
||||||
|
|
||||||
def wait_for_build(process, platform):
|
def wait_for_build(process, platform):
|
||||||
|
global no_animations
|
||||||
buffer = []
|
buffer = []
|
||||||
os.set_blocking(process.stdout.fileno(), False)
|
os.set_blocking(process.stdout.fileno(), False)
|
||||||
|
if no_animations:
|
||||||
|
print(f"Building for {platform}")
|
||||||
while process.poll() is None:
|
while process.poll() is None:
|
||||||
for i in spinner_pattern:
|
for i in spinner_pattern:
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
progress_text = f"Building for {platform} {shell_color_cyan}" + str(i) + shell_color_reset
|
if not no_animations:
|
||||||
sys.stdout.write(progress_text + "\r")
|
progress_text = f"Building for {platform} {shell_color_cyan}" + str(i) + shell_color_reset
|
||||||
|
sys.stdout.write(progress_text + "\r")
|
||||||
while True:
|
while True:
|
||||||
line = process.stdout.readline()
|
line = process.stdout.readline()
|
||||||
decoded_line = line.decode("UTF-8")
|
decoded_line = line.decode("UTF-8")
|
||||||
@@ -562,10 +568,21 @@ if __name__ == "__main__":
|
|||||||
if len(sys.argv) == 1:
|
if len(sys.argv) == 1:
|
||||||
print_help()
|
print_help()
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
if "--verbose" in sys.argv:
|
||||||
|
verbose = True
|
||||||
|
sys.argv.remove("--verbose")
|
||||||
|
skip_build = False
|
||||||
|
if "--skip-build" in sys.argv:
|
||||||
|
skip_build = True
|
||||||
|
sys.argv.remove("--skip-build")
|
||||||
|
if "--local-sdk" in sys.argv:
|
||||||
|
use_local_sdk = True
|
||||||
|
sys.argv.remove("--local-sdk")
|
||||||
|
if "--no-animations" in sys.argv:
|
||||||
|
no_animations = True
|
||||||
|
sys.argv.remove("--no-animations")
|
||||||
action_arg = sys.argv[1]
|
action_arg = sys.argv[1]
|
||||||
verbose = "--verbose" in sys.argv
|
|
||||||
skip_build = "--skip-build" in sys.argv
|
|
||||||
use_local_sdk = "--local-sdk" in sys.argv
|
|
||||||
# Environment setup
|
# Environment setup
|
||||||
setup_environment()
|
setup_environment()
|
||||||
if not os.path.isfile("manifest.properties"):
|
if not os.path.isfile("manifest.properties"):
|
||||||
|
|||||||
Reference in New Issue
Block a user