This repository has been archived by the owner on Dec 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (79 loc) · 2.55 KB
/
drmemory.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: "Build and run tests with memory check"
on:
push:
branches:
- main
- develop
pull_request:
env:
RUN_MEMORY_CHECK: true
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: valgrind-os
triplet: x64-linux
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
XDG_RUNTIME_DIR: "/tmp/swaywm"
steps:
- name: 'Install SDL2 dev'
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libsdl2-dev
- name: 'Checkout'
uses: actions/checkout@v2
with:
token: ${{ secrets.PAT }}
submodules: recursive
- name: 'Install CMake'
uses: lukka/get-cmake@latest
- name: 'Setup vcpkg'
uses: lukka/run-vcpkg@v10
- name: 'Run CMake'
uses: lukka/run-cmake@v10
with:
configurePreset: ninja-multi-vcpkg
buildPreset: ninja-multi-valgrind
- name: 'Run doctor memory'
id: memory
run: |
cd ./builds/ninja-multi-vcpkg/Debug
mkdir logs
${{secrets.DRMEMORY_DIR_Google_Cloud}}/drmemory -logdir ./logs -- platformer-engine-exec & (sleep 60 && (if [ $(pgrep -f platformer-engine-exec) ]; then kill $(pgrep -f platformer-engine-exec); fi))
sleep 30
cd ./logs
cd DrMemory*
CURRENT_PATH=$(pwd)
echo "::set-output name=RESULTS_PATH::$(pwd)"
- name: 'Format results'
run: |
cd ${{ steps.memory.outputs.RESULTS_PATH }}
echo '```' >> results-formatted.txt
echo "$(cat results.txt)" >> results-formatted.txt
echo '```' >> results-formatted.txt
- name: 'Upload logs'
uses: actions/upload-artifact@v2
with:
name: logs
path: ${{steps.memory.outputs.RESULTS_PATH}}/results-formatted.txt
- name: 'Find Comment'
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Dr. Memory
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body-file: ${{steps.memory.outputs.RESULTS_PATH}}/results-formatted.txt
reactions: rocket
edit-mode: replace