1- # ###############################################################################
2- # Licensed to the Apache Software Foundation (ASF) under one
3- # or more contributor license agreements. See the NOTICE file
4- # distributed with this work for additional information
5- # regarding copyright ownership. The ASF licenses this file
6- # to you under the Apache License, Version 2.0 (the
7- # "License"); you may not use this file except in compliance
8- # with the License. You may obtain a copy of the License at
9- #
10- # http://www.apache.org/licenses/LICENSE-2.0
11- #
12- # Unless required by applicable law or agreed to in writing, software
13- # distributed under the License is distributed on an "AS IS" BASIS,
14- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15- # See the License for the specific language governing permissions and
16- # limitations under the License.
17- # ###############################################################################
18- name : Daily CI ON JDK 8
19- on :
20- schedule :
21- # Run at 12:00 daily.
22- - cron : " 0 12 * * *"
23- concurrency :
24- group : ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.number || github.run_id }}
25- cancel-in-progress : true
1+ # .github/workflows/ci-template.yaml
2+ name : CI Template
263
4+ on :
5+ workflow_call :
6+ inputs :
7+ java-version :
8+ required : true
9+ type : string
10+ maven-parameters :
11+ description : " Any parameters of the Maven command."
12+ required : false
13+ type : string
14+ default : " "
2715jobs :
28- build-on-jdk8 :
16+ build-and-test :
17+ name : Build and Test (Java ${{ inputs.java-version }}
2918 runs-on : self-hosted
3019 strategy :
3120 fail-fast : false
@@ -34,21 +23,21 @@ jobs:
3423 steps :
3524 - name : Checkout code
3625 uses : actions/checkout@v2
37- - name : Set up JDK 8
26+ - name : Set up JDK
3827 uses : actions/setup-java@v4
3928 with :
40- java-version : ' 8 '
29+ java-version : ${{ inputs.java-version }}
4130 distribution : ' temurin'
4231 - name : Build
4332 run : |
44- mvn -T 1C -B clean install -DskipTests -Pjava8-target
33+ mvn -T 1C -B clean install -DskipTests ${{ steps.profile.outputs.maven_profile }}
4534 - name : Test
4635 timeout-minutes : 60
4736 run : |
4837 TEST_MODULES=$(./.github/workflows/stage.sh ${{ matrix.module }})
4938 echo "github ref: ${{ github.ref }}"
5039 echo "Start testing modules: $TEST_MODULES"
51- mvn -B verify $TEST_MODULES -Ptest-coverage -Ptest-${{ matrix.module }} -Dlog.dir=${{ runner.temp }}/fluss-logs -Dlog4j.configurationFile=${{ github.workspace }}/tools/ci/log4j.properties -Pjava8-target
40+ mvn -B verify $TEST_MODULES -Ptest-coverage -Ptest-${{ matrix.module }} -Dlog.dir=${{ runner.temp }}/fluss-logs -Dlog4j.configurationFile=${{ github.workspace }}/tools/ci/log4j.properties ${{ inputs.maven-parameters }}
5241 env :
5342 MAVEN_OPTS : -Xmx4096m
5443 ARTIFACTS_OSS_ENDPOINT : ${{ secrets.ARTIFACTS_OSS_ENDPOINT }}
0 commit comments