From b70b5c81e8f39d534f10db445594047547eaec11 Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Thu, 29 Nov 2018 20:54:55 +0100 Subject: [PATCH 01/15] Initial build setup --- .ci/azure-pipelines.yml | 82 +++++++++++++++++++++++++++++++++++++++++ .ci/build.yml | 12 ++++++ 2 files changed, 94 insertions(+) create mode 100644 .ci/azure-pipelines.yml create mode 100644 .ci/build.yml diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml new file mode 100644 index 00000000..0c978c03 --- /dev/null +++ b/.ci/azure-pipelines.yml @@ -0,0 +1,82 @@ +name: $(Build.SourceBranchName)-$(Build.SourceVersion) + +resources: + - repo: self + +trigger: + - master + +jobs: + - job: buildMacos + displayName: Build macOS + condition: succeeded() + pool: + vmImage: macOS-10.13 + demands: node.js + + steps: + - template './build.yml' + + - task: PublishPipelineArtifact@0 + displayName: 'Publish Artifact: macOS' + inputs: + targetPath: './_build/default/src/Bin.exe' + artifactName: macOS + + - job: buildWindows + displayName: Build Windows + condition: succeeded() + pool: + vmImage: vs2017-win2016 + demands: node.js + + steps: + - template './build.yml' + + - task: PublishPipelineArtifact@0 + displayName: 'Publish Artifact: Windows' + inputs: + targetPath: './_build/default/src/Bin.exe' + artifactName: Windows + + - job: buildLinux + displayName: Build Linux + condition: succeeded() + pool: + vmImage: ubuntu-16.04 + demands: node.js + + steps: + - template './build.yml' + + - task: PublishPipelineArtifact@0 + displayName: 'Publish Artifact: Linux' + inputs: + targetPath: './_build/default/src/Bin.exe' + artifactName: Linux + + - job: Bundle + displayName: Bundle builds + dependsOn: + - buildLinux + - buildMacos + - buildWindows + condition: succeeded() + pool: + vmImage: macOS-10.13 + demands: node.js + + steps: + - script: 'mv $(Build.ArtifactStagingDirectory)/Linux/Bin.exe ./editor-extensions/vscode/bin.native.linux' + + - script: 'mv $(Build.ArtifactStagingDirectory)/macOS/Bin.exe ./editor-extensions/vscode/bin.native' + + - script: 'mv $(Build.ArtifactStagingDirectory)/Windows/Bin.exe ./editor-extensions/vscode/bin.native.exe' + + - script: 'npm run zip' + + - task: PublishBuildArtifacts@1 + displayName: 'Publish zip' + inputs: + PathtoPublish: './editor-extensions' + ArtifactName: editorExtensions diff --git a/.ci/build.yml b/.ci/build.yml new file mode 100644 index 00000000..c79b3877 --- /dev/null +++ b/.ci/build.yml @@ -0,0 +1,12 @@ +steps: + - task NodeTool@0 + displayName: 'Use Node 8.x' + inputs: + versionSpec: 8.x + + - script: 'npm install -g esy@0.4.3 --unsafe-perm' + displayName: 'npm install -g esy' + + - script: 'esy install' + + - script: 'esy build' From 2faaf9e6be62951819cde22a2e17f1029bab0b60 Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Thu, 29 Nov 2018 21:17:16 +0100 Subject: [PATCH 02/15] Fix typo --- .ci/azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index 0c978c03..e0b7dfad 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -76,7 +76,7 @@ jobs: - script: 'npm run zip' - task: PublishBuildArtifacts@1 - displayName: 'Publish zip' - inputs: - PathtoPublish: './editor-extensions' - ArtifactName: editorExtensions + displayName: 'Publish zip' + inputs: + PathtoPublish: './editor-extensions' + ArtifactName: editorExtensions From 78cbc4c79dfabcbc089fd2be99e509be973a7d76 Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Thu, 29 Nov 2018 21:20:21 +0100 Subject: [PATCH 03/15] Fix template typo --- .ci/azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index e0b7dfad..e8a7076e 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -15,7 +15,7 @@ jobs: demands: node.js steps: - - template './build.yml' + - template: build.yml - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: macOS' @@ -31,7 +31,7 @@ jobs: demands: node.js steps: - - template './build.yml' + - template: build.yml - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: Windows' @@ -47,7 +47,7 @@ jobs: demands: node.js steps: - - template './build.yml' + - template: build.yml - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: Linux' From fcaf2c72a95054a5d413c40d30018427feeb8f96 Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Thu, 29 Nov 2018 21:21:16 +0100 Subject: [PATCH 04/15] Remove repo self as that's default --- .ci/azure-pipelines.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index e8a7076e..fcda1c1b 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -1,8 +1,5 @@ name: $(Build.SourceBranchName)-$(Build.SourceVersion) -resources: - - repo: self - trigger: - master From 1623bf249797be47fa28e98b09f7622bfff9f345 Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Thu, 29 Nov 2018 21:22:33 +0100 Subject: [PATCH 05/15] Fix typo --- .ci/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/build.yml b/.ci/build.yml index c79b3877..4370b3b2 100644 --- a/.ci/build.yml +++ b/.ci/build.yml @@ -1,5 +1,5 @@ steps: - - task NodeTool@0 + - task: NodeTool@0 displayName: 'Use Node 8.x' inputs: versionSpec: 8.x From 33f8b9b35f22cd9c0b1967416ef1c5e269b4748c Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Thu, 29 Nov 2018 21:28:24 +0100 Subject: [PATCH 06/15] Fixes in pipeline --- .ci/azure-pipelines.yml | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index fcda1c1b..29c0c8b4 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -64,16 +64,31 @@ jobs: demands: node.js steps: - - script: 'mv $(Build.ArtifactStagingDirectory)/Linux/Bin.exe ./editor-extensions/vscode/bin.native.linux' + - task: DownloadPipelineArtifact@0 + inputs: + targetPath: $(Build.ArtifactStagingDirectory) + artifactName: Linux + + - task: DownloadPipelineArtifact@0 + inputs: + targetPath: $(Build.ArtifactStagingDirectory) + artifactName: macOS - - script: 'mv $(Build.ArtifactStagingDirectory)/macOS/Bin.exe ./editor-extensions/vscode/bin.native' + - task: DownloadPipelineArtifact@0 + inputs: + targetPath: $(Build.ArtifactStagingDirectory) + artifactName: Windows + + - script: 'mv $(Build.ArtifactStagingDirectory)/Linux/Bin.exe ./editor-extensions/vscode/bin.native.linux' - - script: 'mv $(Build.ArtifactStagingDirectory)/Windows/Bin.exe ./editor-extensions/vscode/bin.native.exe' + - script: 'mv $(Build.ArtifactStagingDirectory)/macOS/Bin.exe ./editor-extensions/vscode/bin.native' - - script: 'npm run zip' + - script: 'mv $(Build.ArtifactStagingDirectory)/Windows/Bin.exe ./editor-extensions/vscode/bin.native.exe' - - task: PublishBuildArtifacts@1 - displayName: 'Publish zip' - inputs: - PathtoPublish: './editor-extensions' - ArtifactName: editorExtensions + - script: 'npm run zip' + + - task: PublishBuildArtifacts@1 + displayName: 'Publish zip' + inputs: + PathtoPublish: './editor-extensions' + ArtifactName: editorExtensions From 32eb0a6c71d58859f46458e373dbc60fee2b3dd0 Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Thu, 29 Nov 2018 21:35:01 +0100 Subject: [PATCH 07/15] Add dispaly names for commands --- .ci/azure-pipelines.yml | 4 ++++ .ci/build.yml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index 29c0c8b4..0d226868 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -80,12 +80,16 @@ jobs: artifactName: Windows - script: 'mv $(Build.ArtifactStagingDirectory)/Linux/Bin.exe ./editor-extensions/vscode/bin.native.linux' + displayName: 'Move Linux binary to correct place' - script: 'mv $(Build.ArtifactStagingDirectory)/macOS/Bin.exe ./editor-extensions/vscode/bin.native' + displayName: 'Move macOS binary to correct place' - script: 'mv $(Build.ArtifactStagingDirectory)/Windows/Bin.exe ./editor-extensions/vscode/bin.native.exe' + displayName: 'Move Windows binary to correct place' - script: 'npm run zip' + displayName: 'npm run zip' - task: PublishBuildArtifacts@1 displayName: 'Publish zip' diff --git a/.ci/build.yml b/.ci/build.yml index 4370b3b2..426cfb23 100644 --- a/.ci/build.yml +++ b/.ci/build.yml @@ -8,5 +8,7 @@ steps: displayName: 'npm install -g esy' - script: 'esy install' + displayName: 'esy install' - script: 'esy build' + displayName: 'esy build' From 32693f65d9354cf156c97806a1c2ea59beeb8676 Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Thu, 29 Nov 2018 21:35:09 +0100 Subject: [PATCH 08/15] Build in source --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index eeeeb13a..99677ca6 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ "author": "Jared Forsyth", "license": "ISC", "esy": { - "build": "dune build -p #{self.name}" + "build": "dune build -p #{self.name}", + "buildsInSource": "_build" }, "dependencies": { "@opam/dune": "*", From 5a7049d78c9dee22c54d8f516f70a88f99cc3c90 Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Thu, 29 Nov 2018 21:45:21 +0100 Subject: [PATCH 09/15] Don't build in source, fix paths --- .ci/azure-pipelines.yml | 6 +++--- package.json | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index 0d226868..a6ff3b11 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -17,7 +17,7 @@ jobs: - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: macOS' inputs: - targetPath: './_build/default/src/Bin.exe' + targetPath: '_esy/default/build/default/bin/Bin.exe' artifactName: macOS - job: buildWindows @@ -33,7 +33,7 @@ jobs: - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: Windows' inputs: - targetPath: './_build/default/src/Bin.exe' + targetPath: '_esy/default/build/default/bin/Bin.exe' artifactName: Windows - job: buildLinux @@ -49,7 +49,7 @@ jobs: - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: Linux' inputs: - targetPath: './_build/default/src/Bin.exe' + targetPath: '_esy/default/build/default/bin/Bin.exe' artifactName: Linux - job: Bundle diff --git a/package.json b/package.json index 99677ca6..eeeeb13a 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,7 @@ "author": "Jared Forsyth", "license": "ISC", "esy": { - "build": "dune build -p #{self.name}", - "buildsInSource": "_build" + "build": "dune build -p #{self.name}" }, "dependencies": { "@opam/dune": "*", From e1c77044aaf7fb99ba8b4c1626c9e829500221ec Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Fri, 30 Nov 2018 07:05:46 +0100 Subject: [PATCH 10/15] Use SourceDirectory variable --- .ci/azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index a6ff3b11..e3dc2ca2 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -17,7 +17,7 @@ jobs: - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: macOS' inputs: - targetPath: '_esy/default/build/default/bin/Bin.exe' + targetPath: '$(Build.SourcesDirectory)/_esy/default/build/default/bin/Bin.exe' artifactName: macOS - job: buildWindows @@ -33,7 +33,7 @@ jobs: - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: Windows' inputs: - targetPath: '_esy/default/build/default/bin/Bin.exe' + targetPath: '$(Build.SourcesDirectory)/_esy/default/build/default/bin/Bin.exe' artifactName: Windows - job: buildLinux @@ -49,7 +49,7 @@ jobs: - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: Linux' inputs: - targetPath: '_esy/default/build/default/bin/Bin.exe' + targetPath: '$(Build.SourcesDirectory)/_esy/default/build/default/bin/Bin.exe' artifactName: Linux - job: Bundle @@ -79,13 +79,13 @@ jobs: targetPath: $(Build.ArtifactStagingDirectory) artifactName: Windows - - script: 'mv $(Build.ArtifactStagingDirectory)/Linux/Bin.exe ./editor-extensions/vscode/bin.native.linux' + - script: 'mv $(Build.ArtifactStagingDirectory)/Linux/Bin.exe $(Build.SourcesDirectory)/editor-extensions/vscode/bin.native.linux' displayName: 'Move Linux binary to correct place' - - script: 'mv $(Build.ArtifactStagingDirectory)/macOS/Bin.exe ./editor-extensions/vscode/bin.native' + - script: 'mv $(Build.ArtifactStagingDirectory)/macOS/Bin.exe $(Build.SourcesDirectory)/editor-extensions/vscode/bin.native' displayName: 'Move macOS binary to correct place' - - script: 'mv $(Build.ArtifactStagingDirectory)/Windows/Bin.exe ./editor-extensions/vscode/bin.native.exe' + - script: 'mv $(Build.ArtifactStagingDirectory)/Windows/Bin.exe $(Build.SourcesDirectory)/editor-extensions/vscode/bin.native.exe' displayName: 'Move Windows binary to correct place' - script: 'npm run zip' From 8c396ba0d44cb94755d3e6f7aa73d0ed5ffb51ea Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Sun, 2 Dec 2018 13:14:10 +0100 Subject: [PATCH 11/15] Save binPath --- .ci/azure-pipelines.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index e3dc2ca2..d7bbf141 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -14,10 +14,14 @@ jobs: steps: - template: build.yml + - script: | + echo '##vso[task.setvariable binPath="esy x which Bin"]' + displayName: "Save binPath variable" + - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: macOS' inputs: - targetPath: '$(Build.SourcesDirectory)/_esy/default/build/default/bin/Bin.exe' + targetPath: '$(setvariable)' artifactName: macOS - job: buildWindows @@ -30,10 +34,14 @@ jobs: steps: - template: build.yml + - script: | + echo '##vso[task.setvariable binPath="esy x which Bin.exe"]' + displayName: "Save binPath variable" + - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: Windows' inputs: - targetPath: '$(Build.SourcesDirectory)/_esy/default/build/default/bin/Bin.exe' + targetPath: '$(setvariable)' artifactName: Windows - job: buildLinux @@ -46,10 +54,14 @@ jobs: steps: - template: build.yml + - script: | + echo '##vso[task.setvariable binPath="esy x which Bin"]' + displayName: "Save binPath variable" + - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: Linux' inputs: - targetPath: '$(Build.SourcesDirectory)/_esy/default/build/default/bin/Bin.exe' + targetPath: '$(setvariable)' artifactName: Linux - job: Bundle From f723846ddea6499282888fe4e3253e75ab7e6b96 Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Sun, 2 Dec 2018 13:53:49 +0100 Subject: [PATCH 12/15] Try again --- .ci/azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index d7bbf141..a6baa9ef 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -15,7 +15,7 @@ jobs: - template: build.yml - script: | - echo '##vso[task.setvariable binPath="esy x which Bin"]' + echo '##vso[task.setvariable variable=binPath]esy x which Bin' displayName: "Save binPath variable" - task: PublishPipelineArtifact@0 @@ -35,7 +35,7 @@ jobs: - template: build.yml - script: | - echo '##vso[task.setvariable binPath="esy x which Bin.exe"]' + echo '##vso[task.setvariable variable=binPath]esy x which Bin.exe' displayName: "Save binPath variable" - task: PublishPipelineArtifact@0 @@ -55,7 +55,7 @@ jobs: - template: build.yml - script: | - echo '##vso[task.setvariable binPath="esy x which Bin"]' + echo '##vso[task.setvariable variable=binPath]esy x which Bin' displayName: "Save binPath variable" - task: PublishPipelineArtifact@0 From e00c9c0a47997744086e17ef56bc385182b92a3b Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Sun, 2 Dec 2018 14:02:22 +0100 Subject: [PATCH 13/15] Correct variable name --- .ci/azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index a6baa9ef..1bae343a 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -21,7 +21,7 @@ jobs: - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: macOS' inputs: - targetPath: '$(setvariable)' + targetPath: $(binPath) artifactName: macOS - job: buildWindows @@ -41,7 +41,7 @@ jobs: - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: Windows' inputs: - targetPath: '$(setvariable)' + targetPath: $(binPath) artifactName: Windows - job: buildLinux @@ -61,7 +61,7 @@ jobs: - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: Linux' inputs: - targetPath: '$(setvariable)' + targetPath: $(binPath) artifactName: Linux - job: Bundle From bc78db265041d8beec312ecdf4e1e114ac461dcc Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Sun, 2 Dec 2018 14:18:54 +0100 Subject: [PATCH 14/15] Testing some more --- .ci/azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index 1bae343a..c4dfaffd 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -15,7 +15,7 @@ jobs: - template: build.yml - script: | - echo '##vso[task.setvariable variable=binPath]esy x which Bin' + echo '##vso[task.setvariable variable=binPath]$(esy x which Bin)' displayName: "Save binPath variable" - task: PublishPipelineArtifact@0 @@ -35,7 +35,7 @@ jobs: - template: build.yml - script: | - echo '##vso[task.setvariable variable=binPath]esy x which Bin.exe' + echo '##vso[task.setvariable variable=binPath]$(esy x which Bin.exe)' displayName: "Save binPath variable" - task: PublishPipelineArtifact@0 @@ -55,7 +55,7 @@ jobs: - template: build.yml - script: | - echo '##vso[task.setvariable variable=binPath]esy x which Bin' + echo '##vso[task.setvariable variable=binPath]$(esy x which Bin)' displayName: "Save binPath variable" - task: PublishPipelineArtifact@0 From 627b6fc501848a711ebbf669c9079db3e6b9fe70 Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Sun, 2 Dec 2018 14:27:28 +0100 Subject: [PATCH 15/15] Move fnutt --- .ci/azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index c4dfaffd..ebd6845e 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -15,7 +15,7 @@ jobs: - template: build.yml - script: | - echo '##vso[task.setvariable variable=binPath]$(esy x which Bin)' + echo '##vso[task.setvariable variable=binPath]'$(esy x which Bin) displayName: "Save binPath variable" - task: PublishPipelineArtifact@0 @@ -35,7 +35,7 @@ jobs: - template: build.yml - script: | - echo '##vso[task.setvariable variable=binPath]$(esy x which Bin.exe)' + echo '##vso[task.setvariable variable=binPath]'$(esy x which Bin.exe) displayName: "Save binPath variable" - task: PublishPipelineArtifact@0 @@ -55,7 +55,7 @@ jobs: - template: build.yml - script: | - echo '##vso[task.setvariable variable=binPath]$(esy x which Bin)' + echo '##vso[task.setvariable variable=binPath]'$(esy x which Bin) displayName: "Save binPath variable" - task: PublishPipelineArtifact@0