Skip to content

Commit

Permalink
Remove travis and appveyor (#935)
Browse files Browse the repository at this point in the history
* Remove travis and appveyor files and references
* Un-ignore tests that were disabled on travis or appveyor
* Move javadoc publishing to Azure
* Fix Javadoc errors
  • Loading branch information
SamCarlberg authored Apr 18, 2019
1 parent f789fb2 commit d8ff9ff
Show file tree
Hide file tree
Showing 23 changed files with 56 additions and 140 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

# Source of file: http://benlimmer.com/2013/12/26/automatically-publish-javadoc-to-gh-pages-with-travis-ci/
if [ "$TRAVIS_REPO_SLUG" == "WPIRoboticsProjects/GRIP" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ] && [[ "$TRAVIS_OS_NAME" != "osx" ]]; then
if [ -z "${GH_TOKEN}" ] && [ "${Build_SourceBranchName}" == "master" ]
then

echo -e "Generating javadoc...\n"
./gradlew aggregateJavadocs
Expand All @@ -11,15 +12,15 @@ if [ "$TRAVIS_REPO_SLUG" == "WPIRoboticsProjects/GRIP" ] && [ "$TRAVIS_JDK_VERSI
cp -R build/docs/javadoc $HOME/javadoc-latest

cd $HOME
git config --global user.email "travis@travis-ci.org"
git config --global user.name "travis-ci"
git config --global user.email "azuredevops@microsoft.com"
git config --global user.name "azure-pipelines"
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/WPIRoboticsProjects/grip gh-pages #> /dev/null

cd gh-pages
git rm -rf ./javadoc
cp -Rf $HOME/javadoc-latest ./javadoc
git add -f .
git commit -m "Lastest javadoc on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages"
git commit -m "Lastest javadoc on successful Azure build ${Build_BuildNumber} auto-pushed to gh-pages"
git push -fq origin gh-pages #> /dev/null

echo -e "Published Javadoc to gh-pages.\n"
Expand Down
5 changes: 0 additions & 5 deletions .travis-scripts/before-deploy.sh

This file was deleted.

8 changes: 0 additions & 8 deletions .travis-scripts/install.sh

This file was deleted.

8 changes: 0 additions & 8 deletions .travis-scripts/linux-opencv-install.sh

This file was deleted.

14 changes: 0 additions & 14 deletions .travis-scripts/osx-opencv-install.sh

This file was deleted.

54 changes: 0 additions & 54 deletions .travis.yml

This file was deleted.

7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

[![Join the chat at https://gitter.im/WPIRoboticsProjects/GRIP](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/WPIRoboticsProjects/GRIP?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://dev.azure.com/wpiroboticsprojects/GRIP/_apis/build/status/WPIRoboticsProjects.GRIP?branchName=master)](https://dev.azure.com/wpiroboticsprojects/GRIP/_build/latest?definitionId=1?branchName=master)
[![Build Status](https://travis-ci.org/WPIRoboticsProjects/GRIP.svg?branch=master)](https://travis-ci.org/WPIRoboticsProjects/GRIP)
[![Build status](https://ci.appveyor.com/api/projects/status/sbrd2nhpiktlhf58/branch/master?svg=true)](https://ci.appveyor.com/project/JLLeitschuh/grip/branch/master)
[![codecov.io](http://codecov.io/github/WPIRoboticsProjects/GRIP/coverage.svg?branch=master)](http://codecov.io/github/WPIRoboticsProjects/GRIP?branch=master)
[![Github Releases](https://img.shields.io/github/downloads/WPIRoboticsProjects/GRIP/total.svg)](/~https://github.com/WPIRoboticsProjects/GRIP/releases/latest)

Expand Down Expand Up @@ -60,8 +58,3 @@ If you don't have an internet connection you can build using the `--offline` fla
## Contributing

See the guide on [setting up build tools](/~https://github.com/WPIRoboticsProjects/GRIP/wiki/Setting-up-build-tools) in the wiki.

## Thanks

Thanks to [TravisCI](https://travis-ci.org/) and [AppVeyor](https://www.appveyor.com/) for providing their continuous integration
servers to open source projects for free.
8 changes: 0 additions & 8 deletions appveyor.yml

This file was deleted.

6 changes: 6 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ jobs:
gradleOptions: '-Xmx3072m'
publishJUnitResults: false
tasks: 'check :ui:jpackage -Pgeneration -PjniLocation=build/OpenCVJNI -Pheadless=true -PlogTests -Pjdk13=/opt/java/jdk-13 --stacktrace'
- script: |
.azure-scripts/push-javadoc-to-gh-pages.sh
displayName: 'Publish Javadocs'
condition: |
and(not(eq(variables['Build.Reason'], 'PullRequest')),
eq(variables['Build.SourceBranch'], 'refs/heads/master'))
- task: CopyFiles@2
inputs:
Expand Down
10 changes: 10 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ buildscript {
}
dependencies {
classpath(group = "edu.wpi.first.wpilib.opencv", name = "opencv-installer", version = "2.0.0")
classpath("com.netflix.nebula:gradle-aggregate-javadocs-plugin:2.2.+")

}
}

Expand All @@ -25,6 +27,10 @@ plugins {
id("com.gradle.build-scan") version "2.1"
}

apply {
plugin("nebula-aggregate-javadocs")
}

buildScan {
setTermsOfServiceUrl("https://gradle.com/terms-of-service")
setTermsOfServiceAgree("yes")
Expand Down Expand Up @@ -171,3 +177,7 @@ tasks.register<JacocoReport>("jacocoRootReport") {
csv.isEnabled = false
}
}

tasks.withType<Javadoc> {
isFailOnError = false
}
2 changes: 0 additions & 2 deletions core/src/main/java/edu/wpi/grip/core/Operation.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ public interface Operation {

/**
* @return A list of sockets for the inputs that the operation expects.
* @implNote The returned list should be immutable (i.e. read-only)
*/
List<InputSocket> getInputSockets();

/**
* @return A list of sockets for the outputs that the operation produces.
* @implNote The returned list should be immutable (i.e. read-only)
*/
List<OutputSocket> getOutputSockets();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public final class ExceptionEvent {
/**
* @param origin The object that triggered this exception.
* @param exception The exception this is handling.
* @param message The message associated with this event. If <tt>null</tt> will use {@link
* @param message The message associated with this event. If {@code null} will use {@link
* Exception#getMessage()}
*/
public ExceptionEvent(Object origin, Exception exception, @Nullable String message) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* <li>How long the timed action took, in microseconds</li>
* <li>Historical data about the action</li>
* </ul>
* </p>
*/
public class TimerEvent {

Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/edu/wpi/grip/core/http/GripServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public enum State {
* <p>For example, performing a {@code GET} request on the path
* {@code /GRIP/data?foo&bar} will return a map such as
* <br>
* <code><pre>
* <pre><code>
* {
* 'foo': {
* // data
Expand All @@ -102,7 +102,7 @@ public enum State {
* // data
* }
* }
* </pre></code>
* </code></pre>
*/
public static final String DATA_PATH = ROOT_PATH + "/data";

Expand Down
3 changes: 1 addition & 2 deletions core/src/main/java/edu/wpi/grip/core/metrics/Timer.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
* Timer myTimer = ...
* myTimer.time(this::doSomething);
* </code></pre>
* </p>
*/
public class Timer {

Expand Down Expand Up @@ -88,7 +87,7 @@ public synchronized void reset() {
* <pre><code>
* Timer myTimer = ...
* myTimer.time(this::doSomething);
* </code></pre></p>
* </code></pre>
*
* @param target the code to time
* @throws IllegalStateException if this timer is already timing something
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class CodeGenerationSettings {
* The default code generation settings.
* <br>
* <table>
* <caption>Default Values</caption>
* <tr><td>Language</td><td>Java</td></tr>
* <tr><td>Class name</td><td>GripPipeline</td></tr>
* <tr><td>Implement WPILib API</td><td>false</td></tr>
Expand All @@ -43,6 +44,7 @@ public class CodeGenerationSettings {
* Creates the default code generation settings.
* <br>
* <table>
* <caption>Default Values</caption>
* <tr><td>Language</td><td>Java</td></tr>
* <tr><td>Class name</td><td>GripPipeline</td></tr>
* <tr><td>Implement WPILib API</td><td>false</td></tr>
Expand Down
13 changes: 9 additions & 4 deletions core/src/main/java/edu/wpi/grip/core/util/ExceptionWitness.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@

/**
* Witnesses and reports exception. <b>This class is not suitable to handle {@link Error
* Errors}.</b><br /> {@link #flagException} should be used to flag the witness that an error has
* has occurred. This will post an {@link ExceptionEvent} to the {@link EventBus}. <br /> <br />
* Example Usage: <blockquote>
* Errors}.</b>
*
* <p>{@link #flagException} should be used to flag the witness that an error has
* has occurred. This will post an {@link ExceptionEvent} to the {@link EventBus}.
*
* <p>Example Usage: <blockquote>
* <pre>
* {@code
* while(true){
Expand Down Expand Up @@ -61,7 +64,9 @@ public final void flagException(final Exception exception, @Nullable final Strin
}

/**
* @see #flagException(Exception, String).
* Indicates to the witness that an exception has occurred.
*
* @see #flagException(Exception, String)
*/
public final void flagException(Exception exception) {
flagException(exception, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

public enum ThresholdTypesEnum {

/** \f[\texttt{dst} (x,y) = \fork{\texttt{maxval}}{if \(\texttt{src}(x,y) > \texttt{thresh}\)}{0}{otherwise}\f] */
THRESH_BINARY(opencv_imgproc.THRESH_BINARY), /** \f[\texttt{dst} (x,y) = \fork{0}{if \(\texttt{src}(x,y) > \texttt{thresh}\)}{\texttt{maxval}}{otherwise}\f] */
THRESH_BINARY_INV(opencv_imgproc.THRESH_BINARY_INV), /** \f[\texttt{dst} (x,y) = \fork{\texttt{threshold}}{if \(\texttt{src}(x,y) > \texttt{thresh}\)}{\texttt{src}(x,y)}{otherwise}\f] */
THRESH_TRUNC(opencv_imgproc.THRESH_TRUNC), /** \f[\texttt{dst} (x,y) = \fork{\texttt{src}(x,y)}{if \(\texttt{src}(x,y) > \texttt{thresh}\)}{0}{otherwise}\f] */
THRESH_TOZERO(opencv_imgproc.THRESH_TOZERO), /** \f[\texttt{dst} (x,y) = \fork{0}{if \(\texttt{src}(x,y) > \texttt{thresh}\)}{\texttt{src}(x,y)}{otherwise}\f] */
/** \f[\texttt{dst} (x,y) = \fork{\texttt{maxval}}{if \(\texttt{src}(x,y) &gt; \texttt{thresh}\)}{0}{otherwise}\f] */
THRESH_BINARY(opencv_imgproc.THRESH_BINARY), /** \f[\texttt{dst} (x,y) = \fork{0}{if \(\texttt{src}(x,y) &gt; \texttt{thresh}\)}{\texttt{maxval}}{otherwise}\f] */
THRESH_BINARY_INV(opencv_imgproc.THRESH_BINARY_INV), /** \f[\texttt{dst} (x,y) = \fork{\texttt{threshold}}{if \(\texttt{src}(x,y) &gt; \texttt{thresh}\)}{\texttt{src}(x,y)}{otherwise}\f] */
THRESH_TRUNC(opencv_imgproc.THRESH_TRUNC), /** \f[\texttt{dst} (x,y) = \fork{\texttt{src}(x,y)}{if \(\texttt{src}(x,y) &gt; \texttt{thresh}\)}{0}{otherwise}\f] */
THRESH_TOZERO(opencv_imgproc.THRESH_TOZERO), /** \f[\texttt{dst} (x,y) = \fork{0}{if \(\texttt{src}(x,y) &gt; \texttt{thresh}\)}{\texttt{src}(x,y)}{otherwise}\f] */
THRESH_TOZERO_INV(opencv_imgproc.THRESH_TOZERO_INV), THRESH_MASK(opencv_imgproc.THRESH_MASK), /** flag, use Otsu algorithm to choose the optimal threshold value */
THRESH_OTSU(opencv_imgproc.THRESH_OTSU), /** flag, use Triangle algorithm to choose the optimal threshold value */
THRESH_TRIANGLE(opencv_imgproc.THRESH_TRIANGLE);
Expand Down
2 changes: 0 additions & 2 deletions ui/src/main/java/edu/wpi/grip/ui/OperationListController.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
/**
* Controller for a VBox of {@link OperationController}s. The user data for this should be what
* category it shows, and the filterText property allows for fuzzy searching the operations.
*
* @see edu.wpi.grip.core.OperationCategory
*/
@ParametrizedController(url = "OperationList.fxml")
public class OperationListController {
Expand Down
16 changes: 11 additions & 5 deletions ui/src/main/java/edu/wpi/grip/ui/util/ControllerMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,17 @@ private boolean addAllNodesToObservable(int index, Collection<N> nodes) {
*
* @param index The index to place the Node
* @param controller The controller to get the node from
* @return <tt>true</tt> if the observable list changed as a result of the call
* @return {@code true} if the observable list changed as a result of the call
* @see List#add(int, Object)
*/
public boolean add(int index, C controller) {
return addAll(index, Collections.singleton(controller));
}

/**
* @see List#add(Object).
* Adds a controller to the map.
*
* @see List#add(Object)
*/
public boolean add(C controller) {
return add(size(), controller);
Expand All @@ -120,7 +122,7 @@ public boolean add(C controller) {
*
* @param index The index to place the nodes
* @param controllers The controllers to get the nodes from
* @return <tt>true</tt> if the observable list changed as a result of the call
* @return {@code true} if the observable list changed as a result of the call
* @see List#addAll(int, Collection)
*/
public boolean addAll(int index, Collection<C> controllers) {
Expand All @@ -131,14 +133,18 @@ public boolean addAll(int index, Collection<C> controllers) {
}

/**
* @see List#addAll(Collection).
* Adds multiple controllers to the map at once.
*
* @see List#addAll(Collection)
*/
public boolean addAll(Collection<C> controllers) {
return addAll(size(), controllers);
}

/**
* @see List#addAll(Collection).
* Adds multiple controllers to the map at once.
*
* @see List#addAll(Collection)
*/
public boolean addAll(C... controllers) {
return addAll(Arrays.asList(controllers));
Expand Down
8 changes: 4 additions & 4 deletions ui/src/main/java/edu/wpi/grip/ui/util/ImageConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public Image convert(MatWrapper wrapper, int desiredHeight) {
* Convert a BGR-formatted OpenCV {@link Mat} into a JavaFX {@link Image}. JavaFX understands ARGB
* pixel data, so one way to turn a Mat into a JavaFX image is to shift around the bytes from the
* Mat into an int array of pixels. This is also possible to do by using JavaCV, but the JavaCV
* method involves several intermediate conversions (Mat -> Frame -> BufferedImage -> JavaFX
* Image) and is way too slow to use for a real-time video.
* method involves several intermediate conversions ({@code Mat -> Frame -> BufferedImage ->
* JavaFX Image}) and is way too slow to use for a real-time video.
*
* @param mat An 8-bit OpenCV Mat containing an image with either 1 or 3 channels
* @param desiredHeight the desired height of the image
Expand Down Expand Up @@ -134,8 +134,8 @@ public Image convert(Mat mat, int desiredHeight) {
* Convert a BGR-formatted OpenCV {@link Mat} into a JavaFX {@link Image}. JavaFX understands ARGB
* pixel data, so one way to turn a Mat into a JavaFX image is to shift around the bytes from the
* Mat into an int array of pixels. This is also possible to do by using JavaCV, but the JavaCV
* method involves several intermediate conversions (Mat -> Frame -> BufferedImage -> JavaFX
* Image) and is way too slow to use for a real-time video.
* method involves several intermediate conversions ({@code Mat -> Frame -> BufferedImage ->
* JavaFX Image}) and is way too slow to use for a real-time video.
*
* @param mat An 8-bit OpenCV Mat containing an image with either 1 or 3 channels
*
Expand Down
Loading

0 comments on commit d8ff9ff

Please sign in to comment.