CI Build #1317
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2020, 2025, Oracle Corporation and/or its affiliates. All rights reserved. | |
# Licensed under the Universal Permissive License v 1.0 as shown at | |
# https://oss.oracle.com/licenses/upl. | |
# --------------------------------------------------------------------------- | |
# Coherence .NET Extend Client GitHub Actions CI build. | |
# --------------------------------------------------------------------------- | |
name: CI Build | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 2 * * *" | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- committed | |
branches: | |
- main | |
- '*' | |
jobs: | |
build: | |
name: Build on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Set up .NET versions | |
- name: Set up dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
6.x | |
8.x | |
# Clean | |
- name: Clean | |
run: dotnet nuget locals all --clear | |
# Build | |
- name: Build | |
run: | | |
dotnet restore | |
dotnet build --configuration Release --no-restore | |
test-linux: | |
name: Test on Linux against Coherence ${{ matrix.coherence_version }} | |
needs: build | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
coherence_version: [14.1.1-0-20, 22.06.11, 14.1.2-0-1, 24.09.3] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Set up .NET versions | |
- name: Set up dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
6.x | |
8.x | |
# Set up Java 17 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'oracle' | |
java-version: '17' | |
# Build | |
- name: Build | |
run: | | |
dotnet restore | |
dotnet build --configuration Release --no-restore | |
# Build test server | |
- name: Build test server | |
run: | | |
pushd tests/test-server | |
mvn --batch-mode -e clean install -s .mvn/settings.xml -Drevision=${{ matrix.coherence_version }} -Dcoherence.groupid=com.oracle.coherence.ce -Dmain=com.tangosol.net.DefaultCacheServer | |
popd | |
# Start test server | |
- name: Start test server | |
run: | | |
pushd tests/test-server | |
mvn --batch-mode -e exec:exec -s .mvn/settings.xml -Drevision=${{ matrix.coherence_version }} -Dcoherence.groupid=com.oracle.coherence.ce -Dmain=com.tangosol.net.DefaultCacheServer -Dexec.args="-Dcoherence.log=DefaultCacheServer.log -cp %classpath com.tangosol.net.DefaultCacheServer" & | |
sleep 30 | |
popd | |
# Start test server | |
- name: Start test server | |
run: | | |
pushd tests/test-server | |
mvn --batch-mode -e exec:exec -s .mvn/settings.xml -Drevision=${{ matrix.coherence_version }} -Dcoherence.groupid=com.oracle.coherence.ce -Dmain=com.tangosol.net.DefaultCacheServer -Dexec.args="-Dcoherence.log=DefaultCacheServer2.log -Dtangosol.coherence.proxy.port=12345 -Dcoherence.proxy.port1=3001 -Dtangosol.coherence.proxy.port5=3002 -Dtangosol.coherence.proxy.port4=3003 -Dtangosol.coherence.proxy.port2=3004 -Dtangosol.coherence.proxy.port11=3005 -Dtangosol.coherence.proxy.port12=3006 -Dtangosol.coherence.proxy.port7=3007 -Dtangosol.coherence.proxy.port9=3008 -Dtangosol.coherence.proxy.port8=3009 -Dcoherence.management=all -cp %classpath com.tangosol.net.DefaultCacheServer" & | |
sleep 30 | |
popd | |
# Run Tests with .net 6 | |
- name: Run Tests | |
run: dotnet test --framework net6.0 --filter FullyQualifiedName\!~Tangosol.Web --configuration Release --no-restore | |
# Run Tests with .net 8 | |
- name: Run Tests 8 | |
run: dotnet test --framework net8.0 --filter FullyQualifiedName\!~Tangosol.Web --configuration Release --no-restore | |
# Capture server log for diagnosing failures | |
- name: Capture test logs | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-output-${{ matrix.coherence_version }} | |
path: | | |
tests/**/*.log |