@@ -26,36 +26,61 @@ name: CI
26
26
27
27
on :
28
28
push :
29
- branches : [ "master" ]
30
29
pull_request :
31
30
branches : [ "master" ]
32
31
32
+ env :
33
+ MAVEN_OPTS : -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
34
+
33
35
jobs :
34
36
build-8 :
35
37
runs-on : ubuntu-latest
36
38
steps :
37
39
- uses : actions/checkout@v4
40
+ - name : Cache for maven dependencies
41
+ uses : actions/cache@v4
42
+ with :
43
+ path : |
44
+ ~/.m2/repository/*/*/*
45
+ !~/.m2/repository/org/apache/ranger
46
+ key : maven-repo-${{ hashFiles('**/pom.xml') }}
47
+ restore-keys : |
48
+ maven-repo-
38
49
- name : Set up JDK 8
39
50
uses : actions/setup-java@v4
40
51
with :
41
52
java-version : ' 8'
42
53
distribution : ' temurin'
43
- cache : maven
44
54
- name : build (8)
45
- run : mvn -T 8 clean install --no-transfer-progress -B -V
55
+ run : mvn -T 8 clean verify --no-transfer-progress -B -V
56
+ - name : Upload artifacts
57
+ uses : actions/upload-artifact@v4
58
+ with :
59
+ name : target-8
60
+ path : target/*
46
61
47
62
build-11 :
63
+ needs :
64
+ - build-8
48
65
runs-on : ubuntu-latest
49
66
steps :
50
67
- uses : actions/checkout@v4
68
+ - name : Cache for maven dependencies
69
+ uses : actions/cache/restore@v4
70
+ with :
71
+ path : |
72
+ ~/.m2/repository/*/*/*
73
+ !~/.m2/repository/org/apache/ranger
74
+ key : maven-repo-${{ hashFiles('**/pom.xml') }}
75
+ restore-keys : |
76
+ maven-repo-
51
77
- name : Set up JDK 11
52
78
uses : actions/setup-java@v4
53
79
with :
54
80
java-version : ' 11'
55
81
distribution : ' temurin'
56
- cache : maven
57
82
- name : build (11)
58
- run : mvn -T 8 clean install -pl '!knox-agent' --no-transfer-progress -B -V
83
+ run : mvn -T 8 clean verify -pl '!knox-agent' --no-transfer-progress -B -V
59
84
- name : Upload artifacts
60
85
uses : actions/upload-artifact@v4
61
86
with :
65
90
docker-build :
66
91
needs :
67
92
- build-8
68
- - build-11
69
93
runs-on : ubuntu-latest
70
94
steps :
71
95
- uses : actions/checkout@v4
80
104
cp version dev-support/ranger-docker/dist
81
105
82
106
- name : Cache downloaded archives
83
- uses : actions/cache@v3
107
+ uses : actions/cache@v4
84
108
with :
85
109
path : dev-support/ranger-docker/downloads
86
110
key : ${{ runner.os }}-ranger-downloads-${{ hashFiles('dev-support/ranger-docker/.env') }}
0 commit comments