Skip to content

Commit cffe266

Browse files
committed
cicd: Add conditions to start verification
Signed-off-by: Diogo Behrens <[email protected]>
1 parent 77b2b73 commit cffe266

File tree

1 file changed

+49
-2
lines changed

1 file changed

+49
-2
lines changed

.github/workflows/actions.yml

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,46 @@
11
name: vatomic tests and verification
2-
on: [push, pull_request]
2+
on:
3+
- push
4+
- pull_request
5+
36
env:
47
REGISTRY: ghcr.io
58

69
jobs:
10+
changed:
11+
name: Detect changed files
12+
runs-on: ubuntu-latest
13+
outputs:
14+
workflows: ${{ steps.workflows.outputs.changed }}
15+
include: ${{ steps.include.outputs.changed }}
16+
verify: ${{ steps.verify.outputs.changed }}
17+
test: ${{ steps.test.outputs.changed }}
18+
steps:
19+
- uses: dorny/paths-filter@v3
20+
id: include
21+
with:
22+
filters: |
23+
changed:
24+
- 'include/**'
25+
- uses: dorny/paths-filter@v3
26+
id: workflows
27+
with:
28+
filters: |
29+
changed:
30+
- '.github/**'
31+
- uses: dorny/paths-filter@v3
32+
id: verify
33+
with:
34+
filters: |
35+
changed:
36+
- 'verify/**'
37+
- uses: dorny/paths-filter@v3
38+
id: test
39+
with:
40+
filters: |
41+
changed:
42+
- 'test/**'
43+
744
test-install:
845
strategy:
946
matrix:
@@ -73,7 +110,6 @@ jobs:
73110
cmake -Stest/project -Bbuild2 -DCMAKE_PREFIX_PATH=/tmp/target
74111
cmake --build build2
75112
76-
77113
check-expectations:
78114
runs-on: ubuntu-22.04
79115
strategy:
@@ -108,6 +144,8 @@ jobs:
108144
(echo "Run 'make ${{ matrix.target }}' and commit" && false)
109145

110146
test-qemu-other:
147+
needs: changed
148+
if: ${{ (needs.changed.outputs.include == 'true') || (needs.changed.outputs.test == 'true') }}
111149
strategy:
112150
matrix:
113151
optimization_level: [ "O1", "O2", "O3" ]
@@ -130,6 +168,8 @@ jobs:
130168
run: ctest --test-dir build --output-on-failure
131169

132170
test-qemu-arm32:
171+
needs: changed
172+
if: ${{ (needs.changed.outputs.include == 'true') || (needs.changed.outputs.test == 'true') }}
133173
strategy:
134174
matrix:
135175
optimization_level: [ "O1", "O2", "O3" ]
@@ -153,6 +193,8 @@ jobs:
153193
run: ctest --test-dir build --output-on-failure
154194

155195
test-qemu-arm64:
196+
needs: changed
197+
if: ${{ (needs.changed.outputs.include == 'true') || (needs.changed.outputs.test == 'true') }}
156198
strategy:
157199
matrix:
158200
optimization_level: [ "O1", "O2", "O3" ]
@@ -180,7 +222,10 @@ jobs:
180222
- name: Test
181223
run: ctest --test-dir build --output-on-failure
182224

225+
183226
verify-armv8:
227+
needs: changed
228+
if: ${{ (needs.changed.outputs.include == 'true') || (needs.changed.outputs.verify == 'true') }}
184229
strategy:
185230
matrix:
186231
target: [ builtin, llsc, lse, lxe ]
@@ -200,6 +245,8 @@ jobs:
200245
run: ctest -j 4 -L armv8_${{ matrix.target }}_${{ matrix.group }} --test-dir build/verify
201246

202247
verify-riscv:
248+
needs: changed
249+
if: ${{ (needs.changed.outputs.include == 'true') || (needs.changed.outputs.verify == 'true') }}
203250
strategy:
204251
matrix:
205252
group: [ vatomic8, vatomic16, vatomic32, vatomic64, vatomicsz, vatomicptr, vatomic_fence ]

0 commit comments

Comments
 (0)