blob: 65dc602324dadd6484cf7e73d47120184b151b7d [file] [log] [blame]
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Main Win
on:
push:
branches:
- master
- 'rel/*'
- "new_*"
paths-ignore:
- 'docs/**'
- 'site/**'
pull_request:
branches:
- master
- 'rel/*'
- "new_*"
paths-ignore:
- 'docs/**'
- 'site/**'
# allow manually run the action:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
jobs:
win-ut:
strategy:
fail-fast: false
max-parallel: 20
matrix:
java: [ 8, 11, 17 ]
# to reduce the CI time cost; we split the whole CI to 2 parts:
# modules except the server:
# -Diotdb.skip.test=true
# the server module:
# -pl server -am -DskipTests=true -Diotdb.test.only=true
# but we just add labels here to make the action name more graceful
it_task: [ 'others', 'server' ]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: liberica
java-version: ${{ matrix.java }}
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-
- name: Check Apache Rat
run: mvn -B apache-rat:check
- name: Test Server Module with Maven
shell: bash
if: ${{ matrix.it_task == 'server'}}
run: mvn clean integration-test -Dtest.port.closed=true -pl server -am -DskipTests=true -Diotdb.test.only=true
- name: Test Other Modules with Maven
shell: bash
if: ${{ matrix.it_task == 'others'}}
run: |
mvn clean install -DskipTests
mvn clean test -Dtest.port.closed=true -Diotdb.test.skip=true -P get-jar-with-dependencies