-
Notifications
You must be signed in to change notification settings - Fork 154
103 lines (90 loc) · 4.21 KB
/
backwards_compatibility.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################
# We need to specify repo related information here since Apache INFRA doesn't differentiate
# between several workflows with the same names while preparing a report for GHA usage
# https://infra-reports.apache.org/#ghactions
name: Flink Connector JDBC CI Backwards Compatibility
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
backwards_compatibility_test:
runs-on: ubuntu-latest
strategy:
matrix:
flink: [1.18-SNAPSHOT, 1.19-SNAPSHOT]
jdk: [8, 11, 17]
env:
MVN_CONNECTION_OPTIONS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
FLINK_CACHE_DIR: "/tmp/cache/flink"
MVN_BUILD_OUTPUT_FILE: "/tmp/mvn_build_output.out"
MVN_VALIDATION_DIR: "/tmp/flink-validation-deployment"
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set JDK
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
cache: 'maven'
- name: Set Maven 3.8.6
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.8.6
- name: "Determine Flink binary url"
run: |
binary_url=""
if [[ "${{ matrix.flink }}" = *-SNAPSHOT ]]; then
binary_url=https://s3.amazonaws.com/flink-nightly/flink-${{ matrix.flink }}-bin-scala_2.12.tgz
cache_binary=false
else
binary_url=https://archive.apache.org/dist/flink/flink-${{ matrix.flink }}/flink-${{ matrix.flink }}-bin-scala_2.12.tgz
cache_binary=true
fi
echo "binary_url=$binary_url" >> ${GITHUB_ENV}
- name: "Print Flink binary url / caching"
run: echo "${{ env.binary_url }} / caching=${{ env.cache_binary }}"
- name: Create cache dirs
run: mkdir -p ${{ env.FLINK_CACHE_DIR }}
- name: Download Flink binary
working-directory: ${{ env.FLINK_CACHE_DIR }}
run: wget -q -c ${{ env.binary_url }} -O - | tar -xz
- name: Install JDBC Libs
run: |
set -o pipefail
mvn clean install -U -B --no-transfer-progress -Dflink.version=${{ matrix.flink }} \
-DskipTests \
-DaltDeploymentRepository=validation_repository::default::file:${{ env.MVN_VALIDATION_DIR }} \
-Dscala-2.12 \
-DdistDir=${{ env.FLINK_CACHE_DIR }}/flink-${{ matrix.flink }} \
${{ env.MVN_CONNECTION_OPTIONS }} \
-Dlog4j.configurationFile=file://$(pwd)/tools/ci/log4j.properties \
| tee ${{ env.MVN_BUILD_OUTPUT_FILE }}
- name: Test backwards compatibility
working-directory: ./flink-connector-jdbc-backward-compatibility
run: |
set -o pipefail
mvn clean test -U -B --no-transfer-progress -Dflink.version=${{ matrix.flink }} \
-DaltDeploymentRepository=validation_repository::default::file:${{ env.MVN_VALIDATION_DIR }} \
-Dscala-2.12 \
-DdistDir=${{ env.FLINK_CACHE_DIR }}/flink-${{ matrix.flink }} \
${{ env.MVN_CONNECTION_OPTIONS }} \
-Dlog4j.configurationFile=file://$(pwd)/tools/ci/log4j.properties \
| tee ${{ env.MVN_BUILD_OUTPUT_FILE }}