ci: fix build (#980)

* ci: fix build

* fix: newest PyInstaller version

* fix: logo path

* fix: logo path 2

* fix: logo path 3

* fix: icon another way

* fix: remove icon for now

* ci: only build after tests succeed

* ci: add workflow_run check
This commit is contained in:
Moritz
2022-04-27 15:09:58 +02:00
committed by GitHub
parent 10852a5d96
commit 9f12f069ee
3 changed files with 15 additions and 8 deletions

View File

@@ -95,7 +95,7 @@ exe = EXE(pyz,
a.datas,
exclude_binaries=False,
name='capa',
icon='logo.ico',
# TODO not working anymore for unknown reason icon='logo.ico',
debug=False,
strip=None,
upx=True,

View File

@@ -1,16 +1,22 @@
name: build
on:
push:
branches: [master]
workflow_run:
workflows: [CI]
types:
- completed
release:
types: [edited, published]
jobs:
build:
# only build on release or if tests pass
if: ${{ github.event_name == 'release' }} || ${{ github.event.workflow_run.conclusion == 'success' }}
name: PyInstaller for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
# set to false for debugging
fail-fast: true
matrix:
include:
- os: ubuntu-18.04
@@ -37,12 +43,10 @@ jobs:
run: sudo apt-get install -y libyaml-dev
- name: Upgrade pip, setuptools
run: pip install --upgrade pip setuptools
- name: Install PyInstaller
run: pip install 'pyinstaller==4.10'
- name: Install capa
run: pip install -e .
- name: Install capa with build requirements
run: pip install -e .[build]
- name: Build standalone executable
run: pyinstaller .github/pyinstaller/pyinstaller.spec
run: pyinstaller --log-level DEBUG .github/pyinstaller/pyinstaller.spec
- name: Does it run (PE)?
run: dist/capa "tests/data/Practical Malware Analysis Lab 01-01.dll_"
- name: Does it run (Shellcode)?

View File

@@ -88,6 +88,9 @@ setuptools.setup(
"types-psutil==5.8.22",
"types_requests==2.27.20",
],
"build": [
"pyinstaller==5.0",
],
},
zip_safe=False,
keywords="capa malware analysis capability detection FLARE",