Skip to content

Commit

Permalink
GEOMESA-3049 Add scaladocs to CI build (#3231)
Browse files Browse the repository at this point in the history
* Fix overwrite of scaladocs by javadocs in mixed scala/java modules
* Clean up github workflows
  • Loading branch information
elahrvivaz authored Nov 11, 2024
1 parent 3244490 commit 9c923e3
Show file tree
Hide file tree
Showing 14 changed files with 190 additions and 222 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/build-and-test-2.12.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/build-and-test-2.13.yml

This file was deleted.

168 changes: 58 additions & 110 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ permissions: # added using https://github.com/step-security/secure-repo

env:
MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dlicense.skip=true --batch-mode
MAVEN_TEST_OPTS: -Dtest.fork.count=1

jobs:
build-scala:
compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
Expand All @@ -41,124 +40,73 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: classes-and-jars
name: classes-and-jars-${{ inputs.scala-version }}
retention-days: 1
path: |
m2-geomesa
classes.tgz
- name: Remove geomesa artifacts
if: success() || failure()
run: rm -rf ~/.m2/repository/org/locationtech/geomesa
accumulo-ds-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: -pl :geomesa-accumulo-datastore_${{ inputs.scala-version }}
scala-version: ${{ inputs.scala-version }}
accumulo-other-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: -f geomesa-accumulo -pl -:geomesa-accumulo-datastore_${{ inputs.scala-version }}
scala-version: ${{ inputs.scala-version }}
arrow-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: -f geomesa-arrow
scala-version: ${{ inputs.scala-version }}
cassandra-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: -f geomesa-cassandra
scala-version: ${{ inputs.scala-version }}
convert-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: -f geomesa-convert
scala-version: ${{ inputs.scala-version }}
cqengine-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: -f geomesa-memory
scala-version: ${{ inputs.scala-version }}
features-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: -f geomesa-features
scala-version: ${{ inputs.scala-version }}
fs-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: -f geomesa-fs
scala-version: ${{ inputs.scala-version }}
gt-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: -f geomesa-gt
scala-version: ${{ inputs.scala-version }}
hbase-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: -f geomesa-hbase
scala-version: ${{ inputs.scala-version }}
kafka-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: -f geomesa-kafka
scala-version: ${{ inputs.scala-version }}
lambda-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: -f geomesa-lambda
scala-version: ${{ inputs.scala-version }}
metrics-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: -f geomesa-metrics
scala-version: ${{ inputs.scala-version }}
process-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: -f geomesa-process
unit-tests:
name: unit-tests (${{ matrix.tests.name }})
strategy:
fail-fast: false
matrix:
tests:
- name: accumulo-ds
selector: -pl :geomesa-accumulo-datastore_${{ inputs.scala-version }}
- name: accumulo-other
selector: -f geomesa-accumulo -pl -:geomesa-accumulo-datastore_${{ inputs.scala-version }}
- name: arrow
selector: -f geomesa-arrow
- name: cassandra
selector: -f geomesa-cassandra
- name: convert
selector: -f geomesa-convert
- name: cqengine
selector: -f geomesa-memory
- name: features
selector: -f geomesa-features
- name: fs
selector: -f geomesa-fs
- name: gt
selector: -f geomesa-gt
- name: hbase
selector: -f geomesa-hbase
- name: kafka
selector: -f geomesa-kafka
- name: lambda
selector: -f geomesa-lambda
- name: metrics
selector: -f geomesa-metrics
- name: process
selector: -f geomesa-process
- name: redis
selector: -f geomesa-redis
- name: spark
selector: -f geomesa-spark
- name: utils
selector: -f geomesa-utils-parent
- name: others
selector: -pl geomesa-filter,geomesa-index-api,geomesa-jobs,geomesa-security,geomesa-tools,geomesa-z3
needs: compile
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: ${{ matrix.tests.selector }}
scala-version: ${{ inputs.scala-version }}
redis-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: -f geomesa-redis
scala-version: ${{ inputs.scala-version }}
spark-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
with:
module-selector: -f geomesa-spark
scala-version: ${{ inputs.scala-version }}
utils-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
integration-tests:
needs: compile
uses: ./.github/workflows/integration-tests.yml
with:
module-selector: -f geomesa-utils-parent
scala-version: ${{ inputs.scala-version }}
other-tests:
needs: build-scala
uses: ./.github/workflows/unit-tests.yml
javadocs:
needs: compile
uses: ./.github/workflows/javadocs.yml
with:
module-selector: -pl geomesa-filter,geomesa-index-api,geomesa-jobs,geomesa-security,geomesa-tools,geomesa-z3
scala-version: ${{ inputs.scala-version }}
integration-tests:
needs: build-scala
uses: ./.github/workflows/integration-tests.yml
dash:
needs: compile
uses: ./.github/workflows/dash.yml
with:
scala-version: ${{ inputs.scala-version }}
scala-version: ${{ inputs.scala-version }}
3 changes: 1 addition & 2 deletions .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# For more information on Codacy Analysis CLI in general, see
# https://github.com/codacy/codacy-analysis-cli.

name: Codacy Security Scan
name: codacy

on:
push:
Expand All @@ -32,7 +32,6 @@ jobs:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
name: Codacy Security Scan
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down
38 changes: 22 additions & 16 deletions .github/workflows/eclipse-dash.yml → .github/workflows/dash.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
name: eclipse-dash
name: dash

on:
push:
branches:
- main
- '[0-9]+.[0-9]+.x'
tags:
- '**'
pull_request:
workflow_call:
inputs:
scala-version:
required: false
type: string
default: "2.12"

permissions: # added using https://github.com/step-security/secure-repo
contents: read

env:
MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false --batch-mode
MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dlicense.skip=true --batch-mode

jobs:
license-check:
dependency-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
Expand All @@ -26,12 +25,19 @@ jobs:
java-version: '11'
- uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
key: ${{ hashFiles('**/pom.xml') }}-dash
path: |
~/.m2/repository/
build/zinc-0.3.15/
- name: Build with Maven
run: ./build/mvn clean install $MAVEN_CLI_OPTS -DskipTests -T4
key: ${{ hashFiles('**/pom.xml') }}-dash-${{ inputs.scala-version }}
path: ~/.m2/repository/
- name: Set Scala version
run: ./build/scripts/change-scala-version.sh ${{ inputs.scala-version }}
- name: Download artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: classes-and-jars-${{ inputs.scala-version }}
- name: Install artifacts
run: |
tar -xf classes.tgz
mkdir -p ~/.m2/repository/org/locationtech/geomesa
mv m2-geomesa/* ~/.m2/repository/org/locationtech/geomesa/
- name: License check
run: mvn org.eclipse.dash:license-tool-plugin:license-check $MAVEN_CLI_OPTS -Pdash -Ddash.fail=true -Ddash.projectId=locationtech.geomesa -DexcludeGroupIds=org.locationtech.geomesa
- name: Show license
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
name: 'Dependency Review'
name: dependency-review
on: [pull_request]

permissions:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
permissions: # added using https://github.com/step-security/secure-repo
contents: read

env:
MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dlicense.skip=true -Dtest.fork.count=1 --batch-mode

jobs:
integration-tests:
runs-on: ubuntu-latest
Expand All @@ -29,14 +32,14 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: classes-and-jars
name: classes-and-jars-${{ inputs.scala-version }}
- name: Install artifacts
run: |
tar -xf classes.tgz
mkdir -p ~/.m2/repository/org/locationtech/geomesa
mv m2-geomesa/* ~/.m2/repository/org/locationtech/geomesa/
- name: Integration Tests
run: mvn failsafe:integration-test failsafe:verify $MAVEN_CLI_OPTS $MAVEN_TEST_OPTS
run: mvn failsafe:integration-test failsafe:verify $MAVEN_CLI_OPTS
- name: Remove geomesa artifacts
if: success() || failure()
run: rm -rf ~/.m2/repository/org/locationtech/geomesa
47 changes: 47 additions & 0 deletions .github/workflows/javadocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: javadocs

on:
workflow_call:
inputs:
scala-version:
required: false
type: string
default: "2.12"

permissions: # added using https://github.com/step-security/secure-repo
contents: read

env:
MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dlicense.skip=true --batch-mode

jobs:
build-javadocs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
with:
distribution: 'temurin'
java-version: '11'
- uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
key: ${{ hashFiles('**/pom.xml') }}-javadocs-${{ inputs.scala-version }}
path: ~/.m2/repository/
- name: Set Scala version
run: ./build/scripts/change-scala-version.sh ${{ inputs.scala-version }}
- name: Download artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: classes-and-jars-${{ inputs.scala-version }}
- name: Install artifacts
run: |
tar -xf classes.tgz
mkdir -p ~/.m2/repository/org/locationtech/geomesa
mv m2-geomesa/* ~/.m2/repository/org/locationtech/geomesa/
- name: Build scaladocs
run: mvn generate-sources scala:doc-jar $MAVEN_CLI_OPTS
- name: Build javadocs
run: mvn generate-sources javadoc:jar $MAVEN_CLI_OPTS -pl :geomesa-arrow-jts
- name: Remove geomesa artifacts
if: success() || failure()
run: rm -rf ~/.m2/repository/org/locationtech/geomesa
Loading

0 comments on commit 9c923e3

Please sign in to comment.