-
Notifications
You must be signed in to change notification settings - Fork 434
112 lines (108 loc) · 3.75 KB
/
build-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: build-and-test
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:
compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
distribution: 'temurin'
java-version: '11'
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
key: ${{ hashFiles('**/pom.xml') }}-compile-${{ inputs.scala-version }}
path: |
~/.m2/repository/
build/zinc-0.3.15/
- name: Set Scala version
run: ./build/scripts/change-scala-version.sh ${{ inputs.scala-version }}
- name: Build with Maven
run: ./build/mvn clean install $MAVEN_CLI_OPTS -DskipTests -T4
- name: Collect artifacts
run: |
mv ~/.m2/repository/org/locationtech/geomesa m2-geomesa
tar -czf classes.tgz $(find . -path '*/target/classes' -o -path '*/target/test-classes' -type d | tr '\n' ' ')
- name: Upload artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
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
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 }}
integration-tests:
needs: compile
uses: ./.github/workflows/integration-tests.yml
with:
scala-version: ${{ inputs.scala-version }}
javadocs:
needs: compile
uses: ./.github/workflows/javadocs.yml
with:
scala-version: ${{ inputs.scala-version }}
dash:
needs: compile
uses: ./.github/workflows/dash.yml
with:
scala-version: ${{ inputs.scala-version }}