Skip to content

Commit

Permalink
Merge pull request runbox#4 from runbox/tadzik/new-folder-count-api
Browse files Browse the repository at this point in the history
Add a dedicated function for calculating folder counts
  • Loading branch information
tadzik authored Aug 12, 2020
2 parents f9f5a1d + f6b3361 commit 83a0499
Show file tree
Hide file tree
Showing 21 changed files with 1,742 additions and 403 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ build
node_modules
xapianasm.*
.vscode
dist
dist
/xapian/
/emsdk/
19 changes: 7 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ os: linux
addons:
apt:
packages:
- build-essential
- doxygen
- graphviz
- help2man
Expand All @@ -15,16 +16,10 @@ services:
- docker
before_script:
# Bootstrap only xapian-core for emscripten build.
- git clone https://github.com/xapian/xapian
- cd xapian
- ./bootstrap xapian-core
- ./configure CXXFLAGS=-O0 --disable-backend-honey --disable-backend-inmemory --disable-backend-remote
- make -j2
- make -j2 distclean
- cd xapian-core
- docker run -v $(pwd):/src trzeci/emscripten emconfigure ./configure CPPFLAGS='-DFLINTLOCK_USE_FLOCK' CXXFLAGS='-Oz -s USE_ZLIB=1 -fno-rtti' --disable-backend-honey --disable-backend-inmemory --disable-shared --disable-backend-remote
- docker run -v $(pwd):/src trzeci/emscripten emmake make
- cd ../..
- ./setup-emsdk.sh
- source ./emsdk/emsdk_env.sh
- ./build-xapian.sh
script:
- docker run -v $(pwd):/src trzeci/emscripten node compilermmxapianapi.js --xapiandir=xapian/xapian-core
- npm run test-no-watch
- source ./emsdk/emsdk_env.sh
- node compilermmxapianapi.js --xapiandir=xapian/xapian-core
- npm run test-no-watch
14 changes: 14 additions & 0 deletions build-xapian.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
THREADS=${THREADS:-2}

git clone https://github.com/xapian/xapian
cd xapian
git checkout v1.4.16
./bootstrap xapian-core
./configure CXXFLAGS=-O0 --disable-backend-honey --disable-backend-inmemory --disable-backend-remote
make -j$THREADS
make -j$THREADS distclean
cd xapian-core
emconfigure ./configure CPPFLAGS='-DFLINTLOCK_USE_FLOCK' CXXFLAGS='-Oz -s USE_ZLIB=1 -fno-rtti' --disable-backend-honey --disable-backend-inmemory --disable-shared --disable-backend-remote
emmake make -j$THREADS
cd ../..
4 changes: 2 additions & 2 deletions compilermmxapianapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ if(!process.env.XAPIAN) {
execSync(`em++ -Oz -s DISABLE_EXCEPTION_CATCHING=0 -s USE_ZLIB=1 ` +
`-s "EXTRA_EXPORTED_RUNTIME_METHODS=['FS','cwrap','stringToUTF8','UTF8ToString','getValue']" ` +
`-std=c++11 -s DEMANGLE_SUPPORT=1 -s ALLOW_MEMORY_GROWTH=1 ` +
`-I$XAPIAN/include -I$XAPIAN -I$XAPIAN/common rmmxapianapi.cc $XAPIAN/.libs/libxapian-1.5.a ` +
`-o dist/xapianasm.js`, { stdio: 'inherit' });
`-I$XAPIAN/include -I$XAPIAN -I$XAPIAN/common rmmxapianapi.cc $XAPIAN/.libs/libxapian.a ` +
`-o dist/xapianasm.js -lidbfs.js`, { stdio: 'inherit' });
console.log('Successful build of xapianasm.wasm and xapianasm.js');
} catch(e) {
console.error('Compile failed');
Expand Down
Loading

0 comments on commit 83a0499

Please sign in to comment.