-
Notifications
You must be signed in to change notification settings - Fork 945
178 lines (153 loc) · 6.11 KB
/
build.yml
File metadata and controls
178 lines (153 loc) · 6.11 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
name: "Build"
on:
push:
paths-ignore: &ignored_paths
- '**.adoc'
pull_request:
paths-ignore: *ignored_paths
workflow_dispatch:
inputs:
examplesRepo:
description: 'The examples repo to use'
required: true
default: 'apache/artemis-examples'
type: string
examplesRepoBranch:
description: 'Branch in examples repo'
required: true
default: 'development'
type: string
env:
EXAMPLES_REPO: ${{ inputs.examplesRepo || 'apache/artemis-examples' }}
EXAMPLES_BRANCH: ${{ inputs.examplesRepoBranch || 'development' }}
jobs:
test:
name: Test (${{ matrix.java }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
java: [ 17, 21, 25 ]
steps:
- uses: actions/checkout@v4
with:
path: artemis
# Cache is prepared by the 'checks' jobs below
- name: Restore Maven Local Repo Cache
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: |
~/.m2/repository/
key: ${{ runner.os }}-mvn-${{ hashFiles('artemis/**/pom.xml') }}
restore-keys: |
${{ runner.os }}-mvn-
- name: Install JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
# use 'install' so smoke-tests will work
# By setting anything to org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory.DISABLED we are disabling libaio loading on the testsuite
- name: Fast Tests
run: |
cd artemis
mvn -s .github/maven-settings.xml -Dorg.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory.DISABLED=AnythingNotNull -Pfast-tests -Pcompatibility-tests install
- name: Archive Test Logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: surefire-reports-jdk-${{ matrix.java }}
path: artemis/**/target/surefire-reports/*
retention-days: 10
checks:
name: Checks (${{ matrix.java }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
java: [ 17, 21, 25 ]
steps:
- uses: actions/checkout@v4
with:
path: artemis
- name: Cache Maven Local Repo
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache@v4
with:
path: |
~/.m2/repository/
key: ${{ runner.os }}-mvn-${{ hashFiles('artemis/**/pom.xml') }}
restore-keys: |
${{ runner.os }}-mvn-
- name: Install JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Checkout Artemis Examples Repo
uses: actions/checkout@v4
with:
repository: ${{ env.EXAMPLES_REPO }}
ref: ${{ env.EXAMPLES_BRANCH }}
path: artemis-examples
- name: Build Main (JDK25 / -Prelease)
if: matrix.java == '25'
run: |
cd artemis
mvn -s .github/maven-settings.xml -DskipTests -Derrorprone -Pdev -Prelease -Dgpg.skip -Pcompatibility-tests -DskipCompatibilityTests install
- name: Build Main (JDK <25)
if: matrix.java != '25'
run: |
cd artemis
mvn -s .github/maven-settings.xml -DskipTests -Derrorprone -Pdev -Pjmh -Popenwire-tests -DskipActiveMQ5Tests -Pcompatibility-tests -DskipCompatibilityTests -Dshade-plugin-create-sources=true install
- name: Set Examples Version to Artemis Version
run: |
cd artemis
CURRENT_ARTEMIS_BUILD_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "Current Artemis version: ${CURRENT_ARTEMIS_BUILD_VERSION}"
cd ../artemis-examples
./scripts/update-examples-version.sh ${CURRENT_ARTEMIS_BUILD_VERSION}
- name: Build Examples (JDK25 / -Prelease)
if: matrix.java == '25'
run: |
cd artemis-examples
mvn -s ../artemis/.github/maven-settings.xml install -Prelease
- name: Build Examples (JDK <25 / -Pexamples,noRun)
if: matrix.java != '25'
run: |
cd artemis-examples
mvn -s ../artemis/.github/maven-settings.xml install -Pexamples,noRun
mvn -s ../artemis/.github/maven-settings.xml -f examples/features/standard/security-keycloak/pom.xml install -PnoRun
mvn -s ../artemis/.github/maven-settings.xml -f examples/features/sub-modules/pom.xml install -Prelease -Denforcer.skip
- name: Javadoc Check (JDK25 / -Prelease)
if: matrix.java == '25'
run: |
cd artemis
mvn -s .github/maven-settings.xml javadoc:javadoc -Prelease -DskipWebsiteDocGeneration=true -DskipWebsiteJavadocGeneration=true
- name: Javadoc Check (JDK <25)
if: matrix.java != '25'
run: |
cd artemis
mvn -s .github/maven-settings.xml javadoc:javadoc
- name: Website Content Check (JDK25 / -Prelease)
if: matrix.java == '25'
run: |
cd artemis
mvn -s .github/maven-settings.xml clean install -DskipTests -Prelease -am -pl "artemis-website"
- name: Website Content Check (JDK <25)
if: matrix.java != '25'
run: |
cd artemis
mvn -s .github/maven-settings.xml clean install -DskipTests -Prelease -Denforcer.skip -am -pl "artemis-website"
- name: Additional Cache Priming
run: |
cd artemis
mvn -s .github/maven-settings.xml clean verify -Prelease -Denforcer.skip -pl "artemis-unit-test-support,org.apache.activemq:artemis-junit-5"
- name: Clean Up Before Caching
run: |
rm -rf ~/.m2/repository/org/apache/activemq/tests
rm -rf ~/.m2/repository/org/apache/activemq/examples
rm -rf ~/.m2/repository/org/apache/artemis/tests
rm -rf ~/.m2/repository/org/apache/artemis/examples
if [ -d ~/.m2/repository/org/apache ]; then find ~/.m2/repository/org/apache -name "*-SNAPSHOT" -type d -prune -exec rm -r '{}' \; ; fi