mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
[build] Split documentation into its own job (#2775)
This also allows us to update the version of java used to build documentation.
This commit is contained in:
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
@@ -65,6 +65,23 @@ jobs:
|
||||
name: ${{ matrix.artifact-name }}
|
||||
path: build/allOutputs
|
||||
|
||||
build-documentation:
|
||||
name: "Build - Documentation"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Fetch all history and metadata
|
||||
run: git fetch --prune --unshallow --tags
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 13
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew docs:zipDocs
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Documentation
|
||||
path: docs/build/outputs
|
||||
|
||||
build-cmake:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -145,7 +162,7 @@ jobs:
|
||||
|
||||
combine:
|
||||
name: Combine
|
||||
needs: [build-docker, build-host]
|
||||
needs: [build-docker, build-host, build-documentation]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@@ -130,7 +130,9 @@ task generateJavaDocs(type: Javadoc) {
|
||||
ext.entryPoint = "$destinationDir/index.html"
|
||||
|
||||
if (JavaVersion.current().isJava11Compatible()) {
|
||||
options.addBooleanOption('-no-module-directories', true)
|
||||
if (!JavaVersion.current().isJava12Compatible()) {
|
||||
options.addBooleanOption('-no-module-directories', true)
|
||||
}
|
||||
doLast {
|
||||
// This is a work-around for https://bugs.openjdk.java.net/browse/JDK-8211194. Can be removed once that issue is fixed on JDK's side
|
||||
// Since JDK 11, package-list is missing from javadoc output files and superseded by element-list file, but a lot of external tools still need it
|
||||
@@ -148,11 +150,10 @@ tasks.register("zipJavaDocs", Zip) {
|
||||
into '/'
|
||||
}
|
||||
|
||||
addTaskToCopyAllOutputs(zipCppDocs)
|
||||
addTaskToCopyAllOutputs(zipJavaDocs)
|
||||
|
||||
build.dependsOn zipCppDocs
|
||||
build.dependsOn zipJavaDocs
|
||||
tasks.register("zipDocs") {
|
||||
dependsOn zipCppDocs
|
||||
dependsOn zipJavaDocs
|
||||
}
|
||||
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user