File tree 2 files changed +22
-14
lines changed
2 files changed +22
-14
lines changed Original file line number Diff line number Diff line change 5
5
# you may not use this file except in compliance with the Elastic License.
6
6
#
7
7
8
- # The non-Windows part of ML C++ CI:
8
+ # The non-Windows part of ML C++ CI does the following :
9
9
#
10
- # 1. Build and unit test the Linux version of the C++
11
- # 2. Build the macOS version of the C++
12
- # 3. Upload the builds to the artifacts directory on S3 that
13
- # subsequent Java builds will download the C++ components from
10
+ # 1. If this is a PR build, check the code style
11
+ # 2. Build and unit test the Linux version of the C++
12
+ # 3. Build the macOS version of the C++
13
+ # 4. If this is not a PR build, upload the builds to the artifacts directory on
14
+ # S3 that subsequent Java builds will download the C++ components from
14
15
#
15
- # The builds run in Docker containers that ensure OS dependencies
16
+ # The steps run in Docker containers that ensure OS dependencies
16
17
# are appropriate given the support matrix.
17
18
#
18
19
# The macOS build cannot be unit tested as it is cross-compiled.
30
31
# Remove any old builds
31
32
rm -rf ../builds
32
33
34
+ # If this is a PR build then fail fast on style checks
35
+ if [ -n " $PR_AUTHOR " ] ; then
36
+ ./docker_check_style.sh
37
+ fi
38
+
33
39
# Build and test Linux
34
40
./docker_test.sh linux
35
41
36
42
# Build macOS
37
43
./docker_build.sh macosx
38
44
39
- # Upload
40
- cd ..
41
- ./gradlew --info -b upload.gradle upload
45
+ # If this isn't a PR build then upload the artifacts
46
+ if [ -z " $PR_AUTHOR " ] ; then
47
+ cd ..
48
+ ./gradlew --info -b upload.gradle upload
49
+ fi
42
50
Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ rem or more contributor license agreements. Licensed under the Elastic License;
5
5
rem you may not use this file except in compliance with the Elastic License.
6
6
rem
7
7
8
- rem The Windows part of ML C++ CI:
8
+ rem The Windows part of ML C++ CI does the following :
9
9
rem
10
10
rem 1. Build and unit test the Windows version of the C++
11
- rem 2. Upload the build to the artifacts directory on S3 that
12
- rem subsequent Java builds will download the C++ components from
11
+ rem 2. If this is not a PR build, upload the build to the artifacts directory on
12
+ rem S3 that subsequent Java builds will download the C++ components from
13
13
14
14
setlocal enableextensions
15
15
@@ -24,8 +24,8 @@ rem Run the build and unit tests
24
24
set ML_KEEP_GOING = 1
25
25
call .\gradlew.bat --info clean buildZip buildZipSymbols check || exit /b %ERRORLEVEL%
26
26
27
- rem Upload the artifacts to S3
28
- call .\gradlew.bat --info -b upload.gradle upload || exit /b %ERRORLEVEL%
27
+ rem If this isn't a PR build then upload the artifacts
28
+ if not defined PR_AUTHOR call .\gradlew.bat --info -b upload.gradle upload || exit /b %ERRORLEVEL%
29
29
30
30
endlocal
31
31
You can’t perform that action at this time.
0 commit comments