-
Notifications
You must be signed in to change notification settings - Fork 2
80 lines (67 loc) · 2.45 KB
/
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
75
76
77
78
79
80
name: Build JAICF Plugin on push
on:
push:
branches: [ 212/dev ]
jobs:
gradleValidation:
name: Gradle Wrapper
runs-on: ubuntu-latest
steps:
- name: Fetch Sources
uses: actions/checkout@v2.3.4
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.0.4
build:
name: Build
needs: gradleValidation
runs-on: ubuntu-latest
steps:
- name: Fetch Sources
uses: actions/checkout@v2.3.4
- name: Cache Gradle
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 11
cache: gradle
- name: Export Properties
id: properties
shell: bash
run: |
PROPERTIES="$(./gradlew properties --console=plain -q)"
IDE_VERSIONS="$(echo "$PROPERTIES" | grep "^pluginVerifierIdeVersions:" | base64)"
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')"
echo "::set-output name=ideVersions::$IDE_VERSIONS"
echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier"
echo "::set-output name=version::$VERSION"
echo "::set-output name=name::$NAME"
- name: Setup Plugin Verifier IDEs Cache
uses: actions/cache@v2.1.6
with:
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides
key: ${{ runner.os }}-plugin-verifier-${{ steps.properties.outputs.ideVersions }}
- name: Grant execute permission for gradle
run: |
chmod +x gradlew
chmod +x gradle/wrapper/gradle-wrapper.jar
- name: Run Tests
run: ./gradlew test
- name: Run Plugin Verifier
run: ./gradlew runPluginVerifier -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }}
- name: Build Plugin
run: ./gradlew buildPlugin
- name: Upload artifacts
uses: actions/upload-artifact@v2.2.4
with:
name: "${{ steps.properties.outputs.name }} - ${{ steps.properties.outputs.version }}"
path: ./build/distributions/*