Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update analogous to capa repo, removing Python 3.8 #947

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/scripts/create_releases.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import logging
import subprocess
import collections
from typing import Dict, Tuple
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter

GIT_EXE = "git"
Expand All @@ -23,7 +22,7 @@
logger = logging.getLogger(__name__)


def run_cmd(cmd: str) -> Tuple[str, str]:
def run_cmd(cmd: str) -> tuple[str, str]:
logger.debug("cmd: %s", cmd)
p = subprocess.Popen(cmd.split(" "), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out_, err_ = p.communicate()
Expand All @@ -34,7 +33,7 @@ def run_cmd(cmd: str) -> Tuple[str, str]:
return out, err


def get_diffs(cpath1: str, cpath2: str, percentage: str) -> Dict[str, list]:
def get_diffs(cpath1: str, cpath2: str, percentage: str) -> dict[str, list]:
cmd = f"{GIT_EXE} --no-pager diff --find-renames={percentage} --name-status {cpath1} {cpath2}"
gdiff, err = run_cmd(cmd)
# example output:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:

create_release:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
permissions:
contents: write
steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches: [ master ]
jobs:
update_num_rules:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout capa-rules
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -23,7 +23,7 @@ jobs:
color: blue

sync_submodule_capa:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs: update_num_rules
steps:
# Do not checkout submodules as we don't need capa-testfiles and we need to
Expand All @@ -50,10 +50,10 @@ jobs:
- name: Get modified files
id: files
uses: Ana06/get-changed-files@25f79e676e7ea1868813e21465014798211fad8c # v2.3.0
- name: Set up Python 3.9
- name: Set up Python 3.12
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: 3.9
python-version: 3.12
- name: Install Python dependencies
run:
pip install pyyaml
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ env:

jobs:
rule_linter:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
# expect this text in the PR body to trigger thorough lint of all rules
LINT_THOROUGH: '[x] lint thorough all'
Expand All @@ -43,10 +43,10 @@ jobs:
repository: mandiant/capa-testfiles
path: tests/data
# use latest available python for best performance
- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: 3.11
python-version: 3.12
- name: Install capa
run: pip install -e .
# Regular lint is fast, so do this first
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
rules_latest_release:
# e.g. v4
if: startsWith(github.base_ref, 'v')
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Get latest release executable name and version
run: |
Expand Down
Loading