Skip to content

Java CI - Snapshots #1899

Java CI - Snapshots

Java CI - Snapshots #1899

#
# Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# ---------------------------------------------------------------------------
# Coherence VisualVM Plugin GitHub Actions CI build against main
# ---------------------------------------------------------------------------
name: Java CI - Snapshots
on:
push:
branches:
- '*'
schedule:
# Every day at midnight
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
coherenceVersion:
- 24.09.1-SNAPSHOT
- 22.06.10-SNAPSHOT
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-snapshots
- name: Set up JDK 17 for Build
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
- name: Print Versions
run: mvn -version && ant -version
- name: Build Plugin
shell: bash
run: |
mvn --file pom.xml --batch-mode -e -DskipTests clean install
- name: Verify
env:
COH_VERSION: ${{ matrix.coherenceVersion }}
shell: bash
run: |
echo "Running verify against $COH_VERSION"
mvn --file coherence-visualvm-tests/coherence-visualvm-tests-ce/pom.xml --batch-mode -nsu -e -Dcoherence.version=$COH_VERSION clean install
echo "Running Topics tests"
mvn --file coherence-visualvm-tests/coherence-visualvm-tests-topics/pom.xml -P topics --batch-mode -nsu -e -Dcoherence.version=$COH_VERSION clean install
- name: Build Artifacts test logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output-${{ matrix.coherenceVersion }}
path: coherence-visualvm-tests/**/target/test-output/**/*
- name: Coherence VisualVM Plugin NBM
uses: actions/upload-artifact@v4
with:
name: coherence-visualvm-plugin-nbm-${{ matrix.coherenceVersion }}
path: coherence-visualvm-plugin/target/coherence-visualvm-plugin*.nbm
- name: Coherence VisualVM Plugin Javadoc
uses: actions/upload-artifact@v4
with:
name: coherence-visualvm-plugin-javadoc-${{ matrix.coherenceVersion }}
path: coherence-visualvm-plugin/target/coherence-visualvm-plugin*javadoc.jar