Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autonomous travis CI and appveyor builds #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
22 changes: 22 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Travis build configuration
# https://docs.travis-ci.com/user/customizing-the-build/
sudo: required
language: java

jdk:
- oraclejdk8
# - oraclejdk9

os:
- linux

matrix:
allow_failures:
- jdk: oraclejdk9

install:
- sudo apt-get install -y tree

script:
- ant build -Dnbplatform.default.harness.dir=$TRAVIS_BUILD_DIR/nbmant/harness -Dnbplatform.active.dir=$TRAVIS_BUILD_DIR/nbmant
- tree .
76 changes: 76 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# AppVeyor build configuration
# https://www.appveyor.com/docs/build-configuration
# https://www.appveyor.com/docs/appveyor-yml/
#---------------------------------#
# general configuration #
#---------------------------------#

# version format
version: 1.0.1.0.0.7.{build}-{branch}

#---------------------------------#
# environment configuration #
#---------------------------------#

# Build worker image (VM template)
os: Windows Server 2012
environment:
matrix:
- JAVA_HOME: C:\Program Files\Java\jdk1.8.0

# Enable Windows RDP Client Access to Build Worker (non-blocking)
init:
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
- ps: choco install ant

#---------------------------------#
# build configuration #
#---------------------------------#

# use custom build_script
build_script:
- ant build -Dnbplatform.default.harness.dir=%APPVEYOR_BUILD_FOLDER%/nbmant/harness -Dnbplatform.active.dir=%APPVEYOR_BUILD_FOLDER%/nbmant
- tree .
# zip the build folder into an archive
- 7z a cantact-app-%APPVEYOR_REPO_COMMIT%.zip %APPVEYOR_BUILD_FOLDER%/build

#---------------------------------#
# tests configuration #
#---------------------------------#

# to disable automatic tests
test: off

#---------------------------------#
# artifacts configuration #
#---------------------------------#

#specify artifacts to upload
artifacts:
- path: cantact-app-%APPVEYOR_REPO_COMMIT%.zip
name: cantact-app-%APPVEYOR_REPO_COMMIT%

#---------------------------------#
# deployment configuration #
#---------------------------------#

# to disable deployment
deploy: off

#---------------------------------#
# global handlers #
#---------------------------------#

# on successful build
on_success:
- ECHO "BUILD VICTORY"

# on build failure
on_failure:
- ECHO "TRY AND TRY AGAIN"

# after build failure or success
# uncomment to debug via blocking rdp session
on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
36 changes: 17 additions & 19 deletions nbproject/platform.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="platform" default="download" basedir="..">
<!-- REFERENCE autoupdate and bootstrap from https://platform.netbeans.org/tutorials/nbm-ant.html -->
<property name="bootstrap.url"
value="http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/netbeans/harness/tasks.jar"/>
<property name="autoupdate.catalog.url"
value="http://updates.netbeans.org/netbeans/updates/8.0/uc/final/distribution/catalog.xml.gz"/>
<property name="nbmant.download"
value="${basedir}/nbmant"/>
<!--Define custom task-->
<condition property="download.required">
<and>
<not>
Expand All @@ -9,26 +17,16 @@
<isset property="autoupdate.catalog.url"/>
</and>
</condition>
<echo>Current directory : ${user.dir}</echo>
<echo>Harness directory : ${nbplatform.default.harness.dir}</echo>
<echo>Platform directory : ${nbplatform.active.dir}/platform</echo>
<target name="download" if="download.required">
<mkdir dir="${harness.dir}"/>
<pathconvert pathsep="|" property="download.clusters">
<mapper type="flatten"/>
<path path="${cluster.path}"/>
</pathconvert>
<property name="disabled.modules" value=""/>
<pathconvert property="module.includes" pathsep="">
<mapper type="glob" from="${basedir}${file.separator}*" to="(?!^\Q*\E$)"/>
<path>
<filelist files="${disabled.modules}" dir="."/>
</path>
</pathconvert>
<echo message="Downloading clusters ${download.clusters}"/>
<property name="tasks.jar" location="${java.io.tmpdir}/tasks.jar"/>
<get src="${bootstrap.url}" dest="${tasks.jar}" usetimestamp="true" verbose="true"/>
<taskdef name="autoupdate" classname="org.netbeans.nbbuild.AutoUpdate" classpath="${tasks.jar}"/>
<autoupdate installdir="${nbplatform.active.dir}" updatecenter="${autoupdate.catalog.url}">
<modules includes="${module.includes}.*" clusters="${download.clusters}"/>
<modules includes="org[.]netbeans[.]modules[.]apisupport[.]harness" clusters="harness"/>
<mkdir dir="${nbmant.download}"/>
<get src="${bootstrap.url}" dest="${nbmant.download}/tasks.jar" usetimestamp="true" verbose="true"/>
<taskdef name="autoupdate" classname="org.netbeans.nbbuild.AutoUpdate" classpath="${nbmant.download}/tasks.jar"/>
<autoupdate installdir="${nbmant.download}" updatecenter="${autoupdate.catalog.url}">
<modules includes=".*" clusters="harness[0-9]*"/>
<modules includes=".*" clusters="platform[0-9]*"/>
</autoupdate>
</target>
</project>