Commit ef2cc839 authored by Jeremy Bokobza's avatar Jeremy Bokobza

travis CI

parent 7926049a
language: csharp
mono: none
dotnet: 1.0.4
matrix:
include:
- os: linux # Ubuntu 14.04
dist: trusty
sudo: required
- os: osx # OSX 10.11
osx_image: xcode7.3
- os: osx # OSX 10.12
osx_image: xcode8.1
# branches to build
branches:
only:
- master
env:
global:
- log_prefix="[$TRAVIS_OS_NAME]"
- arch=x64
- configuration="Release"
- app_output_name="breeze-$arch-$TRAVIS_OS_NAME-Release"
- api_output_name="api-$arch-$TRAVIS_OS_NAME-Release"
- os_platform=linux
- TRAVIS_TAG=cd-unstable
# Work around NuGet issue #2163
# https://github.com/NuGet/Home/issues/2163
# https://github.com/travis-ci/travis-ci/issues/7728
before_install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then ulimit -n 1024; $os_platform=darwin; fi
install:
- nvm install 6
script:
- chmod +x build.sh
- ./build.sh
deploy:
provider: releases
api_key:
- secure: "D9ZTqghn2Ss+G5Lj1YKgd+7+o7BeK4s+mQGwyOiVNCWkb9NAwaFg02zbv4IwI8gc644AAeZGta8LTlCGkYjL1PbAurSxFfrWGTx0+zJDoMeyG6zcd2flHbOt8HMqIkYUgQ8xA4Cw+a5OSYtTKdgYqo3TR2Qqo/2ZueajkSs1qtRtPak5YpHE0WjNKJc4k3vZimWuTGbAAvLIaf9mNRQt9XNhkweNe6iGIpMxIBbfezL0CKBwQtQoRdXELgrCahgwfLbT0ohDXB0tl2LITCcM3SuB+PgjovWWbzFSZseQT75TIjTKASaH6IlGGBt7+c6zcMOLz/k+A86TtuPohwrRtDKdPY9V61NDdY6il67l513Oslp00hFjHUIlO2GZWgWGyUzuxtqTFWP1FhnRXxkYqCIPZnUmajzJcdkwjfm4V9iYn3wETXuhc/J5vKxB41IQoC5g1wpNd89bm719JTuxRGuBrZL1XcXpI6sasnjW3ldA26gmkeZ4ZcFF6HoT4Nie8Jd6Iy72WKatGxdUUHnnqk6GHFJEojmuxxwY9IMTbsJgp95+Q7FMyFFXmXO5lvqiZI/LJy1dV3gK+qhnnigMcsSN5yaIgZvmOTF2vAX8DeeYAnW7f/D37le8HBcoNKhzPwqN1aA6C/Dg27lqYXPgafCaFkXnNO7reW15iBA1Bw8="
file_glob: true
file: $TRAVIS_BUILD_DIR/deploy/*.zip
skip_cleanup: true
overwrite: true
prerelease: true
on:
branch: master
tags: true
\ No newline at end of file
| Windows |
| :---- |
[![Windows build status][1]][2] |
| Windows | Linux | OS X |
| :---- | :------ | :---- |
[![Windows build status][1]][2] | [![Linux build status][3]][4] | [![OS X build status][5]][6] |
[1]: https://ci.appveyor.com/api/projects/status/j1evinfefeetctvk?svg=true
[1]: https://ci.appveyor.com/api/projects/status/vjx9pijlu5d2tbw0?svg=true
[2]: https://ci.appveyor.com/project/stratis/breeze
[3]: https://travis-ci.org/stratisproject/Breeze.svg?branch=master
[4]: https://travis-ci.org/stratisproject/Breeze
[5]: https://travis-ci.org/stratisproject/Breeze.svg?branch=master
[6]: https://travis-ci.org/stratisproject/Breeze
# Breeze
......@@ -47,8 +51,11 @@ If you want the :sparkles: latest :sparkles: (unstable :bomb:) version of the Br
| | x86 Release | x64 Release |
|:---|----------------:|------------------:|
|**Windows 7**| [build][7] | [build][8] |
|**Windows 10**| [build][9] | [build][10] |
|**Windows 7**| [download][7] | [download][8] |
|**Windows 10**| [download][9] | [download][10] |
|**Ubuntu 14.04**| - | coming soon |
|**OS X 10.11**| - | coming soon |
|**OS X 10.12**| - | coming soon |
[7]: https://ci.appveyor.com/api/projects/stratis/breeze/artifacts/breeze_out/breeze-win7-x86-Release.zip?job=Environment%3A%20win_runtime%3Dwin7-x86%3B%20Configuration%3A%20Release
......
......@@ -105,5 +105,4 @@ artifacts:
- path: breeze_out\*.zip
name: Breeze app
- path: dotnet_out\*.zip
name: api libraries
name: dotnet libraries
\ No newline at end of file
#!/bin/bash
# exit if error
set -o errexit
echo "current environment variables:"
echo "OS name:" $TRAVIS_OS_NAME
echo "Platform:" $os_platform
echo "Build directory:" $TRAVIS_BUILD_DIR
echo "Node version:" $TRAVIS_NODE_VERSION
echo "Architecture:" $arch
echo "Configuration:" $configuration
echo "App output name" $app_output_name
echo "Api output name" $api_output_name
dotnet --info
# Initialize dependencies
echo $log_prefix STARTED restoring dotnet and npm packages
cd Breeze
git submodule init
git submodule update
dotnet restore -v m
cd ../Breeze.UI
npm install
echo $log_prefix FINISHED restoring dotnet and npm packages
# dotnet build
echo $log_prefix running 'dotnet build'
cd ../Breeze/src/Breeze.Daemon
dotnet build -c $configuration -v m
echo $log_prefix running 'dotnet publish'
dotnet publish -c $configuration -v m -o $TRAVIS_BUILD_DIR/dotnet_out/$TRAVIS_OS_NAME
echo $log_prefix zipping results of 'dotnet publish' into $TRAVIS_BUILD_DIR/dotnet_out/$api_output_name.zip
mkdir -p $TRAVIS_BUILD_DIR/deploy/
zip -r $TRAVIS_BUILD_DIR/deploy/$api_output_name.zip $TRAVIS_BUILD_DIR/dotnet_out/$TRAVIS_OS_NAME/*
# node Build
cd ../../../Breeze.UI
echo $log_prefix running 'npm run'
npm run build:prod
# node packaging
echo $log_prefix packaging breeze
node package.js --platform=$os_platform --arch=$arch --path=$TRAVIS_BUILD_DIR/breeze_out
# copy api libs into app
echo $log_prefix copying the Breeze api into the app
mkdir -p $TRAVIS_BUILD_DIR/breeze_out/breeze-ui-$os_platform-$arch/resources/app/assets/daemon/
cp $TRAVIS_BUILD_DIR/dotnet_out/$TRAVIS_OS_NAME/* $TRAVIS_BUILD_DIR/breeze_out/breeze-ui-$os_platform-$arch/resources/app/assets/daemon/
# zip result
echo $log_prefix zipping the app into $TRAVIS_BUILD_DIR/breeze_out/$app_output_name.zip
zip -r $TRAVIS_BUILD_DIR/deploy/$app_output_name.zip $TRAVIS_BUILD_DIR/breeze_out/breeze-ui-$os_platform-$arch/*
#tests
echo $log_prefix running tests
dotnet test -c $configuration $TRAVIS_BUILD_DIR/Breeze/src/Breeze.Api.Tests/Breeze.Api.Tests.csproj -v m
echo $log_prefix FINISHED build
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment