-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (35 loc) · 1.43 KB
/
build.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
name: Build
on:
push:
branches:
- 'main'
- 'release/**'
pull_request:
env:
# Without "-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false" maven tend to fail due to the following error:
# Failed to read artifact descriptor for <some artifact>:
# Could not transfer artifact <some artifact> from/to central (https://repo.maven.apache.org/maven2):
# transfer failed for https://repo.maven.apache.org/maven2/<some artifact>: Connection timed out (Read failed)
# More precisely, mvn fails to fetch the first dependency from a maven repo after a longer pause between two
# consecutive fetches (e.g. when there were tests running for at last several minutes).
# See: https://stackoverflow.com/a/58769870
MAVEN_CLI_OPTS: "-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false"
JAVA_ADDITIONAL_OPTS: ""
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
flink: [ "1.17.1" ]
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
cache: maven
- name: Build for Flink ${{ matrix.flink }}
run: mvn $MAVEN_CLI_OPTS $JAVA_ADDITIONAL_OPTS -Dflink.version=${{ matrix.flink }} install -DskipTests
- name: Tests for Flink ${{ matrix.flink }}
run: mvn $MAVEN_CLI_OPTS $JAVA_ADDITIONAL_OPTS -Dflink.version=${{ matrix.flink }} verify