From 25bacb36531c6b47001a74f838f2a4a3c471b4a0 Mon Sep 17 00:00:00 2001 From: TheGoddessInari Date: Fri, 20 Jul 2018 11:10:07 -0700 Subject: [PATCH] CI: Swap linux builds to appveyor for artifacts. Disable automatic deployment for now. --- .travis.yml | 102 +++++++++++++++++++++++++---------- appveyor.yml | 148 +++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 188 insertions(+), 62 deletions(-) diff --git a/.travis.yml b/.travis.yml index 63064f80..1acae79e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,10 +7,13 @@ node_js: branches: only: - master + - testing + except: + - snapshot-master + - snapshot-testing os: - - linux - #- osx ## OSX build is broken so suspend it for now. + - osx cache: directories: @@ -18,7 +21,9 @@ cache: - $HOME/.electron env: - - SENCHA_VER=6.5.3.6 + global: + - SENCHA_VER=6.6.0.13 + - secure: "sEoA+xvrsfYuxGOlrcdHudu0nYjlV47wwyMMgurSi+Em4izYgXoe5JLYDZ5nniO2iDAmD1IqjwbxhBrbRyue2b0gyyuz4PbPfsR5sSbegZ3xum8nzn7Jg5NydllLQbJmPKSsOGOhiOYdprUvMsbmvTWVOwSAs6fH/PorJlqegODpsa8GeuNTXPsI5pT2j98F+DJaF+wAKdkhpgpX3ggdCCdY4pb7SdLk+2Q51IPZhgEPG1AXv2kfXFXHQIwZp76+5hva0aKZEjXipgkPeOr/tLgsIdrSCHAPigxcZyb8SvJzNMIniHfNmdzWr8q2tJuh2W9zCuYhghJQ4pkGUc3OFR0xaLU9aP17u9P/7AB+Zv/PaO5ta5Ay49/2K38hrfAjgBioUCrICH4jXTZenmg8X6q5ksx6R3wBMLP0qv1wyvGEakzIhqBjTwBnZyGE7aLpyGyi4qP0TcBQ7APVaAa1HYsd8uz4GTm67SCqEELzGJlt14dkep9FLIPBFVMo1kzHK45ltLPSawUsJ4Z5Ds8nAdJi1ZEik2IWh6++XVn65fGe0qOdZ1T0AvOgln7RVv4WtznEBcjK0vwP68++XQditB6oGRnMitnVyudQfoSI6j5q0KPrTDRENRN+yh0ofqO/YhkNu1BxCzLLoHQ4Rb5DdX8kALNWupqbCnw1Ce4KJw0=" addons: apt: @@ -33,43 +38,84 @@ install: - git reset --hard HEAD - npm install - npm uninstall electron-prebuilt - - npm i electron@$ELECTRON + - npm i electron@${ELECTRON} - if [ $TRAVIS_OS_NAME == "linux" ]; then - curl -o sencha.sh.zip http://cdn.sencha.com/cmd/${SENCHA_VER}/no-jre/SenchaCmd-${SENCHA_VER}-linux-amd64.sh.zip; + curl -o SenchaCmd-${SENCHA_VER}-linux-amd64.sh.zip http://cdn.sencha.com/cmd/${SENCHA_VER}/no-jre/SenchaCmd-${SENCHA_VER}-linux-amd64.sh.zip; + unzip SenchaCmd-${SENCHA_VER}-linux-amd64.sh.zip; + chmod +x SenchaCmd-${SENCHA_VER}-linux-amd64.sh; + ./SenchaCmd-${SENCHA_VER}-linux-amd64.sh -q -Dall=true; else - curl -o sencha.sh.zip http://cdn.sencha.com/cmd/${SENCHA_VER}/no-jre/SenchaCmd-${SENCHA_VER}-osx-no_jre.app.zip; + curl -o SenchaCmd-${SENCHA_VER}-osx-no_jre.app.zip http://cdn.sencha.com/cmd/${SENCHA_VER}/no-jre/SenchaCmd-${SENCHA_VER}-osx-no_jre.app.zip; + unzip SenchaCmd-${SENCHA_VER}-osx-no_jre.app.zip; + SenchaCmd-${SENCHA_VER}-osx-no_jre.app/Contents/MacOS/JavaApplicationStub -q -Dall=true; fi - - unzip -p sencha.sh.zip > sencha-install.run - - chmod +x sencha-install.run - - ./sencha-install.run -q -Dall=true - cp env-sample.js env.js before_script: - export PATH=~/bin/Sencha/Cmd/${SENCHA_VER}:${PATH} + - export CURRENT_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH} script: - - echo $TRAVIS_OS_NAME + - echo ${TRAVIS_OS_NAME} - node --version - npm --version - sencha audit - - npm run setup:$TRAVIS_OS_NAME + - npm run setup:${TRAVIS_OS_NAME} + +after_success: + - git config --global user.email "travis@travis-ci.org" + - git config --global user.name "Travis" + - if [ ${CURRENT_BRANCH} == "testing" ]; then + export TRAVIS_TAG="snapshot-testing"; + git tag -f ${TRAVIS_TAG} -a -m "Automatic snapshot for testing [skip ci]"; + (git push -q https://${TAGPERM}@github.com/TheGoddessInari/rambox --tags -f) > /dev/null 2>&1; + elif [ ${CURRENT_BRANCH} == "master" ]; then + export TRAVIS_TAG="snapshot-master"; + git tag -f ${TRAVIS_TAG} -a -m "Automatic snapshot for master [skip ci]"; + (git push -q https://${TAGPERM}@github.com/TheGoddessInari/rambox --tags -f) > /dev/null 2>&1; + fi + +# deploy: +# - provider: releases # Snapshot tags +# on: +# repo: TheGoddessInari/rambox +# all_branches: true +# condition: ${TRAVIS_TAG} == snapshot-master || ${TRAVIS_TAG} == snapshot-testing +# api_key: +# secure: bYto8VS+zEFqKRjgBga69DgbjVPtHi4vRM+EGsNURe1b4ILRlwS8lJb5RbM+8w2UEPr8P9l959dC1pKYKjlJqEHwvDdTLFsDESO5uEUOtoEWUOnsNEwvvoNY1tFfPoFr1qhWjPWh4UGZzf/sfgXvSdoEg8cbmgbjkbEgGpKPri6Gigvosu/HT1ZCXVoud32uJ2ydfoWMfERXeQYk8u9x52Qx3XS7OMmUR1BvqifaSMt6K5oPFS1lOAXkxyCu1Sczg119+6MEWixImFcXYmPaAoHqLfPNICnhG3egiddq24f1ZGsGmfHgpliM4MNl74t99kPX6lcoQchTlhz4lVVI0lpHBymZwhIf4JjLSuZt81zW5cvJmu0CT22o/thnRFTY1MkaBDmdweaPtdYiMmAJuhwSQEeP6Mt4lqQNgtsNsBqkT6+n4T2l5RHagc/iC4TC58/4QZErKcVkaZnjy78trrQCKD9E1wLpm5hV84fF0FJLrEIhNYcSAJ6u1OJa2CaJ3u5OXFIuu01E+6CWu64pXgpIjkCRQU/JPSQVxdmwWqx4o4948NddBEx7Z3EsPkKU+5ccQr6dz7qESa8xnuERILclWO/LvdauYLhxtMVD2/fc/aKeP+6QxvNBClZT/eeO7bJDdCx/uWzm3Qo4k5+nyTl9bPUKLDzb5MuMh2x7flc= +# file_glob: true +# file: +# - "dist/*.deb" +# - "dist/*.tar.gz" +# - "dist/*.AppImage" +# - "dist/*.rpm" +# - "dist/*.zip" +# - "dist/*.dmg" +# skip_cleanup: true +# overwrite: true +# draft: false +# prerelease: true +# tag_name: $TRAVIS_TAG +# - provider: releases # Regular tags +# on: +# repo: TheGoddessInari/rambox +# all_branches: true +# condition: x${TRAVIS_TAG} != "x" && ${TRAVIS_TAG} != snapshot-master && ${TRAVIS_TAG} != snapshot-testing +# api_key: +# secure: bYto8VS+zEFqKRjgBga69DgbjVPtHi4vRM+EGsNURe1b4ILRlwS8lJb5RbM+8w2UEPr8P9l959dC1pKYKjlJqEHwvDdTLFsDESO5uEUOtoEWUOnsNEwvvoNY1tFfPoFr1qhWjPWh4UGZzf/sfgXvSdoEg8cbmgbjkbEgGpKPri6Gigvosu/HT1ZCXVoud32uJ2ydfoWMfERXeQYk8u9x52Qx3XS7OMmUR1BvqifaSMt6K5oPFS1lOAXkxyCu1Sczg119+6MEWixImFcXYmPaAoHqLfPNICnhG3egiddq24f1ZGsGmfHgpliM4MNl74t99kPX6lcoQchTlhz4lVVI0lpHBymZwhIf4JjLSuZt81zW5cvJmu0CT22o/thnRFTY1MkaBDmdweaPtdYiMmAJuhwSQEeP6Mt4lqQNgtsNsBqkT6+n4T2l5RHagc/iC4TC58/4QZErKcVkaZnjy78trrQCKD9E1wLpm5hV84fF0FJLrEIhNYcSAJ6u1OJa2CaJ3u5OXFIuu01E+6CWu64pXgpIjkCRQU/JPSQVxdmwWqx4o4948NddBEx7Z3EsPkKU+5ccQr6dz7qESa8xnuERILclWO/LvdauYLhxtMVD2/fc/aKeP+6QxvNBClZT/eeO7bJDdCx/uWzm3Qo4k5+nyTl9bPUKLDzb5MuMh2x7flc= +# file_glob: true +# file: +# - "dist/*.deb" +# - "dist/*.tar.gz" +# - "dist/*.AppImage" +# - "dist/*.rpm" +# - "dist/*.zip" +# - "dist/*.dmg" +# skip_cleanup: true +# overwrite: false +# draft: true +# prerelease: false +# tag_name: $TRAVIS_TAG -deploy: - provider: releases - api_key: - secure: bYto8VS+zEFqKRjgBga69DgbjVPtHi4vRM+EGsNURe1b4ILRlwS8lJb5RbM+8w2UEPr8P9l959dC1pKYKjlJqEHwvDdTLFsDESO5uEUOtoEWUOnsNEwvvoNY1tFfPoFr1qhWjPWh4UGZzf/sfgXvSdoEg8cbmgbjkbEgGpKPri6Gigvosu/HT1ZCXVoud32uJ2ydfoWMfERXeQYk8u9x52Qx3XS7OMmUR1BvqifaSMt6K5oPFS1lOAXkxyCu1Sczg119+6MEWixImFcXYmPaAoHqLfPNICnhG3egiddq24f1ZGsGmfHgpliM4MNl74t99kPX6lcoQchTlhz4lVVI0lpHBymZwhIf4JjLSuZt81zW5cvJmu0CT22o/thnRFTY1MkaBDmdweaPtdYiMmAJuhwSQEeP6Mt4lqQNgtsNsBqkT6+n4T2l5RHagc/iC4TC58/4QZErKcVkaZnjy78trrQCKD9E1wLpm5hV84fF0FJLrEIhNYcSAJ6u1OJa2CaJ3u5OXFIuu01E+6CWu64pXgpIjkCRQU/JPSQVxdmwWqx4o4948NddBEx7Z3EsPkKU+5ccQr6dz7qESa8xnuERILclWO/LvdauYLhxtMVD2/fc/aKeP+6QxvNBClZT/eeO7bJDdCx/uWzm3Qo4k5+nyTl9bPUKLDzb5MuMh2x7flc= - file_glob: true - file: - - "dist/*.deb" - - "dist/*.tar.gz" - - "dist/*.AppImage" - - "dist/*.rpm" - - "dist/mac/*.zip" - - "dist/mac/*.dmg" - skip_cleanup: true - overwrite: true - prerelease: true - on: - tags: true notifications: webhooks: diff --git a/appveyor.yml b/appveyor.yml index b97e7131..27e464e6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,61 +1,141 @@ version: 0.5.18-{build} +image: + - Visual Studio 2017 + - Ubuntu environment: matrix: - - nodejs_version: '8' - SENCHA_VER: '6.5.3.6' + - nodejs_version: '10' + JAVA_HOME: C:\Program Files\Java\jdk1.8.0 + npm_config_loglevel: 'error' + SENCHA_VER: '6.6.0.13' + TAGPERM: + secure: FKiBHTmmImO3M5FhK2TMrnpojiT6ITuJ/LvrdLjj2xD0VkcYtXuvQr5nqoxouvph +stack: node 10, jdk 8 pull_requests: do_not_increment_build_number: true branches: only: - master + - testing + except: + - snapshot-master + - snapshot-testing init: - - cmd: git config --global core.autocrlf input + - ps: git config --global core.autocrlf input install: - - ps: >- - Install-Product node ${env:nodejs_version} + - ps: >- - Invoke-WebRequest -Uri http://cdn.sencha.com/cmd/${env:SENCHA_VER}/no-jre/SenchaCmd-${env:SENCHA_VER}-windows-no_jre.zip -OutFile ${env:TEMP}\Sencha.zip + If ($isWindows) { + Install-Product node ${env:nodejs_version} + Invoke-WebRequest -Uri http://cdn.sencha.com/cmd/${env:SENCHA_VER}/no-jre/SenchaCmd-${env:SENCHA_VER}-windows-no_jre.zip -OutFile .\Sencha.zip + } ElseIf ($isLinux) { + Invoke-WebRequest -Uri http://cdn.sencha.com/cmd/${env:SENCHA_VER}/no-jre/SenchaCmd-${env:SENCHA_VER}-linux-amd64.sh.zip -OutFile .\Sencha.zip + } - Expand-Archive -Path ${env:TEMP}\Sencha.zip -DestinationPath $env:TEMP\SenchaCmd + Expand-Archive -Path .\Sencha.zip -DestinationPath .\SenchaCmd - Invoke-Expression "${env:TEMP}\SenchaCmd\SenchaCmd-${env:SENCHA_VER}-windows-no_jre.exe -q -Dall=true" + If ($isWindows) { + Invoke-Expression ".\SenchaCmd\SenchaCmd-${env:SENCHA_VER}-windows-no_jre.exe -q -Dall=true" + $env:PATH = "${env:USERPROFILE}\bin\Sencha\Cmd;${env:PATH}" + } ElseIf ($isLinux) { + Invoke-Expression "chmod +x ./SenchaCmd/SenchaCmd-${env:SENCHA_VER}-linux-amd64.sh" + Invoke-Expression "./SenchaCmd/SenchaCmd-${env:SENCHA_VER}-linux-amd64.sh -q -Dall=true" + $env:PATH = "${env:HOME}/bin/Sencha/Cmd:${env:PATH}" + } - $env:PATH = "${env:USERPROFILE}\bin\Sencha\Cmd\${env:SENCHA_VER};${env:PATH}" + Copy-Item env-sample.js env.js - Copy-Item env-sample.js env.js - - cmd: >- - git reset --hard HEAD + git reset --hard HEAD - npm i npm@latest -g + npm i npm@latest -g - npm install + npm install + + npm prune + + - sh: >- + + sudo apt-get update -qq; + + sudo apt-get install -qq -y libxml2-dev libappindicator1 rpm; - npm prune cache: - '%APPDATA%\npm-cache' - '%USERPROFILE%\.electron' - node_modules +before_build: + - ps: >- + ${env:CURRENT_BRANCH} = If (${env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH}) { + ${env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH} + } Else { + ${env:APPVEYOR_REPO_BRANCH} + } + build_script: - - cmd: >- - node --version - - npm --version - - npm run setup:win64 + - ps: >- + node --version + + npm --version + + If ($isWindows) { + npm run setup:win64 + } ElseIf ($isLinux) { + npm run setup:linux + } + + + test: off artifacts: - path: dist\squirrel-windows\*.exe - - path: dist\squirrel-windows\*.nupkg - - path: dist\squirrel-windows\RELEASES - - path: dist\*.zip -deploy: - - provider: GitHub - tag: $(appveyor_build_version) - release: $(appveyor_build_version) - on: - appveyor_repo_tag: true - auth_token: - secure: G9kcUc6R6xSYIP/mhFWZkuub5EE4b0ws9l3IQtFBz52yTsONp6GiQlFdtsnZWYjW - draft: true - prerelease: false + - path: dist/*.AppImage + - path: dist/*.rpm + - path: dist/*.deb + - path: dist/*.tar.gz + +# after_build: +# - ps: >- +# git config --global user.email "travis@travis-ci.org" + +# git config --global user.name "Travis" + +# If (${env:CURRENT_BRANCH} -eq "testing") { +# ${env:APPVEYOR_REPO_TAG_NAME}="snapshot-testing" +# ${env:APPVEYOR_REPO_TAG}="true" +# ${env:SNAPSHOT}="true" +# git tag -f ${env:APPVEYOR_REPO_TAG_NAME} -a -m "Automatic snapshot for testing [skip ci]" +# (git push -q https://${env:TAGPERM}@github.com/TheGoddessInari/rambox --tags -f 2>&1) | Out-Null +# } ElseIf (${env:CURRENT_BRANCH} -eq "master") { +# ${env:APPVEYOR_REPO_TAG_NAME}="snapshot-master" +# ${env:APPVEYOR_REPO_TAG}="true" +# ${env:SNAPSHOT}="true" +# git tag -f ${env:APPVEYOR_REPO_TAG_NAME} -a -m "Automatic snapshot for master [skip ci]" +# (git push -q https://${env:TAGPERM}@github.com/TheGoddessInari/rambox --tags -f 2>&1) | Out-Null +# } Else { +# ${env:SNAPSHOT}="false" +# } + +# deploy: +# - provider: GitHub +# on: +# appveyor_repo_tag: true +# snapshot: false +# auth_token: +# secure: G9kcUc6R6xSYIP/mhFWZkuub5EE4b0ws9l3IQtFBz52yTsONp6GiQlFdtsnZWYjW +# draft: true +# prerelease: false +# force_update: false +# tag: $(APPVEYOR_REPO_TAG_NAME) +# release: $(APPVEYOR_REPO_TAG_NAME) +# - provider: GitHub +# on: +# appveyor_repo_tag: true +# snapshot: true +# auth_token: +# secure: G9kcUc6R6xSYIP/mhFWZkuub5EE4b0ws9l3IQtFBz52yTsONp6GiQlFdtsnZWYjW +# draft: false +# prerelease: true +# force_update: true +# tag: $(APPVEYOR_REPO_TAG_NAME) +# release: $(APPVEYOR_REPO_TAG_NAME)