blob: 216d70b05b6a0224c34b1a91e3a6b887495a255b (
plain)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
name: Gather Bazel Execution Logs
on:
workflow_dispatch:
inputs:
target:
description: 'A bazel label representing the test target'
required: true
default: '//deps/rabbit:rabbit_stream_queue_SUITE'
jobs:
run-a:
name: Run A
runs-on: ubuntu-20.04
strategy:
matrix:
erlang_version:
- "25"
include:
- erlang_version: "25"
cache_name: ci-bazel-cache-analysis
timeout-minutes: 120
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v3
- name: CONFIGURE BAZEL
run: |
cat << EOF >> user.bazelrc
build:buildbuddy --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }}
build:buildbuddy --build_metadata=ROLE=CI
build:buildbuddy --remote_instance_name=buildbuddy-io/buildbuddy/ci-${{ matrix.cache_name }}
EOF
- name: RUN TESTS
run: |
sudo sysctl -w net.ipv4.tcp_keepalive_time=60
sudo ethtool -K eth0 tso off gso off gro off tx off rx off lro off
bazelisk test ${{ github.event.inputs.target }} \
--config=rbe-${{ matrix.erlang_version }} \
--execution_log_binary_file=/tmp/exec.log
- name: SAVE EXECUTION LOG BINARY
uses: actions/upload-artifact@v3.1.1
with:
name: execution-log-binary-A
path: /tmp/exec.log
run-b:
name: Run B
needs: run-a
runs-on: ubuntu-20.04
strategy:
matrix:
erlang_version:
- "25"
include:
- erlang_version: "25"
cache_name: ci-bazel-cache-analysis
timeout-minutes: 120
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v3
- name: CONFIGURE BAZEL
run: |
cat << EOF >> user.bazelrc
build:buildbuddy --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }}
build:buildbuddy --build_metadata=ROLE=CI
build:buildbuddy --remote_instance_name=buildbuddy-io/buildbuddy/ci-${{ matrix.cache_name }}
EOF
- name: RUN TESTS
run: |
sudo sysctl -w net.ipv4.tcp_keepalive_time=60
sudo ethtool -K eth0 tso off gso off gro off tx off rx off lro off
bazelisk test ${{ github.event.inputs.target }} \
--config=rbe-${{ matrix.erlang_version }} \
--execution_log_binary_file=/tmp/exec.log
- name: SAVE EXECUTION LOG BINARY
uses: actions/upload-artifact@v3.1.1
with:
name: execution-log-binary-B
path: /tmp/exec.log
parse-logs:
name: Parse Logs
needs: [run-a, run-b]
runs-on: ubuntu-20.04
steps:
- name: CHECKOUT BAZEL
uses: actions/checkout@v3
with:
repository: bazelbuild/bazel
path: bazel
- name: MOUNT BAZEL CACHE
uses: actions/cache@v3.2.1
with:
path: "/home/runner/.cache/bazel"
key: bazel
- name: BUILD EXECLOG PARSER
working-directory: bazel
run: |
bazelisk build src/tools/execlog:parser
- name: FETCH LOGS
uses: actions/download-artifact@v3
- name: PARSE LOGS
run: |
bazel/bazel-bin/src/tools/execlog/parser \
--log_path=./execution-log-binary-A/exec.log \
--log_path=./execution-log-binary-B/exec.log \
--output_path=/tmp/execution-log-binary-A.log.txt \
--output_path=/tmp/execution-log-binary-B.log.txt
- name: SAVE PARSED LOGS
uses: actions/upload-artifact@v3.1.1
with:
name: parsed-logs
path: /tmp/execution-log-binary-*.log.txt
|