summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--appveyor.yml35
-rwxr-xr-xscripts/gen-emscripten-exported-json.py13
2 files changed, 42 insertions, 6 deletions
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 00000000..f461afc5
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,35 @@
+---
+
+init:
+ - set PATH=C:\Python27\Scripts;%PATH% # while python's bin is already in PATH, but pip.exe in Scripts\ dir isn't
+ - set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%
+
+environment:
+ DEGREE_OF_PARALLELISM: 3
+ matrix:
+ - GENERATOR: MSYS Makefiles
+ CONFIG: Release
+ PARALLEL_FLAG: -j
+ - GENERATOR: Visual Studio 14 2015
+ CONFIG: Release
+ PARALLEL_FLAG: "/m:"
+ - GENERATOR: Visual Studio 14 2015 Win64
+ CONFIG: Debug
+ PARALLEL_FLAG: "/m:"
+ - GENERATOR: Visual Studio 14 2015 Win64
+ CONFIG: Release
+ PARALLEL_FLAG: "/m:"
+
+install:
+ - pip install flake8
+
+before_build:
+ # Check the style of a subset of Python code until the other code is updated.
+ - flake8 --ignore=E111 ./scripts/
+
+build_script:
+ - cmake . -DCMAKE_BUILD_TYPE=%CONFIG% -G "%GENERATOR%"
+ - cmake --build . --config %CONFIG% -- %PARALLEL_FLAG%%DEGREE_OF_PARALLELISM%
+
+test_script:
+ - ctest --output-on-failure --timeout 10 -j 5
diff --git a/scripts/gen-emscripten-exported-json.py b/scripts/gen-emscripten-exported-json.py
index 0693ce23..f183b036 100755
--- a/scripts/gen-emscripten-exported-json.py
+++ b/scripts/gen-emscripten-exported-json.py
@@ -53,7 +53,8 @@ def ProcessFile(nm, file_):
names = []
for line in nm.RunWithArgsForStdout(file_).splitlines():
line = line.rstrip()
- if not line.lstrip(): continue
+ if not line.lstrip():
+ continue
if line.endswith(':'):
# displaying the archive name, e.g. "foo.c.o:"
continue
@@ -78,11 +79,11 @@ def main(args):
parser = argparse.ArgumentParser()
parser.add_argument('-o', '--output', metavar='PATH', help='output file.')
parser.add_argument('-v', '--verbose',
- help='print more diagnotic messages.',
- action='store_true')
+ help='print more diagnostic messages.',
+ action='store_true')
parser.add_argument('--emscripten-dir', metavar='PATH',
- help='emscripten directory',
- default=DEFAULT_EMSCRIPTEN_DIR)
+ help='emscripten directory',
+ default=DEFAULT_EMSCRIPTEN_DIR)
parser.add_argument('cmake_build_dir', metavar='cmake_build_dir')
options = parser.parse_args(args)
nm = GetNM(options.emscripten_dir)
@@ -91,7 +92,7 @@ def main(args):
for file_ in FindFiles(options.cmake_build_dir):
names.extend(ProcessFile(nm, file_))
- out_data = json.dumps(sorted(names), separators=(',\n',':\n'))
+ out_data = json.dumps(sorted(names), separators=(',\n', ':\n'))
if options.output:
with open(options.output, 'w') as out_file:
out_file.write(out_data)