Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 41 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,55 @@
language: node_js
dist: trusty
sudo: false

addons:
apt:
packages:
- libgnome-keyring-dev
- icnsutils
- graphicsmagick
- xz-utils
- rpm
- bsdtar
node_js:
- '6.9.4'
python:
- "3.6"

before_install:
- pyenv versions
- pyenv install --list
- pyenv install 3.6.0
- pyenv global 3.6.0
- python --version
- python3 --version
matrix:
fast_finish: true
allow_failures:
os: osx # This allows not to wait for the osx build to be scheduled

include:
- language: generic
os: osx
before_install:
- brew update
- brew install python3
- virtualenv env -p python3
- source env/bin/activate
- python3 --version
- language: node_js
os: linux
before_install:
- pyenv versions
- pyenv install --list
- pyenv install 3.6.0
- pyenv global 3.6.0
- python --version
- python3 --version
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3

install:
- npm install -g yarn
- yarn install
- python3 --version
- pip3 install -r python/requirements.txt

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3

script:
- ./scripts/travis/build-and-test.sh
Expand All @@ -33,3 +59,7 @@ branches:
only:
- master
- stable

cache:
directories:
- node_modules
44 changes: 39 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,48 @@ branches:
only:
- master
- stable

environment:
matrix:
- PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6.1"
PYTHON_ARCH: "64"


install:
- ps: Install-Product node 6.9.1 x64
- npm install -g npm -s
- npm install -g yarn -s
- yarn install --force

# Prepend newly installed Python to the PATH of this build (this cannot be
# done from inside the powershell script as it would require to restart
# the parent CMD process).
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"

# Check that we have the expected version and architecture for Python
- "python --version"

# Upgrade to the latest version of pip to avoid it displaying warnings
# about it being out of date.
- "pip install --disable-pip-version-check --user --upgrade pip"

- ps: Install-Product node 6.9.1 x64
- npm install -g npm -s
- npm install -g yarn -s
- yarn install --force
- pip install -r python/requirements.txt

build_script:
- npm run build -s
- npm run -s build:prod
- npm run -s build-python
- IF [%APPVEYOR_REPO_BRANCH%]==[stable] (
npm run -s package -- --publish always --draft --win
) ELSE (
npm run -s package -- --publish never
)

test_script:
# - npm run test -s

artifacts:
- path: release\*Setup*.exe
name: Batchlabs-windows-setup.exe
- path: release\*win.zip
name: Batchlabs-windows.zip
55 changes: 55 additions & 0 deletions electron-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
productName: "BatchLabs"
appId: "microsoft.azure.batchlabs"

# Package electron code into a asar archive. Set to false to debug issues.
asar: true

files:
- "build/"
- "node_modules/"
- "package.json"

extraResources:
- from: "python/build/"
to: "python-rpc"
filter:
- "**/*"

# Mac OS configuration
mac:
icon: "app/assets/images/icon.icns"

# Config for OSX dmg
dmg:
contents:
- x: 130
y: 220
- x: 410
y: 220
type: "link"
path: "/Applications"

# Windows configuration
win:
icon: "app/assets/images/icon.ico"
target:
- "zip"
- "nsis"

# Config for the windows installer
nsis:
oneClick: true

# Linux configuration
linux:
target:
- "AppImage"
- "deb"
- "rpm"

directories:
buildResources: "resources"
output: "release"

publish:
provider: "github"
66 changes: 8 additions & 58 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"url": "https://github.com/Azure/BatchLabs"
},
"author": {
"name": "Microsoft Corporation"
"name": "Microsoft Corporation",
"email": "tiguerin@microsoft.com"
},
"version": "0.6.0",
"version": "0.7.0",
"main": "build/client/main.prod.js",
"scripts": {
"ts": "ts-node --project tsconfig.node.json",
Expand All @@ -24,7 +25,7 @@
"test-client": "cross-env NODE_ENV=test node test/client/run-jasmine.js",
"test-client-watch": "npm run -s test-client -- --watch",
"build-client": "tsc -p tsconfig.node.json",
"build-app": "webpack --progress --profile --colors --display-error-details --display-cached",
"build-app": "webpack --profile --colors --display-error-details --display-cached",
"build-python": "npm run -s ts config/build-python.ts",
"build": "npm run -s clean && npm run -s build-client && npm run -s build-app",
"build:prod": "cross-env NODE_ENV=production npm run -s build",
Expand All @@ -37,64 +38,13 @@
"tslint": "tslint -c tslint.json \"app/**/*.ts\" \"src/**/*.ts\" \"test/**/*.ts\" \"./*.js\" \"config/**/*.js\"",
"stylelint": "stylelint --syntax scss \"app/**/*.scss\"",
"lint": "npm run -s tslint && npm run -s stylelint",
"package": "build --dir",
"build-and-pack": "npm run -s build:prod && npm run -s build-python && npm run -s package"
"package": "build",
"build-and-pack": "npm run -s build:prod && npm run -s build-python && npm run -s package --dir"
},
"license": "MIT",
"engines": {
"node": ">=6.0.0"
},
"build": {
"productName": "BatchLabs",
"appId": "microsoft.azure.batchlabs",
"files": [
"build/",
"node_modules/",
"package.json"
],
"extraResources": [
{
"from": "python/build/",
"to": "python-rpc",
"filter": [
"**/*"
]
}
],
"dmg": {
"contents": [
{
"x": 130,
"y": 220
},
{
"x": 410,
"y": 220,
"type": "link",
"path": "/Applications"
}
]
},
"mac": {
"icon": "app/assets/images/icon.icns"
},
"win": {
"icon": "app/assets/images/icon.ico",
"target": [
"nsis"
]
},
"linux": {
"target": [
"deb",
"AppImage"
]
},
"directories": {
"buildResources": "resources",
"output": "release"
}
},
"devDependencies": {
"@types/bunyan": "~1.8.0",
"@types/chart.js": "^2.4.0",
Expand All @@ -119,8 +69,8 @@
"cross-env": "~5.0.1",
"css-loader": "~0.28.0",
"devtron": "^1.4.0",
"electron": "1.6.11",
"electron-builder": "~19.16.2",
"electron": "~1.6.11",
"electron-builder": "~19.24.1",
"file-loader": "~0.11.0",
"html-webpack-plugin": "^2.28.0",
"jasmine": "^2.5.2",
Expand Down
4 changes: 4 additions & 0 deletions scripts/install/yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


29 changes: 21 additions & 8 deletions scripts/travis/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,30 @@ echo "======= Starting build-and-test.sh =====================================
# Go to project dir
cd $(dirname $0)/../..

# Normal build
npm run build -s
if [[ $TRAVIS_OS_NAME == 'linux' ]]; then # Only run the CI checks on the linux build
# Run the test
npm run test -s

# Run the lint
npm run lint -s
fi

# Only run prod build if on a branch build or PR for stable
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] || [ "${TRAVIS_BRANCH}" = "stable" ]; then
# Check third party notices is up to date
npm run ts -s scripts/lca/generate-third-party -- --check
npm run build:prod
# Build for production
npm run -s build:prod
npm run -s build-python
npm run package -- --publish never # TODO replace with this
else
if [[ $TRAVIS_OS_NAME == 'linux' ]]; then # Only run the CI checks on the linux build
# Normal build
npm run build -s
fi
fi

# Run the test
npm run test -s

# Run the lint
npm run lint -s
# Only package if on stable branch
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "stable" ]; then
npm run package -- --publish always --draft
fi
Loading