-
Notifications
You must be signed in to change notification settings - Fork 0
129 lines (108 loc) · 3.43 KB
/
actions.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Build Modules
# Runs workflow only when pull requests are made to
# the 'main' branch
on:
pull_request:
branches: main
jobs:
# Github Action to detect file changes between
# main branch and pull request branch
changes:
runs-on: ubuntu-latest
outputs:
core: ${{ steps.filter.outputs.core }}
client: ${{ steps.filter.outputs.client }}
transport: ${{ steps.filter.outputs.transport }}
server: ${{ steps.filter.outputs.server }}
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
# Detect any changes to the following folders
filters: |
core:
- 'bundle-core/**'
client:
- 'BundleClient/**'
transport:
- 'BundleTransport/**'
server:
- 'bundleserver/**'
# Github Action to Compile bundle-core
build-bundle-core:
needs: changes
#Compile bundle-core only if files were changed here
if: ${{ needs.changes.outputs.core == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Run maven package on bundle-core
working-directory: ./bundle-core
run: mvn package
# Github Action to Compile BundleClient
build-bundle-client:
needs: changes
# Compile BundleClient only if files were changed here
if: ${{ needs.changes.outputs.client == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup gradle
uses: gradle/gradle-build-action@v2
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Run maven package on server dependency > bundle-core
working-directory: ./bundle-core
run: mvn install
- name: Run gradle build on BundleClient
working-directory: ./BundleClient
run: ./gradlew build
# Github Action to Compile BundleTransport
build-bundle-transport:
needs: changes
# Compile BundleTransport only if files were changed here
if: ${{ needs.changes.outputs.transport == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup gradle
uses: gradle/gradle-build-action@v2
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Run gradle build on BundleTransport
working-directory: ./BundleTransport
run: ./gradlew build
# Github Action to Compile bundleserver
build-bundle-server:
needs: changes
# Compile bundleserver only if files were changed here
if: ${{ needs.changes.outputs.server == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Run maven package on server dependency > bundle-core
working-directory: ./bundle-core
run: mvn install
- name: Run maven package on BundleServer
working-directory: ./bundleserver
run: mvn package