forked from opensearch-project/performance-analyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (73 loc) · 2.58 KB
/
gradle.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
name: Java CI
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
build_rca_pkg:
runs-on: [ubuntu-latest]
name: Building RCA package
steps:
- name: Checkout RCA package
uses: actions/checkout@v2
with:
repository: opensearch-project/performance-analyzer-rca
path: ./tmp/rca
- name: Checkout Performance Analyzer package
uses: actions/checkout@v2
with:
path: ./tmp/pa
# fetch the main branch to make it available for spotless ratcheting
- name: Fetch 'main' branch
working-directory: ./tmp/pa
run: git fetch --depth=1 origin main
- name: Set up JDK 1.12
uses: actions/setup-java@v1
with:
java-version: 1.12
- name: Build RCA with Gradle
working-directory: ./tmp/rca
run: ./gradlew build -x test
- name: Publish RCA jar to maven local
working-directory: ./tmp/rca
run: ./gradlew publishToMavenLocal
# dependencies: OpenSearch
- name: Checkout OpenSearch
uses: actions/checkout@v2
with:
repository: 'opensearch-project/OpenSearch'
path: OpenSearch
ref: '1.0'
- name: Build OpenSearch
working-directory: ./OpenSearch
run: ./gradlew publishToMavenLocal -Dbuild.snapshot=false
- name: Build PA gradle using the new RCA jar
working-directory: ./tmp/pa
run: rm -f licenses/performanceanalyzer-rca-1.0.0.0.jar.sha1
- name: Update SHA
working-directory: ./tmp/pa
run: ./gradlew updateShas
# Explicitly set the docker-compose program path so that our build scripts in RCA can run the program
# This is necessary because of the Github Actions environment and the workingDir of the Gradle environment
- name: Set docker-compose path
run: DOCKER_COMPOSE_LOCATION=$(which docker-compose)
# Set the vm.max_map_count system property to the minimum required to run OpenSearch
- name: Set vm.max_map_count
run: sudo sysctl -w vm.max_map_count=262144
- name: Build PA and run Unit Tests
working-directory: ./tmp/pa
run: ./gradlew build
- name: Generate Jacoco coverage report
working-directory: ./tmp/pa
run: ./gradlew jacocoTestReport
- name: Upload coverage report
working-directory: ./tmp/pa
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: bash <(curl -s https://codecov.io/bash) -f ./build/reports/jacoco/test/jacocoTestReport.xml
- name: Run Integration Tests
working-directory: ./tmp/pa
run: ./gradlew integTest -Dtests.enableIT -Dtests.useDockerCluster