From 9288cf276246663ad379e23d74602cb99bc41caf Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Tue, 17 Apr 2018 13:37:45 +0800 Subject: [PATCH] add node-chakracore to Travis CI --- .travis.yml | 43 ++++++++++++++++++++++++++++++++----------- test/travis-ufuzz.js | 11 +++++------ 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index e199df24a96..8417f67ae61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,35 @@ -language: node_js -node_js: - - "0.10" - - "0.12" - - "4" - - "6" - - "8" -env: - - UGLIFYJS_TEST_ALL=1 +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - libstdc++-4.9-dev +cache: + directories: tmp +language: generic matrix: fast_finish: true sudo: false -cache: - directories: tmp +env: + global: + - UGLIFYJS_TEST_ALL=1 + matrix: + - NODEJS_VER=chakracore/latest + - NODEJS_VER=node/0.10 + - NODEJS_VER=node/0.12 + - NODEJS_VER=node/4 + - NODEJS_VER=node/6 + - NODEJS_VER=node/8 + - NODEJS_VER=node/latest +before_install: + - git clone --branch v1.4.2 --depth 1 https://github.com/jasongin/nvs.git ~/.nvs + - . ~/.nvs/nvs.sh + - nvs --version +install: + - nvs add $NODEJS_VER + - nvs use $NODEJS_VER + - node --version + - npm --version --no-update-notifier + - npm install --no-optional --no-save --no-update-notifier +script: + - npm test --no-update-notifier diff --git a/test/travis-ufuzz.js b/test/travis-ufuzz.js index 36d1fc18544..92268420bc1 100644 --- a/test/travis-ufuzz.js +++ b/test/travis-ufuzz.js @@ -15,6 +15,7 @@ if (process.argv[2] == "run") { var branch = process.argv[3] || "v" + require("../package.json").version; var repository = encodeURIComponent(process.argv[4] || "mishoo/UglifyJS2"); var concurrency = process.argv[5] || 1; + var platform = process.argv[6] || "node/latest"; (function request() { setTimeout(request, (period + wait) / concurrency); var options = url.parse("https://api.travis-ci.org/repo/" + repository + "/requests"); @@ -32,20 +33,18 @@ if (process.argv[2] == "run") { res.on("data", console.log); }).on("error", console.error).end(JSON.stringify({ request: { - message: "ufuzz testing (when idle)", + message: "ufuzz testing", branch: branch, config: { - merge_mode: "replace", - language: "node_js", - node_js: "9", - sudo: false, + cache: false, + env: "NODEJS_VER=" + platform, script: "node test/travis-ufuzz run" } } })); })(); } else { - console.log("Usage: test/travis-ufuzz.js [branch] [repository] [concurrency]"); + console.log("Usage: test/travis-ufuzz.js [branch] [repository] [concurrency] [platform]"); } function spawn(endTime) {