Skip to content
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
21 changes: 11 additions & 10 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
Blint-GNU-Build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -18,23 +18,23 @@ jobs:
id: poetry
run: |
python3 -m pip install --upgrade pip
python3 -m pip install poetry
python3 -m pip install setuptools pyinstaller poetry
cd blint
python -m poetry install
wget https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-amd64_linux.tar.xz
tar -xvf upx-4.0.2-amd64_linux.tar.xz
mkdir -p ~/.local/bin
cp upx-4.0.2-amd64_linux/upx ~/.local/bin/
poetry config virtualenvs.create false
poetry install --no-cache
- name: Binary gnu build
run: |
cd blint
python -m poetry run pyinstaller blint/cli.py --noconfirm --log-level=WARN \
pyinstaller blint/cli.py --noconfirm --log-level=WARN \
--nowindow \
--onefile \
--name blint \
--collect-all blint \
--upx-dir ~/.local/bin/
--add-data="blint/data:blint/data" \
--add-data="blint/data/annotations:blint/data/annotations" \
--collect-submodules blint \
--noupx
./dist/blint -i dist/blint -o /tmp/reports
sha256sum ./dist/blint > ./dist/blint.sha256
env:
PYTHONIOENCODING: utf-8
LANG: en_US.utf-8
Expand All @@ -48,3 +48,4 @@ jobs:
with:
files: |
blint/dist/blint
blint/dist/blint.sha256
12 changes: 8 additions & 4 deletions .github/workflows/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,22 @@ jobs:
- name: Install poetry
id: poetry
run: |
python -m pip install twine setuptools wheel poetry
python -m pip install --upgrade pip
python -m pip install setuptools pyinstaller tzdata poetry
cd blint
python -m poetry install

poetry config virtualenvs.create false
poetry install --no-cache --without dev
- name: Binary windows build
run: |
cd blint
python -m poetry run pyinstaller blint/cli.py --noconfirm --log-level=WARN --nowindow --onefile --name blint --collect-all blint --disable-windowed-traceback -i blint.ico --version-file=file_version_info.txt
pyinstaller blint/cli.py --noconfirm --log-level=WARN --nowindow --onefile --name blint --add-data="blint/data;blint/data" --add-data="blint/data/annotations;blint/data/annotations" --collect-submodules blint --disable-windowed-traceback -i blint.ico --version-file=file_version_info.txt --noupx
(Get-FileHash .\dist\blint.exe).hash | Out-File -FilePath .\dist\blint.exe.sha256
set PYTHONIOENCODING=UTF-8
.\dist\blint.exe -i .\dist\blint.exe -o reports --no-banner
env:
PYTHONIOENCODING: utf-8
LANG: en_US.utf-8
PYTHONUTF8: 1
- uses: actions/upload-artifact@v1
with:
path: blint/dist
Expand All @@ -40,3 +43,4 @@ jobs:
with:
files: |
blint/dist/blint.exe
blint/dist/blint.exe.sha256
7 changes: 5 additions & 2 deletions blint/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@

review_files = []
if HAVE_RESOURCE_READER:
review_methods_dir = importlib.resources.contents("blint.data.annotations")
review_files = [rf for rf in review_methods_dir if rf.endswith(".yml")]
try:
review_methods_dir = importlib.resources.contents("blint.data.annotations")
review_files = [rf for rf in review_methods_dir if rf.endswith(".yml")]
except Exception:
pass
else:
review_methods_dir = Path(__file__).parent / "data" / "annotations"
review_files = [p.as_posix() for p in Path(review_methods_dir).rglob("*.yml")]
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ blint = 'blint.cli:main'
[tool.poetry.dependencies]
python = ">=3.7,<3.12"
lief = "^0.12.3"
rich = "^13.3.5"
rich = "^13.4.1"
PyYAML = "^6.0"
defusedxml = "^0.7.1"

Expand Down