Skip to content

update github actions #513

update github actions

update github actions #513

Workflow file for this run

name: Java Build
on: [push]
jobs:
build-multi-platform:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
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@v4
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