-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (62 loc) · 1.84 KB
/
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
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
name: Build pull request
on:
pull_request:
branches: [ "*" ]
push:
branches:
- "!master"
jobs:
build_oh3:
strategy:
fail-fast: false
matrix:
java: [ '11' ]
maven: [ '3.8.4' ]
os: [ 'ubuntu-20.04' ]
name: Build OH3 (Java ${{ matrix.java }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: ${{matrix.java}}
distribution: 'temurin'
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.java }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.java }}-maven-
- name: Downgrade version
run: mvn versions:set -DnewVersion=3.4.4-SNAPSHOT
- name: Downgrade parent version
run: mvn versions:update-parent -DskipResolution=true -DparentVersion=3.4.4
- name: Build
run: mvn -P 'oh3' -P 'standalone' --batch-mode -DskipChecks -Doh.java.version=11 clean verify
build_oh4:
strategy:
fail-fast: false
matrix:
java: [ '17' ]
maven: [ '3.8.4' ]
os: [ 'ubuntu-20.04' ]
name: Build OH4 (Java ${{ matrix.java }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: ${{matrix.java}}
distribution: 'temurin'
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.java }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.java }}-maven-
- name: Build
run: mvn -P 'standalone' --batch-mode -DskipChecks -Doh.java.version=17 clean verify