-
Notifications
You must be signed in to change notification settings - Fork 12
74 lines (72 loc) · 2.68 KB
/
java_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
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Java Build
on: [push]
jobs:
build-multi-platform:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest] # exclude macos-latest for now (because of problem with numpy)
java: ['8', '11', '17']
include:
- os: ubuntu-latest
pipcache: ~/.cache/pip
architecture:
#- os: macos-latest
# pipcache: ~/Library/Caches/pip
- os: windows-latest
pipcache: ~\AppData\Local\pip\Cache
name: Build on ${{ matrix.os }} with Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: |
~/.m2
key: ${{ matrix.os }}-m2-${{ hashFiles('**/pom.xml') }}-1
# can be further improved: https://medium.com/ai2-blog/python-caching-in-github-actions-e9452698e98d
- name: Cache Python packages
uses: actions/cache@v4
with:
path: |
${{ matrix.pipcache }}
key: ${{ runner.os }}-python-${{ hashFiles('**/requirements.txt') }}-pipcache
- name: Cache Transformers models
uses: actions/cache@v4
with:
path: |
~/.cache/huggingface
key: ${{ runner.os }}-transformers-models
- name: Cache OAEI files # The check if the download server works as expected is in java_coverage where this cache is not enabled
uses: actions/cache@v4
with:
path: |
~/oaei_track_cache
key: ${{ runner.os }}-oaei
- name: Setup Python
uses: actions/setup-python@v5
with:
# TODO: the latest pytorch version is only available for 3.9 and not yet in 3.10 - replace it with 3.x if it is available
python-version: '3.11'
#architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Install python dependencies
run: pip install -r ./matching-ml/src/main/resources/requirements.txt
- name: Build with Maven
#run: mvn -B package --file pom.xml
run: mvn clean install
# https://github.com/actions/virtual-environments/issues/712
- name: Workaround 8.3 on windows
if: matrix.os == 'windows-latest'
run: echo "TMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
- name: Check simple seals packaging
working-directory: examples/simpleSealsMatcher
shell: bash
if: matrix.java == '8'
run: |
mvn clean package
mvn -Dexec.mainClass=de.uni_mannheim.informatik.dws.melt.demomatcher.TestPackage -Dexec.classpathScope=test test-compile exec:java