From 85b4232b35a36f04c5cc9096f6844778aeb9ff41 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 21 Dec 2023 21:46:42 -0800 Subject: [PATCH 1/2] pre-commit: autoupdate hooks (#1782) Update pre-commit hook versions Co-authored-by: adeebshihadeh --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d1c1dda9d3..6b2a287323 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,6 +15,6 @@ repos: additional_dependencies: ['git+https://github.com/numpy/numpy-stubs', 'types-requests', 'types-atomicwrites', 'types-pycurl'] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.7 + rev: v0.1.8 hooks: - id: ruff From 114b85a649341d55d6beb36d7414eda5e6d324a2 Mon Sep 17 00:00:00 2001 From: Hoang Bui <47828508+bongbui321@users.noreply.github.com> Date: Fri, 22 Dec 2023 13:16:09 -0500 Subject: [PATCH 2/2] CI: Translate abspath to relpath for build. (#1783) relpath sconscript --- SConscript | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SConscript b/SConscript index 957016da2a..0aa3aa34eb 100644 --- a/SConscript +++ b/SConscript @@ -7,7 +7,7 @@ BUILDER = "DEV" common_flags = [] -panda_root = Dir('.').abspath +panda_root = Dir('.') if os.getenv("RELEASE"): BUILD_TYPE = "RELEASE" @@ -16,7 +16,7 @@ if os.getenv("RELEASE"): assert os.path.exists(cert_fn), 'Certificate file not found. Please specify absolute path' else: BUILD_TYPE = "DEBUG" - cert_fn = File("./certs/debug").srcnode().abspath + cert_fn = File("./certs/debug").srcnode().relpath common_flags += ["-DALLOW_DEBUG"] if os.getenv("DEBUG"): @@ -35,7 +35,7 @@ def get_version(builder, build_type): def get_key_header(name): from Crypto.PublicKey import RSA - public_fn = File(f'./certs/{name}.pub').srcnode().abspath + public_fn = File(f'./certs/{name}.pub').srcnode().get_path() with open(public_fn) as f: rsa = RSA.importKey(f.read()) assert(rsa.size_in_bits() == 1024) @@ -63,7 +63,7 @@ def to_c_uint32(x): def build_project(project_name, project, extra_flags): - linkerscript_fn = File(project["LINKER_SCRIPT"]).srcnode().abspath + linkerscript_fn = File(project["LINKER_SCRIPT"]).srcnode().relpath flags = project["PROJECT_FLAGS"] + extra_flags + common_flags + [ "-Wall", @@ -123,7 +123,7 @@ def build_project(project_name, project, extra_flags): main_bin = env.Objcopy(f"obj/{project_name}.bin", main_elf) # Sign main - sign_py = File(f"{panda_root}/crypto/sign.py").srcnode().abspath + sign_py = File(f"{panda_root}/crypto/sign.py").srcnode().relpath env.Command(f"obj/{project_name}.bin.signed", main_bin, f"SETLEN=1 {sign_py} $SOURCE $TARGET {cert_fn}")