forked from ballerina-platform/ballerina-lang
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (61 loc) · 2.54 KB
/
language_server_simulator.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
name: Language Server Simulator
on:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
jobs:
run_simulator:
name: Run LS Simulator
runs-on: ubuntu-latest
timeout-minutes: 240
strategy:
fail-fast: false
matrix:
branch: ["master", "2201.2.x", "2201.3.x", "2201.4.x", "2201.4.0-stage"]
skipGenerators: ["", "IMPORT_STATEMENT"]
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: ${{ matrix.branch }}
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
- name: Initialize sub-modules
run: git submodule update --init
- name: Build with Gradle
timeout-minutes: 180
run: |
export DISPLAY=':99.0'
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
./gradlew clean :language-server-simulator:runLSSimulator -Dls.simulation.skipGenerators=${{ matrix.skipGenerators }}
- name: Check Simulation Failure
run: if test -f dump.hprof; then exit 1; else exit 0; fi
- name: Analyze Heap Dump If Exists
if: failure()
run: |
if test -f dump.hprof; then echo "Heap sump exists. Analyzing..."; else exit 0; fi
wget https://ftp.jaist.ac.jp/pub/eclipse/mat/1.12.0/rcp/MemoryAnalyzer-1.12.0.20210602-linux.gtk.x86_64.zip
unzip MemoryAnalyzer-1.12.0.20210602-linux.gtk.x86_64.zip
./mat/ParseHeapDump.sh ./dump.hprof org.eclipse.mat.api:suspects
- name: Upload Heap Dumps
uses: actions/upload-artifact@v2
if: always()
with:
name: heap_dump-${{ matrix.branch }}.hprof
path: '*.hprof'
- name: Upload Leaks Suspects
uses: actions/upload-artifact@v2
if: failure()
with:
name: Leak_Suspects-${{ matrix.branch }}
path: 'dump_Leak_Suspects.zip'
- name: Notify failure
if: failure()
run: |
curl \
-X POST 'https://chat.googleapis.com/v1/spaces/${{secrets.NOTIFICATIONS_CHAT_ID}}/messages?key=${{secrets.NOTIFICATIONS_CHAT_KEY}}&token=${{secrets.NOTIFICATIONS_CHAT_TOKEN}}' \
--header 'Content-Type: application/json' \
-d '{"text": "*language server simulator failure in ${{ matrix.branch }}* (skipped generators: ${{ matrix.skipGenerators }}) \nPlease \n visit <https://github.com/ballerina-platform/ballerina-lang/actions/runs/${{github.run_id}}|the LS simulator run> for more information"}'