-
Notifications
You must be signed in to change notification settings - Fork 245
60 lines (50 loc) · 1.79 KB
/
build-and-test.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
name: Build & Test Audiveris
# execute this workflow on every push
on:
- push
permissions:
contents: read
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
TESSDATA_PREFIX: /home/runner/work/audiveris/audiveris/tessdata
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Retrieve Gradle properties
uses: BrycensRanch/read-properties-action@v1
id: all
with:
file: gradle.properties
all: true
- name: Setup Java ${{ steps.all.outputs.theMinJavaVersion }}
uses: actions/setup-java@v3
with:
java-version: ${{ steps.all.outputs.theMinJavaVersion }}
distribution: zulu
- name: Set environment variable(s)
run: |
echo "TESSDATA_TAG=${{ steps.all.outputs.theTessdataTag }}" >> $GITHUB_ENV
# cache loaded tessdata files so they don't have to be re-downloaded on every workflow execution
- name: Get cached tessdata files
id: cache-tessdata
uses: actions/cache@v3
with:
path: ${{ env.TESSDATA_PREFIX }}
key: ${{ runner.os }}-tessdata-${{ env.TESSDATA_TAG }}-eng-deu-fra-ita
- name: Install tessdata files
if: steps.cache-tessdata.outputs.cache-hit != 'true'
run: |
${GITHUB_WORKSPACE}/.github/install-tessdata.sh eng &&
${GITHUB_WORKSPACE}/.github/install-tessdata.sh deu &&
${GITHUB_WORKSPACE}/.github/install-tessdata.sh fra &&
${GITHUB_WORKSPACE}/.github/install-tessdata.sh ita
- name: Build Audiveris
uses: gradle/gradle-build-action@v2.7.0
with:
arguments: build -x test
- name: Unit-Test Audiveris
uses: gradle/gradle-build-action@v2.7.0
with:
arguments: test