diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 5eaab90..033b3f5 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -5,26 +5,34 @@ jobs: format: name: Check formatting runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + python: ['3.11', '3.12'] steps: - name: Checkout the Git repository uses: actions/checkout@v3 - name: Setup Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: ${{ matrix.python }} cache: 'pip' - name: Check formatting run: make format lint: name: Check for erroneous constructs runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + python: ['3.11', '3.12'] steps: - name: Checkout the Git repository uses: actions/checkout@v3 - name: Setup Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: ${{ matrix.python }} cache: 'pip' - name: Check for erroneous constructs run: make lint @@ -48,7 +56,7 @@ jobs: strategy: fail-fast: false matrix: - python: ['3.11'] + python: ['3.11', '3.12'] steps: - name: Checkout the Git repository uses: actions/checkout@v3 @@ -69,7 +77,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.12' cache: 'pip' - name: Nuitka cache uses: actions/cache@v3 diff --git a/toltec/hooks/patch_rm2fb.py b/toltec/hooks/patch_rm2fb.py index dd1f1ec..accc135 100644 --- a/toltec/hooks/patch_rm2fb.py +++ b/toltec/hooks/patch_rm2fb.py @@ -34,7 +34,7 @@ def post_build( # pylint: disable=too-many-locals # Search for binary objects that can be stripped binaries = [] - def filter_elfs(info: ELFFile) -> None: + def filter_elfs(info: ELFFile, file_path: str) -> None: symtab = info.get_section_by_name(".symtab") if symtab is None or info.get_machine_arch() != "ARM": return diff --git a/toltec/hooks/strip.py b/toltec/hooks/strip.py index 06dc535..7cb0e0d 100644 --- a/toltec/hooks/strip.py +++ b/toltec/hooks/strip.py @@ -30,7 +30,7 @@ def walk_elfs(src_dir: str, for_each: Callable) -> None: try: with open(file_path, "rb") as file: - for_each(ELFFile(file)) + for_each(ELFFile(file), file_path) except ELFError: # Ignore non-ELF files pass @@ -74,7 +74,7 @@ def post_build( # pylint: disable=too-many-locals,too-many-branches strip_arm: List[str] = [] strip_x86: List[str] = [] - def filter_elfs(info: ELFFile) -> None: + def filter_elfs(info: ELFFile, file_path: str) -> None: symtab = info.get_section_by_name(".symtab") if not symtab: return