mirror of
https://github.com/mandiant/capa.git
synced 2026-01-21 08:53:27 -08:00
Merge pull request #123 from fireeye/fix-113
move CI files into .github directory
This commit is contained in:
0
ci/logo.ico → .github/pyinstaller/logo.ico
vendored
0
ci/logo.ico → .github/pyinstaller/logo.ico
vendored
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 137 KiB |
0
ci/logo.png → .github/pyinstaller/logo.png
vendored
0
ci/logo.png → .github/pyinstaller/logo.png
vendored
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
@@ -5,16 +5,25 @@ import subprocess
|
||||
import wcwidth
|
||||
|
||||
|
||||
# when invoking pyinstaller from the project root,
|
||||
# this gets run from the project root.
|
||||
with open('./capa/version.py', 'wb') as f:
|
||||
f.write("__version__ = '%s'"
|
||||
% subprocess.check_output(["git", "describe", "--always"]).strip())
|
||||
|
||||
a = Analysis(
|
||||
['../capa/main.py'],
|
||||
# when invoking pyinstaller from the project root,
|
||||
# this gets invoked from the directory of the spec file,
|
||||
# i.e. ./.github/pyinstaller
|
||||
['../../capa/main.py'],
|
||||
pathex=['capa'],
|
||||
binaries=None,
|
||||
datas=[
|
||||
('../rules', 'rules'),
|
||||
# when invoking pyinstaller from the project root,
|
||||
# this gets invoked from the directory of the spec file,
|
||||
# i.e. ./.github/pyinstaller
|
||||
('../../rules', 'rules'),
|
||||
|
||||
# capa.render.default uses tabulate that depends on wcwidth.
|
||||
# it seems wcwidth uses a json file `version.json`
|
||||
# and this doesn't get picked up by pyinstaller automatically.
|
||||
@@ -144,7 +153,9 @@ a = Analysis(
|
||||
"vstruct.defs.windows.win_6_3_wow64",
|
||||
"vstruct.defs.windows.win_6_3_wow64.ntdll",
|
||||
],
|
||||
hookspath=['ci/hooks'],
|
||||
# when invoking pyinstaller from the project root,
|
||||
# this gets run from the project root.
|
||||
hookspath=['.github/pyinstaller/hooks'],
|
||||
runtime_hooks=None,
|
||||
excludes=[
|
||||
# ignore packages that would otherwise be bundled with the .exe.
|
||||
0
ci/tox.ini → .github/tox.ini
vendored
0
ci/tox.ini → .github/tox.ini
vendored
@@ -7,7 +7,6 @@ import capa.features.extractors.ida.file
|
||||
import capa.features.extractors.ida.insn
|
||||
import capa.features.extractors.ida.function
|
||||
import capa.features.extractors.ida.basicblock
|
||||
|
||||
from capa.features.extractors import FeatureExtractor
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import struct
|
||||
import idaapi
|
||||
|
||||
import capa.features.extractors.ida.helpers
|
||||
|
||||
from capa.features import Characteristic
|
||||
from capa.features.basicblock import BasicBlock
|
||||
from capa.features.extractors.ida import helpers
|
||||
|
||||
@@ -7,7 +7,6 @@ import idautils
|
||||
import capa.features.extractors.helpers
|
||||
import capa.features.extractors.strings
|
||||
import capa.features.extractors.ida.helpers
|
||||
|
||||
from capa.features import String, Characteristic
|
||||
from capa.features.file import Export, Import, Section
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ import idaapi
|
||||
import idautils
|
||||
|
||||
import capa.features.extractors.ida.helpers
|
||||
|
||||
from capa.features import Characteristic
|
||||
from capa.features.extractors import loops
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import idautils
|
||||
|
||||
import capa.features.extractors.helpers
|
||||
import capa.features.extractors.ida.helpers
|
||||
|
||||
from capa.features import MAX_BYTES_FEATURE_SIZE, Bytes, String, Characteristic
|
||||
from capa.features.insn import Number, Offset, Mnemonic
|
||||
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
import os
|
||||
import logging
|
||||
import collections
|
||||
from PyQt5 import QtGui, QtCore, QtWidgets
|
||||
|
||||
import idaapi
|
||||
from PyQt5 import QtGui, QtCore, QtWidgets
|
||||
|
||||
import capa.main
|
||||
import capa.rules
|
||||
import capa.ida.helpers
|
||||
import capa.render.utils as rutils
|
||||
import capa.features.extractors.ida
|
||||
|
||||
from capa.ida.explorer.view import CapaExplorerQtreeView
|
||||
from capa.ida.explorer.model import CapaExplorerDataModel
|
||||
from capa.ida.explorer.proxy import CapaExplorerSortFilterProxyModel
|
||||
|
||||
@@ -12,7 +12,7 @@ if [[ "$STASH_LIST" == *"$MSG"* ]]; then
|
||||
fi
|
||||
|
||||
# Run style checker and print state (it doesn't block the commit)
|
||||
pycodestyle --config=./ci/tox.ini ./capa/ > style-checker-output.log 2>&1;
|
||||
pycodestyle --config=./.github/tox.ini ./capa/ > style-checker-output.log 2>&1;
|
||||
if [ $? == 0 ]; then
|
||||
echo 'Style checker succeeds!! 💘';
|
||||
else
|
||||
|
||||
@@ -19,7 +19,7 @@ restore_stashed() {
|
||||
}
|
||||
|
||||
# Run style checker and print state
|
||||
pycodestyle --config=./ci/tox.ini ./capa/ > style-checker-output.log 2>&1;
|
||||
pycodestyle --config=./.github/tox.ini ./capa/ > style-checker-output.log 2>&1;
|
||||
if [ $? == 0 ]; then
|
||||
echo 'Style checker succeeds!! 💘';
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user