forked from jverein/jverein
-
Notifications
You must be signed in to change notification settings - Fork 18
73 lines (62 loc) · 2.32 KB
/
buildcheck.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
# This workflow will build a Java project with Ant
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant
name: openjverein build check
on:
pull_request:
types: [opened, reopened, synchronize, edited]
paths:
- 'plugin.xml'
- 'build/**'
- 'lib/**'
- 'lib.src/**'
- 'src/**'
jobs:
build:
name: Try to compile the current pull request
runs-on: ubuntu-latest
steps:
- name: Set up JDK for x64
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
architecture: x64
- name: Set env
id: setenvs
run: |
jameica_tag=`git ls-remote --refs --tags --sort="-v:refname" https://github.com/willuhn/jameica.git V_\* | head -1 | cut -f 2 | cut -d / -f 3`
echo "jameica_tag=${jameica_tag}" >> $GITHUB_OUTPUT
hibiscus_tag=`git ls-remote --refs --tags --sort="-v:refname" https://github.com/willuhn/hibiscus.git V_\* | head -1 | cut -f 2 | cut -d / -f 3`
echo "hibiscus_tag=${hibiscus_tag}" >> $GITHUB_OUTPUT
- name: Check out jameica
uses: actions/checkout@v4
with:
repository: willuhn/jameica
path: jameica
ref: ${{ steps.setenvs.outputs.jameica_tag }}
- name: Build jameica jar
working-directory: ./
run: |
ant -noinput -buildfile jameica/build/build.xml jar
find jameica/releases/ -type f -name jameica.jar -exec cp {} jameica/releases/jameica-lib.jar \;
- name: Check out hibiscus
uses: actions/checkout@v4
with:
repository: willuhn/hibiscus
path: hibiscus
ref: ${{ steps.setenvs.outputs.hibiscus_tag }}
- name: Build hibiscus jar
working-directory: ./
run: |
sed -i -r 's/deprecation="(true|on)"/deprecation="off"/g' hibiscus/build/build.xml
ant -noinput -quiet -buildfile hibiscus/build/build.xml jar
find hibiscus/releases/ -type f -name hibiscus.jar -exec cp {} hibiscus/releases/hibiscus-lib.jar \;
- name: Checkout openjverein
id: openjverein_checkout
uses: actions/checkout@v4
with:
path: jverein
- name: Build openjverein plugin
id: buildtest
working-directory: ./
run: ant -noinput -buildfile jverein/build/build.xml compile