From c88bc62ff900a3c2d67c985381520e0b70528140 Mon Sep 17 00:00:00 2001 From: "azure-pipelines[bot]" Date: Tue, 11 Sep 2018 05:53:14 +0000 Subject: [PATCH 01/12] Set up CI with Azure Pipelines --- azure-pipelines.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..722a36312d --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,18 @@ +# Node.js +# Build a general Node.js application with npm. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/vsts/pipelines/languages/javascript + +pool: + vmImage: 'Ubuntu 16.04' + +steps: +- task: NodeTool@0 + inputs: + versionSpec: '8.x' + displayName: 'Install Node.js' + +- script: | + npm install + npm run build + displayName: 'npm install and build' From 3a97dbecde99ad7c5c784ca88c6830b97fc14464 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 10 Sep 2018 23:01:18 -0700 Subject: [PATCH 02/12] Add more platforms, build out script --- azure-pipelines.yml | 75 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 64 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 722a36312d..f9d41638e6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,16 +3,69 @@ # Add steps that analyze code, save build artifacts, deploy, and more: # https://docs.microsoft.com/vsts/pipelines/languages/javascript -pool: - vmImage: 'Ubuntu 16.04' +jobs: +- job: Linux + pool: + vmImage: 'ubuntu-16.04' + steps: + - task: NodeTool@0 + inputs: + versionSpec: '8.x' + displayName: 'Install Node.js' + - script: | + yarn install + displayName: 'Install yarn dependencies' + - script: | + yarn tsc + displayName: 'Build' + - script: | + yarn mocha + displayName: 'Test' + - script: | + yarn lint + displayName: 'Lint' + - script: | + yarn test-coverage + displayName: 'Generate and publish coverage' -steps: -- task: NodeTool@0 - inputs: - versionSpec: '8.x' - displayName: 'Install Node.js' +- job: macOS + pool: + vmImage: 'xcode9-macos10.13' + steps: + - task: NodeTool@0 + inputs: + versionSpec: '8.x' + displayName: 'Install Node.js' + - script: | + yarn install + displayName: 'Install yarn dependencies' + - script: | + yarn tsc + displayName: 'Build' + - script: | + yarn mocha + displayName: 'Test' + - script: | + yarn lint + displayName: 'Lint' -- script: | - npm install - npm run build - displayName: 'npm install and build' +- job: Windows + pool: + vmImage: 'vs2017-win2016' + steps: + - task: NodeTool@0 + inputs: + versionSpec: '8.x' + displayName: 'Install Node.js' + - script: | + yarn install + displayName: 'Install yarn dependencies' + - script: | + yarn tsc + displayName: 'Build' + - script: | + yarn mocha + displayName: 'Test' + - script: | + yarn lint + displayName: 'Lint' From 0446cf3aee71fd2f20010d7f1e4d399e9d9c5286 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 10 Sep 2018 23:04:33 -0700 Subject: [PATCH 03/12] Install yarn manually on Linux --- azure-pipelines.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f9d41638e6..c4bdbc69bd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,9 +12,15 @@ jobs: inputs: versionSpec: '8.x' displayName: 'Install Node.js' + - script: | + curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - + echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + sudo apt-get update && sudo apt-get install yarn + sudo apt-get install --no-install-recommends yarn + displayName: 'Install yarn' - script: | yarn install - displayName: 'Install yarn dependencies' + displayName: 'Install npm dependencies' - script: | yarn tsc displayName: 'Build' From 5909885d43512f362c5819481619caf7206e90cf Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 10 Sep 2018 23:10:42 -0700 Subject: [PATCH 04/12] Download and install yarn directly from deb --- azure-pipelines.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c4bdbc69bd..8c16d59c23 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,10 +13,8 @@ jobs: versionSpec: '8.x' displayName: 'Install Node.js' - script: | - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - sudo apt-get update && sudo apt-get install yarn - sudo apt-get install --no-install-recommends yarn + curl -sLO https://github.com/yarnpkg/yarn/releases/download/v1.10.0/yarn_1.10.0_all.deb + sudo dpkg -i yarn_1.10.0_all.deb displayName: 'Install yarn' - script: | yarn install From dade9ba0501458eed46b17fec870dfbb61a7c300 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 10 Sep 2018 23:17:03 -0700 Subject: [PATCH 05/12] Simplify steps --- azure-pipelines.yml | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8c16d59c23..b0bc32f724 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,11 +17,8 @@ jobs: sudo dpkg -i yarn_1.10.0_all.deb displayName: 'Install yarn' - script: | - yarn install - displayName: 'Install npm dependencies' - - script: | - yarn tsc - displayName: 'Build' + yarn + displayName: 'Install dependencies and build' - script: | yarn mocha displayName: 'Test' @@ -41,11 +38,8 @@ jobs: versionSpec: '8.x' displayName: 'Install Node.js' - script: | - yarn install - displayName: 'Install yarn dependencies' - - script: | - yarn tsc - displayName: 'Build' + yarn + displayName: 'Install dependencies and build' - script: | yarn mocha displayName: 'Test' @@ -62,11 +56,8 @@ jobs: versionSpec: '8.x' displayName: 'Install Node.js' - script: | - yarn install - displayName: 'Install yarn dependencies' - - script: | - yarn tsc - displayName: 'Build' + yarn + displayName: 'Install dependencies and build' - script: | yarn mocha displayName: 'Test' From 5d37a173830c165aa7fb2de508e7b981a6521059 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 10 Sep 2018 23:49:52 -0700 Subject: [PATCH 06/12] Install latest yarn with install script Avoids dpkg lock flakes --- azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b0bc32f724..a9ce66f57c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,8 +13,7 @@ jobs: versionSpec: '8.x' displayName: 'Install Node.js' - script: | - curl -sLO https://github.com/yarnpkg/yarn/releases/download/v1.10.0/yarn_1.10.0_all.deb - sudo dpkg -i yarn_1.10.0_all.deb + curl -o- -L https://yarnpkg.com/install.sh | bash displayName: 'Install yarn' - script: | yarn From 6ebf17bf04338cba7bff5ab50a1597c6a28ff221 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 10 Sep 2018 23:53:45 -0700 Subject: [PATCH 07/12] Export yarn path --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a9ce66f57c..54a9b08c9d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,6 +14,7 @@ jobs: displayName: 'Install Node.js' - script: | curl -o- -L https://yarnpkg.com/install.sh | bash + export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" displayName: 'Install yarn' - script: | yarn From 35483b3bf418ccb280eaeaeb27767d326263d8cb Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 11 Sep 2018 00:00:33 -0700 Subject: [PATCH 08/12] Source bashrc after yarn install --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 54a9b08c9d..dba7bf05be 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,7 +14,7 @@ jobs: displayName: 'Install Node.js' - script: | curl -o- -L https://yarnpkg.com/install.sh | bash - export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" + . ~/.bashrc displayName: 'Install yarn' - script: | yarn From 07b5bd0b64a7402259c528bd124ef0bd5c4d9169 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 11 Sep 2018 00:04:27 -0700 Subject: [PATCH 09/12] Echo path --- azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index dba7bf05be..7d444136e9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,7 +14,8 @@ jobs: displayName: 'Install Node.js' - script: | curl -o- -L https://yarnpkg.com/install.sh | bash - . ~/.bashrc + echo 'PATH' + echo $PATH displayName: 'Install yarn' - script: | yarn From d23c65d1db0c60c5bb9804828bbf734837d10819 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 11 Sep 2018 00:09:36 -0700 Subject: [PATCH 10/12] Symlink yarn to /usr/bin --- azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7d444136e9..7b68fcb26c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,8 +14,7 @@ jobs: displayName: 'Install Node.js' - script: | curl -o- -L https://yarnpkg.com/install.sh | bash - echo 'PATH' - echo $PATH + ln -s $HOME/.yarn/bin/yarn /usr/bin/yarn displayName: 'Install yarn' - script: | yarn From e03c93fb818008e01a7507e43c15277525b156fc Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 11 Sep 2018 00:19:42 -0700 Subject: [PATCH 11/12] Install yarn using installer task --- azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7b68fcb26c..4ab162c82d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,10 +12,10 @@ jobs: inputs: versionSpec: '8.x' displayName: 'Install Node.js' - - script: | - curl -o- -L https://yarnpkg.com/install.sh | bash - ln -s $HOME/.yarn/bin/yarn /usr/bin/yarn - displayName: 'Install yarn' + - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 + inputs: + versionSpec: "1.9.4" + displayName: 'Install Yarn' - script: | yarn displayName: 'Install dependencies and build' From 1edc732c555bb940482a486e73c7f6f9bde1447d Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 11 Sep 2018 11:34:47 -0700 Subject: [PATCH 12/12] Use new Azure Pipelines badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 583faf7fac..d4e9c5463f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # [![xterm.js logo](logo-full.png)](https://xtermjs.org) -[![VSTS Build status](https://xtermjs.visualstudio.com/_apis/public/build/definitions/3e323cf7-5760-460d-af64-ee5675baf366/1/badge)](https://xtermjs.visualstudio.com/xterm.js/_build/index?definitionId=1) +[![Build Status](https://xtermjs.visualstudio.com/xterm.js/_apis/build/status/xtermjs.xterm.js)](https://xtermjs.visualstudio.com/xterm.js/_build/latest?definitionId=3) [![Coverage Status](https://coveralls.io/repos/github/xtermjs/xterm.js/badge.svg?branch=master)](https://coveralls.io/github/xtermjs/xterm.js?branch=master) [![Gitter](https://badges.gitter.im/sourcelair/xterm.js.svg)](https://gitter.im/sourcelair/xterm.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/xterm/badge?style=rounded)](https://www.jsdelivr.com/package/npm/xterm)