From 67859aea4448d8ce05b2dafbc4f711f6e3debb16 Mon Sep 17 00:00:00 2001 From: Austin Shalit Date: Thu, 15 Oct 2020 21:52:49 -0400 Subject: [PATCH] [build] Split documentation into its own job (#2775) This also allows us to update the version of java used to build documentation. --- .github/workflows/ci.yml | 19 ++++++++++++++++++- docs/build.gradle | 13 +++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d5d8e4323..73cbdc87a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/docs/build.gradle b/docs/build.gradle index 8952e53cc4..6de7f849c9 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -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'