From 2125bb6cf27a1afa06839229586450e3852283a2 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Wed, 7 Nov 2018 16:08:53 -0800 Subject: [PATCH 1/6] Switch to azure ci --- .ci/azure-pipelines.yml | 43 +++++++++++++++++++++++++++++++ .ci/esy-build-steps.yml | 23 +++++++++++++++++ appveyor.yml | 56 ----------------------------------------- azure-pipelines.yml | 16 ------------ 4 files changed, 66 insertions(+), 72 deletions(-) create mode 100644 .ci/azure-pipelines.yml create mode 100644 .ci/esy-build-steps.yml delete mode 100644 appveyor.yml delete mode 100644 azure-pipelines.yml diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml new file mode 100644 index 0000000..f8708af --- /dev/null +++ b/.ci/azure-pipelines.yml @@ -0,0 +1,43 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml + +name: $(Build.SourceVersion) +jobs: +- job: Linux + pool: + vmImage: 'Ubuntu 16.04' + steps: + - script: sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libegl1-mesa-dev mesa-utils mesa-utils-extra ragel + - template: esy-build-steps.yml + +- job: MacOS + pool: + vmImage: 'macOS 10.13' + steps: + - script: brew update + - script: brew install libpng + - template: esy-build-steps.yml + +- job: Windows + pool: + vmImage: 'vs2017-win2016' + steps: + - template: esy-build-steps.yml + +- job: Release + displayName: Release + dependsOn: + - Linux + - MacOS + - Windows + condition: succeeded() + pool: + vmImage: ubuntu-16.04 + steps: + - task: PublishBuildArtifacts@1 + displayName: 'Release Package' + inputs: + PathtoPublish: '.' + ArtifictName: npm-package diff --git a/.ci/esy-build-steps.yml b/.ci/esy-build-steps.yml new file mode 100644 index 0000000..8eda477 --- /dev/null +++ b/.ci/esy-build-steps.yml @@ -0,0 +1,23 @@ +# Cross-platform set of build steps for building esy projects + +steps: + - task: NodeTool@0 + inputs: + versionSpec: '8.9' + - script: npm install -g esy@0.3.4 + - script: npm run build-cygwin + - script: cd re && esy install + - script: cd re && esy build + - script: cd re && esy b dune runtest + - script: npm run test + displayName: "npm run test: before packing" + - script: npm run package-cygwin + - task: PublishBuildArtifacts@1 + displayName: 'Release Package' + inputs: + PathtoPublish: '.' + ArtifactName: npm-package + - script: node postinstall.js + - script: npm run test + displayName: "npm run test: after unpack" + diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 4bf8a8a..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,56 +0,0 @@ -platform: - - x64 - -cache: - - C:\Users\appveyor\.esy\3_\i - - C:\Users\appveyor\.esy\source-tarballs - -install: - # The x64 is required as a workaround for esy/esy#412 - - ps: Install-Product node 10 x64 - # Get latest npm - - npm install -g npm - - npm install - - npm install -g yarn - - npm install -g esy@next - # Install cygwin - - npm run build-cygwin - - cd re - # Retry is necessary due to esy/esy#413 and esy/esy#414 - - appveyor-retry esy install - -# 'max-old-space-size' needs to be set for large NPM uploads, -# otherwise node will crash with an out-of-memory error -environment: - NODE_OPTIONS: --max-old-space-size=8192 - NPM_TOKEN: - secure: h3hweU1D+fx2hyHtCSUHVkR7pKf7XpCEwC0/E/a+7vxnus3hArWb4w0WjynzOPJ+ - -build_script: - - esy build - - esy b dune runtest - - cd .. - - npm run test - - npm run package-cygwin - # Package, and then run the tests again w/ our bundled artifacts - # This catches bugs with our symlink/hardlink restoration - # - npm pack - # - node postinstall.js - # - npm run test - # - rimraf *.tgz - -test: off - -deploy_script: - - npm --version - - yarn --version - - echo Deploying... - - ps: | - if ($ENV:PLATFORM -eq "x64") - { - "//registry.npmjs.org/:_authToken=`$`{NPM_TOKEN`}" | Out-File (Join-Path $ENV:APPVEYOR_BUILD_FOLDER ".npmrc") -Encoding UTF8 - iex "npm pack" - iex "npm publish --verbose" - } - on: - branches: master diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 3b9370d..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Starter pipeline -# Start with a minimal pipeline that you can customize to build and deploy your code. -# Add steps that build, run tests, deploy, and more: -# https://aka.ms/yaml - -pool: - vmImage: 'Ubuntu 16.04' - -steps: -- script: echo Hello, world! - displayName: 'Run a one-line script' - -- script: | - echo Add other tasks to build, test, and deploy your project. - echo See https://aka.ms/yaml - displayName: 'Run a multi-line script' From e0543d0812036b4c7dac6583fac821643f8f0bd8 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Wed, 7 Nov 2018 16:10:35 -0800 Subject: [PATCH 2/6] Only run windows --- .ci/azure-pipelines.yml | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index f8708af..cc6bd3a 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -5,39 +5,8 @@ name: $(Build.SourceVersion) jobs: -- job: Linux - pool: - vmImage: 'Ubuntu 16.04' - steps: - - script: sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libegl1-mesa-dev mesa-utils mesa-utils-extra ragel - - template: esy-build-steps.yml - -- job: MacOS - pool: - vmImage: 'macOS 10.13' - steps: - - script: brew update - - script: brew install libpng - - template: esy-build-steps.yml - - job: Windows pool: vmImage: 'vs2017-win2016' steps: - template: esy-build-steps.yml - -- job: Release - displayName: Release - dependsOn: - - Linux - - MacOS - - Windows - condition: succeeded() - pool: - vmImage: ubuntu-16.04 - steps: - - task: PublishBuildArtifacts@1 - displayName: 'Release Package' - inputs: - PathtoPublish: '.' - ArtifictName: npm-package From 56a74a35e4e5857b955f1f8afab8171927c25b79 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Wed, 7 Nov 2018 16:11:13 -0800 Subject: [PATCH 3/6] Fix whitespace --- .ci/esy-build-steps.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/esy-build-steps.yml b/.ci/esy-build-steps.yml index 8eda477..edb35b3 100644 --- a/.ci/esy-build-steps.yml +++ b/.ci/esy-build-steps.yml @@ -13,10 +13,10 @@ steps: displayName: "npm run test: before packing" - script: npm run package-cygwin - task: PublishBuildArtifacts@1 - displayName: 'Release Package' - inputs: - PathtoPublish: '.' - ArtifactName: npm-package + displayName: 'Release Package' + inputs: + PathtoPublish: '.' + ArtifactName: npm-package - script: node postinstall.js - script: npm run test displayName: "npm run test: after unpack" From 60d11341e94d72486130f4055a57a66e75525988 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Wed, 7 Nov 2018 16:28:53 -0800 Subject: [PATCH 4/6] Update esy-build-steps.yml --- .ci/esy-build-steps.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/esy-build-steps.yml b/.ci/esy-build-steps.yml index edb35b3..80fff58 100644 --- a/.ci/esy-build-steps.yml +++ b/.ci/esy-build-steps.yml @@ -5,6 +5,7 @@ steps: inputs: versionSpec: '8.9' - script: npm install -g esy@0.3.4 + - script: npm install - script: npm run build-cygwin - script: cd re && esy install - script: cd re && esy build From 10468d3d524a0a649530176391ce7a2c52a602ec Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Wed, 7 Nov 2018 19:10:35 -0800 Subject: [PATCH 5/6] Remove timeout --- .ci/azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index cc6bd3a..bd70ed0 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -6,6 +6,7 @@ name: $(Build.SourceVersion) jobs: - job: Windows + timeoutInMinutes: 0 pool: vmImage: 'vs2017-win2016' steps: From ba1b433fd4d71ccc4c8c00dcb409602e11542baa Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Wed, 7 Nov 2018 19:13:01 -0800 Subject: [PATCH 6/6] Ensure no intermittency --- .ci/esy-build-steps.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.ci/esy-build-steps.yml b/.ci/esy-build-steps.yml index edb35b3..ed02a04 100644 --- a/.ci/esy-build-steps.yml +++ b/.ci/esy-build-steps.yml @@ -18,6 +18,15 @@ steps: PathtoPublish: '.' ArtifactName: npm-package - script: node postinstall.js + displayName: "node postinstall.js (iteration 1)" - script: npm run test - displayName: "npm run test: after unpack" + displayName: "npm run test: after unpack (iteration 1)" + - script: node postinstall.js + displayName: "node postinstall.js (iteration 2)" + - script: npm run test + displayName: "npm run test: after unpack (iteration 2)" + - script: node postinstall.js + displayName: "node postinstall.js (iteration 3)" + - script: npm run test + displayName: "npm run test: after unpack (iteration 3)"