-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (33 loc) · 1.12 KB
/
build-on-pull-request.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
name: Build Changed Modules
on:
pull_request:
branches: [ "main" ]
jobs:
build-changed-modules:
runs-on: ubuntu-latest
steps:
- name: Set up Zulu JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'zulu'
- name: Check out xyna-factory
uses: actions/checkout@v4
- uses: actions/cache@v4
id: maven-cache
with:
path: /home/runner/.m2
key: ${{ runner.os }}-maven-cache-for-pr-build-${{ hashFiles('installation/build/pom.xml') }}
- name: determine changed modules
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr diff ${{ github.event.pull_request.number }} --name-only | xargs -I {} dirname {} | grep '^modules/' | cut -f 2-3 -d/ | sort | uniq | tee changed-modules.txt
- name: build basic factory
run: |
cd installation
./build.sh build
- name: build changed modules
run: |
cd modules
for d in $(cat ../changed-modules.txt); do test -d "$d" && ant -Doracle.home=/tmp -f "$d/build.xml"; done