Skip to content

Commit 2be21a2

Browse files
committed
Run xref at the project root
1 parent f54df80 commit 2be21a2

File tree

2 files changed

+730
-1224
lines changed

2 files changed

+730
-1224
lines changed

.github/workflows/templates/test-make.template.yaml

Lines changed: 28 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@
3636
uses: actions/cache@v4
3737
with:
3838
path: ${{ github.workspace }}
39-
key: ${{ runner.os }}-make-cache-${{ needs.prepare.outputs.hash }}
39+
key: ${{ runner.os }}-make-cache-${{ needs.xref.outputs.hash }}
4040
fail-on-cache-miss: true
4141
- name: RESTORE TEST RESULT CACHE
4242
uses: actions/cache/restore@v3
4343
with:
4444
path: /home/runner/test-result-cache/
45-
key: ${{ runner.os }}-test-result-cache-${{ needs.prepare.outputs.hash }}-${{ github.run_number }}-${{ github.run_attempt }}
45+
key: ${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-${{ github.run_attempt }}
4646
restore-keys: |
47-
${{ runner.os }}-test-result-cache-${{ needs.prepare.outputs.hash }}-${{ github.run_number }}-${{ needs.prepare.outputs.previous_run_attempt }}
48-
${{ runner.os }}-test-result-cache-${{ needs.prepare.outputs.hash }}-${{ github.run_number }}-
49-
${{ runner.os }}-test-result-cache-${{ needs.prepare.outputs.hash }}-
47+
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-${{ needs.xref.outputs.previous_run_attempt }}
48+
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-
49+
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-
5050
- name: PRINT CACHED RESULTS
5151
run: |
5252
set -x
@@ -59,20 +59,10 @@
5959
- name: PREPARE
6060
run: |
6161
mkdir -p ${{ env.SUCCESS_PATH }}
62-
- name: XREF
63-
run: |
64-
if [[ -f ${{ env.SUCCESS_PATH }}/xref ]]; then
65-
echo "xref already passed for this key ${{ needs.prepare.outputs.hash }}"
66-
else
67-
make -C deps/(@= name @) \
68-
xref \
69-
RABBITMQ_METADATA_STORE=${{ matrix.metadata_store }}
70-
touch ${{ env.SUCCESS_PATH }}/xref
71-
fi
7262
- name: DIALYZE
7363
run: |
7464
if [[ -f ${{ env.SUCCESS_PATH }}/dialyze ]]; then
75-
echo "dialyze already passed for this key ${{ needs.prepare.outputs.hash }}"
65+
echo "dialyze already passed for this key ${{ needs.xref.outputs.hash }}"
7666
else
7767
make -C deps/(@= name @) \
7868
dialyze \
@@ -83,7 +73,7 @@
8373
- name: EUNIT
8474
run: |
8575
if [[ -f ${{ env.SUCCESS_PATH }}/eunit ]]; then
86-
echo "eunit already passed for this key ${{ needs.prepare.outputs.hash }}"
76+
echo "eunit already passed for this key ${{ needs.xref.outputs.hash }}"
8777
else
8878
make -C deps/(@= name @) \
8979
eunit \
@@ -94,7 +84,7 @@
9484
- name: CT (@= suite @)
9585
run: |
9686
if [[ -f ${{ env.SUCCESS_PATH }}/ct-(@= suite @) ]]; then
97-
echo "ct-(@= suite @) already passed for this key ${{ needs.prepare.outputs.hash }}"
87+
echo "ct-(@= suite @) already passed for this key ${{ needs.xref.outputs.hash }}"
9888
else
9989
make -C deps/(@= name @) \
10090
ct-(@= suite @) \
@@ -138,17 +128,17 @@
138128
uses: actions/cache@v4
139129
with:
140130
path: ${{ github.workspace }}
141-
key: ${{ runner.os }}-make-cache-${{ needs.prepare.outputs.hash }}
131+
key: ${{ runner.os }}-make-cache-${{ needs.xref.outputs.hash }}
142132
fail-on-cache-miss: true
143133
- name: RESTORE TEST RESULT CACHE
144134
uses: actions/cache/restore@v3
145135
with:
146136
path: /home/runner/test-result-cache/
147-
key: ${{ runner.os }}-test-result-cache-${{ needs.prepare.outputs.hash }}-${{ github.run_number }}-${{ github.run_attempt }}
137+
key: ${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-${{ github.run_attempt }}
148138
restore-keys: |
149-
${{ runner.os }}-test-result-cache-${{ needs.prepare.outputs.hash }}-${{ github.run_number }}-${{ needs.prepare.outputs.previous_run_attempt }}
150-
${{ runner.os }}-test-result-cache-${{ needs.prepare.outputs.hash }}-${{ github.run_number }}-
151-
${{ runner.os }}-test-result-cache-${{ needs.prepare.outputs.hash }}-
139+
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-${{ needs.xref.outputs.previous_run_attempt }}
140+
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-
141+
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-
152142
- name: PRINT CACHED RESULTS
153143
run: |
154144
set -x
@@ -165,7 +155,7 @@
165155
id: test
166156
run: |
167157
if [[ -f ${{ env.SUCCESS_PATH }}/checks ]]; then
168-
echo "checks already passed for this key ${{ needs.prepare.outputs.hash }}"
158+
echo "checks already passed for this key ${{ needs.xref.outputs.hash }}"
169159
else
170160
make -C deps/rabbitmq_cli \
171161
checks \
@@ -203,7 +193,7 @@ concurrency:
203193
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
204194
cancel-in-progress: true
205195
jobs:
206-
prepare:
196+
xref:
207197
runs-on: ubuntu-latest
208198
outputs:
209199
hash: ${{ steps.hash.outputs.hash }}
@@ -241,28 +231,31 @@ jobs:
241231
- name: BUILD
242232
run: |
243233
make
234+
- name: XREF
235+
run: |
236+
make xref
244237
#@ for plugin in data.values.internal_deps:
245-
_: #@ template.replace(test_plugin(plugin, ["prepare"], data.values[plugin].suites))
238+
_: #@ template.replace(test_plugin(plugin, ["xref"], data.values[plugin].suites))
246239
#@ end
247-
_: #@ template.replace(test_plugin("rabbit", ["prepare"] + job_names(data.values.internal_deps), data.values.rabbit.suites))
248-
_: #@ template.replace(test_cli(["prepare", "test-rabbit"]))
240+
_: #@ template.replace(test_plugin("rabbit", ["xref"] + job_names(data.values.internal_deps), data.values.rabbit.suites))
241+
_: #@ template.replace(test_cli(["xref", "test-rabbit"]))
249242
#@ for plugin in data.values.tier1_plugins:
250-
_: #@ template.replace(test_plugin(plugin, ["prepare", "test-rabbitmq_cli"], data.values[plugin].suites))
243+
_: #@ template.replace(test_plugin(plugin, ["xref", "test-rabbitmq_cli"], data.values[plugin].suites))
251244
#@ end
252245
summary-test-make:
253246
if: always()
254-
needs: #@ ["prepare", "test-rabbit", "test-rabbitmq_cli"] + job_names(data.values.internal_deps + data.values.tier1_plugins)
247+
needs: #@ ["xref", "test-rabbit", "test-rabbitmq_cli"] + job_names(data.values.internal_deps + data.values.tier1_plugins)
255248
runs-on: ubuntu-latest
256249
steps:
257250
- name: RESTORE TEST RESULT CACHE
258251
uses: actions/cache/restore@v3
259252
with:
260253
path: /home/runner/test-result-cache/
261-
key: ${{ runner.os }}-test-result-cache-${{ needs.prepare.outputs.hash }}-${{ github.run_number }}-${{ github.run_attempt }}
254+
key: ${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-${{ github.run_attempt }}
262255
restore-keys: |
263-
${{ runner.os }}-test-result-cache-${{ needs.prepare.outputs.hash }}-${{ github.run_number }}-${{ needs.prepare.outputs.previous_run_attempt }}
264-
${{ runner.os }}-test-result-cache-${{ needs.prepare.outputs.hash }}-${{ github.run_number }}-
265-
${{ runner.os }}-test-result-cache-${{ needs.prepare.outputs.hash }}-
256+
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-${{ needs.xref.outputs.previous_run_attempt }}
257+
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-
258+
${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-
266259
- name: UPDATE CACHE
267260
uses: actions/download-artifact@v4
268261
with:
@@ -277,7 +270,7 @@ jobs:
277270
uses: actions/cache/save@v3
278271
with:
279272
path: /home/runner/test-result-cache/
280-
key: ${{ runner.os }}-test-result-cache-${{ needs.prepare.outputs.hash }}-${{ github.run_number }}-${{ github.run_attempt }}
273+
key: ${{ runner.os }}-test-result-cache-${{ needs.xref.outputs.hash }}-${{ github.run_number }}-${{ github.run_attempt }}
281274
- name: SUMMARY
282275
run: |
283276
cat << 'EOF' | jq -e 'map(.result == "success") | all(.)'

0 commit comments

Comments
 (0)