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
2710jobs :
28- build-on-jdk8 :
11+ build-and-test :
12+ name : Build and Test (Java ${{ inputs.java-version }}, Module ${{ inputs.module }})
2913 runs-on : self-hosted
3014 strategy :
3115 fail-fast : false
@@ -34,21 +18,24 @@ jobs:
3418 steps :
3519 - name : Checkout code
3620 uses : actions/checkout@v2
37- - name : Set up JDK 8
21+ - name : Set up JDK
3822 uses : actions/setup-java@v4
3923 with :
40- java-version : ' 8 '
24+ java-version : ${{ inputs.java-version }}
4125 distribution : ' temurin'
26+ - name : Determine Maven profile
27+ id : profile
28+ run : | echo "::set-output name=maven_profile::${{ (inputs.java-version == '8' && '-Pjava8-target') || ''
4229 - name : Build
4330 run : |
44- mvn -T 1C -B clean install -DskipTests -Pjava8-target
31+ mvn -T 1C -B clean install -DskipTests ${{ steps.profile.outputs.maven_profile }}
4532 - name : Test
4633 timeout-minutes : 60
4734 run : |
4835 TEST_MODULES=$(./.github/workflows/stage.sh ${{ matrix.module }})
4936 echo "github ref: ${{ github.ref }}"
5037 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
38+ mvn -B verify $TEST_MODULES -Ptest-coverage -Ptest-${{ matrix.module }} -Dlog.dir=${{ runner.temp }}/fluss-logs -Dlog4j.configurationFile=${{ github.workspace }}/tools/ci/log4j.properties ${{ steps.profile.outputs.maven_profile }}
5239 env :
5340 MAVEN_OPTS : -Xmx4096m
5441 ARTIFACTS_OSS_ENDPOINT : ${{ secrets.ARTIFACTS_OSS_ENDPOINT }}
0 commit comments