2020-06-17 10:48:08 -04:00
name : "Build"
2021-03-04 13:35:45 -05:00
on : [ push, pull_request, workflow_dispatch]
2020-06-17 10:48:08 -04:00
jobs :
2021-08-24 10:12:10 -04:00
test :
name : Test (${{ matrix.java }})
2022-07-01 15:02:06 -04:00
runs-on : ubuntu-20.04
2020-06-17 10:48:08 -04:00
strategy :
fail-fast : false
matrix :
2023-03-29 07:55:03 -04:00
java : [ 11 , 17 , 20 ]
2020-06-17 10:48:08 -04:00
steps :
2022-07-01 15:02:06 -04:00
- uses : actions/checkout@v3
2021-10-13 10:43:17 -04:00
- name : Cache Maven Local Repo
if : ${{ !startsWith(github.ref, 'refs/tags/') }}
2022-07-01 15:02:06 -04:00
uses : actions/cache@v3
2020-06-17 10:48:08 -04:00
with :
path : |
2022-07-01 07:32:49 -04:00
~/.m2/repository/
key : ${{ runner.os }}-mvn-${{ hashFiles('**/pom.xml') }}
2020-06-17 10:48:08 -04:00
restore-keys : |
2022-07-01 07:32:49 -04:00
${{ runner.os }}-mvn-
2020-06-17 10:48:08 -04:00
- name : Install JDK ${{ matrix.java }}
2022-07-01 15:02:06 -04:00
uses : actions/setup-java@v3
2020-06-17 10:48:08 -04:00
with :
java-version : ${{ matrix.java }}
2021-09-24 12:06:48 -04:00
distribution : 'temurin'
2020-06-17 10:48:08 -04:00
# 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
2021-08-24 10:12:10 -04:00
- name : Fast Tests
run : |
2022-09-30 09:56:19 -04:00
mvn -s .github/maven-settings.xml -Dorg.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory.DISABLED=AnythingNotNull -Pfast-tests install
2021-08-24 10:12:10 -04:00
2022-07-01 07:32:49 -04:00
- name : Clean Up Before Caching
run : |
rm -rf ~/.m2/repository/org/apache/activemq/tests
rm -rf ~/.m2/repository/org/apache/activemq/examples
if [ -d ~/.m2/repository/org/apache/activemq ]; then find ~/.m2/repository/org/apache/activemq -name "*-SNAPSHOT" -type d -prune -exec rm -r '{}' \; ; fi
2021-08-24 10:12:10 -04:00
checks :
name : Checks (${{ matrix.java }})
2022-07-01 15:02:06 -04:00
runs-on : ubuntu-20.04
2021-08-24 10:12:10 -04:00
strategy :
fail-fast : false
matrix :
2023-03-29 07:55:03 -04:00
java : [ 11 , 17 , 20 ]
2021-08-24 10:12:10 -04:00
steps :
2022-07-01 15:02:06 -04:00
- uses : actions/checkout@v3
2021-10-13 10:43:17 -04:00
- name : Cache Maven Local Repo
if : ${{ !startsWith(github.ref, 'refs/tags/') }}
2022-07-01 15:02:06 -04:00
uses : actions/cache@v3
2021-08-24 10:12:10 -04:00
with :
path : |
2022-07-01 07:32:49 -04:00
~/.m2/repository/
key : ${{ runner.os }}-mvn-${{ hashFiles('**/pom.xml') }}
2021-08-24 10:12:10 -04:00
restore-keys : |
2022-07-01 07:32:49 -04:00
${{ runner.os }}-mvn-
2021-08-24 10:12:10 -04:00
- name : Install JDK ${{ matrix.java }}
2022-07-01 15:02:06 -04:00
uses : actions/setup-java@v3
2021-08-24 10:12:10 -04:00
with :
java-version : ${{ matrix.java }}
2021-09-24 12:06:48 -04:00
distribution : 'temurin'
2021-08-24 10:12:10 -04:00
2020-09-01 10:30:42 -04:00
- name : Build Main
run : |
2022-09-02 12:29:25 -04:00
mvn -s .github/maven-settings.xml -DskipTests -Derrorprone -Pdev -Pjmh install
2021-03-04 13:35:45 -05:00
2021-08-17 06:28:20 -04:00
- name : Build Examples (JDK11 / -Prelease)
if : matrix.java == '11'
2020-06-17 10:48:08 -04:00
run : |
cd examples
2022-01-20 09:59:03 -05:00
mvn -s ../.github/maven-settings.xml install -Prelease
2020-06-17 10:48:08 -04:00
2021-08-17 06:28:20 -04:00
- name : Build Examples (JDK >11 / -Pexamples,noRun)
if : matrix.java != '11'
2021-03-04 13:35:45 -05:00
run : |
cd examples
2022-01-20 09:59:03 -05:00
mvn -s ../.github/maven-settings.xml install -Pexamples,noRun
2021-04-08 18:43:46 -04:00
2021-08-17 06:28:20 -04:00
- name : Javadoc Check (JDK11 / -Prelease)
if : matrix.java == '11'
2021-04-08 18:43:46 -04:00
run : |
2022-06-29 12:49:30 -04:00
mvn -s .github/maven-settings.xml javadoc:javadoc -Prelease -DskipWebsiteDocGeneration=true -DskipWebsiteJavadocGeneration=true
2021-06-02 11:58:25 -04:00
2021-08-17 06:28:20 -04:00
- name : Javadoc Check (JDK >11)
if : matrix.java != '11'
2021-06-02 11:58:25 -04:00
run : |
2021-08-17 12:56:41 -04:00
mvn -s .github/maven-settings.xml javadoc:javadoc
2022-06-29 12:49:30 -04:00
- name : Website Content Check (JDK11 only / -Prelease)
if : matrix.java == '11'
run : |
mvn -s .github/maven-settings.xml clean install -DskipTests -Prelease -am -pl "artemis-website"
2022-07-01 07:32:49 -04:00
- name : Clean Up Before Caching
run : |
rm -rf ~/.m2/repository/org/apache/activemq/tests
rm -rf ~/.m2/repository/org/apache/activemq/examples
if [ -d ~/.m2/repository/org/apache/activemq ]; then find ~/.m2/repository/org/apache/activemq -name "*-SNAPSHOT" -type d -prune -exec rm -r '{}' \; ; fi