-
Notifications
You must be signed in to change notification settings - Fork 11
61 lines (60 loc) · 1.91 KB
/
build.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
name: Build
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches: ["master", "develop"]
jobs:
paths-filter:
runs-on: ubuntu-latest
outputs:
java: ${{ steps.filter.outputs.java }}
rust: ${{ steps.filter.outputs.rust }}
pd: ${{ steps.filter.outputs.pd }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
java:
- '.github/workflows/**'
- 'sdks/frontend-java/**'
- 'components/protocol/fbs/*.fbs'
rust:
- '.github/workflows/**'
- 'range-server/**'
- 'components/**'
- 'sdks/frontend-rs/**'
pd:
- '.github/workflows/**'
- 'pd/**'
- 'components/protocol/fbs/rpc.fbs'
java-build:
needs: [paths-filter]
if: ${{ needs.paths-filter.outputs.java == 'true' || github.event_name == 'push' }}
uses: ./.github/workflows/java_build.yml
rust-build:
needs: [paths-filter]
if: ${{ needs.paths-filter.outputs.rust == 'true' || github.event_name == 'push' }}
uses: ./.github/workflows/rust_build.yml
pd-build:
needs: [paths-filter]
if: ${{ needs.paths-filter.outputs.pd == 'true' || github.event_name == 'push' }}
uses: ./.github/workflows/pd_build.yml
build-result:
runs-on: ubuntu-latest
needs: [java-build, rust-build, pd-build]
if: ${{ always() }}
steps:
- uses: actions/checkout@v3
- name: Collect build result
run: |
if echo java-${{ needs.java-build.result }},rust-${{ needs.rust-build.result }},pd-${{ needs.pd-build.result }} | grep -E 'cancelled|failure' -o > null
then
echo "There are failed/cancelled builds"
exit 1
else
echo "All builds are successful/skipped"
exit 0
fi