Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup an actual build system #51

Closed
ISNIT0 opened this issue May 21, 2019 · 7 comments · Fixed by #103
Closed

Setup an actual build system #51

ISNIT0 opened this issue May 21, 2019 · 7 comments · Fixed by #103

Comments

@ISNIT0
Copy link
Contributor

ISNIT0 commented May 21, 2019

No description provided.

@kelson42
Copy link
Contributor

@midik I see that we have a CI running with TravisCI... not sure what is then to be done! What is tested exactly? Do you see something essential missing?

@midik
Copy link
Contributor

midik commented Mar 19, 2020

@kelson42
yes, we run build with Travis. However, I think it doesn't make sense as it currently implemented. In fact, we only run tsc checking only if index.ts is able to build, and nothing more. Since we have tslint while developing, tsc will never fail again :)
Considering this as a kind of functional test, I think we could check that all major steps (npm scripts) run without errors. For example, we could run the chain for a single language and couple of sims then dump zim file and check that content is correct somehow.

@kelson42
Copy link
Contributor

@midik This sounds good, but we can not make a full run. This would be too long. Therefore we need to make a subset, maybe only one small language?

@midik
Copy link
Contributor

midik commented Mar 19, 2020

yes, that's exactly I mean and that's how I'm testing it locally. One (or two) languages and just subset of sims (using slice())

@midik
Copy link
Contributor

midik commented Mar 19, 2020

also, we could test against running docker build, if it's meaningful for us at this point (but it would take a really long time)

@kelson42
Copy link
Contributor

Not in favour to run docker build, not so pertinent IMO.

@midik midik added the question label Mar 23, 2020
@midik
Copy link
Contributor

midik commented Apr 3, 2020

still debugging

$ npm run export -- --mulOnly
> phetscraper@1.0.0 export /home/travis/build/openzim/phet
> npm run export-prebuild && node --no-warnings --max-old-space-size=8192 node_modules/ts-node/dist/bin.js steps/export.ts "--mulOnly"
> phetscraper@1.0.0 export-prebuild /home/travis/build/openzim/phet
> npm run build && node_modules/browserify/bin/cmd.js res/js/index.js -t babelify --presets [es2015] -o res/js/dist.js
> phetscraper@1.0.0 build /home/travis/build/openzim/phet
> tsc
/home/travis/build/openzim/phet/node_modules/ts-node/src/index.ts:556
          throw new TypeError(`${relative(cwd, fileName)}: Emit skipped`)
                ^
TypeError: lib/logger.js: Emit skipped
    at getOutput (/home/travis/build/openzim/phet/node_modules/ts-node/src/index.ts:556:17)
    at Object.compile (/home/travis/build/openzim/phet/node_modules/ts-node/src/index.ts:758:32)
    at Module.m._compile (/home/travis/build/openzim/phet/node_modules/ts-node/src/index.ts:837:43)
    at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Object.require.extensions.(anonymous function) [as .js] (/home/travis/build/openzim/phet/node_modules/ts-node/src/index.ts:840:12)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phetscraper@1.0.0 export: `npm run export-prebuild && node --no-warnings --max-old-space-size=8192 node_modules/ts-node/dist/bin.js steps/export.ts "--mulOnly"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the phetscraper@1.0.0 export script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2020-04-03T00_33_54_205Z-debug.log
Done. Your build exited with 0.

@midik midik mentioned this issue Apr 3, 2020
@midik midik closed this as completed in #103 Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants