Skip to content

Commit

Permalink
Maybe also publish
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Dec 30, 2023
1 parent 774c132 commit 324cb42
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Gradle Build
run: |
chmod +x gradlew
./gradlew photon-server:build photon-lib:build -x check --max-workers 2
./gradlew build -x check --max-workers 2
- name: Gradle Tests
run: ./gradlew testHeadless -i --max-workers 1 --stacktrace
- name: Gradle Coverage
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build

on:
push:
branches: [ master ]
tags:
- 'v*'
pull_request:
branches: [ master ]

jobs:
run_docs:
runs-on: "ubuntu-22.04"
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --tags --force
- name: Install Java 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin

- name: Set environment variables (Development)
run: |
echo "BRANCH=development" >> $GITHUB_ENV
if: github.ref == 'refs/heads/main'
- name: Set environment variables (Tag)
run: |
echo "BRANCH=beta" >> $GITHUB_ENV
if: startsWith(github.ref, 'refs/tags/v')
- name: Set environment variables (Release)
run: |
echo "BRANCH=release" >> $GITHUB_ENV
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'alpha') && !contains(github.ref, 'beta')

- name: Gradle Build
run: |
chmod +x gradlew
./gradlew docs:generateJavaDocs docs:doxygen
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
ssh-key: true
repository-name: photonvision/photonvision.github.io
branch: photonvision-${{ env.BRANCH }}
clean: true
single-commit: true
folder: docs/build/docs
19 changes: 7 additions & 12 deletions docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ doxygen {
html_extra_stylesheet 'theme.css'
html_timestamp true
javadoc_autobrief true
project_name 'WPILibC++'
project_name 'PhotonVision C++'
project_logo '../wpiutil/src/main/native/resources/wpilib-128.png'
project_number pubVersion
quiet true
Expand Down Expand Up @@ -205,22 +205,17 @@ ext {
useDocumentation = true
}

// apply from: "${rootDir}/shared/opencv.gradle"

task generateJavaDocs(type: Javadoc) {
// classpath += project(":wpimath").sourceSets.main.compileClasspath
def exportedProjects = [':photon-core',':photon-server',':photon-targeting',':photon-lib']

source exportedProjects.collect { project(it).sourceSets.main.allJava }
classpath = files(exportedProjects.collect { project(it).sourceSets.main.compileClasspath })
dependsOn project(':photon-core').writeCurrentVersion

options.links("https://docs.oracle.com/en/java/javase/17/docs/api/")
options.addStringOption("tag", "pre:a:Pre-Condition")
options.addBooleanOption("Xdoclint:html,missing,reference,syntax", true)
options.addBooleanOption('html5', true)
options.linkSource(true)
dependsOn project(':photon-core').writeCurrentVersion
source project(':photon-core').sourceSets.main.java
source project(':photon-server').sourceSets.main.java
source project(':photon-targeting').sourceSets.main.java
source project(':photon-lib').sourceSets.main.java
source configurations.javaSource.collect { zipTree(it) }
include '**/*.java'
failOnError = true

title = "PhotonVision $pubVersion"
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ include 'photon-targeting'
include 'photon-core'
include 'photon-server'
include 'photon-lib'
include 'docs'
include 'docs'

0 comments on commit 324cb42

Please sign in to comment.