-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (52 loc) · 1.63 KB
/
mps_cli_build.yaml
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
name: MPS-CLI_CI
on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.MPSCLI_GITHUB_PKG_REGISTRY }}
jobs:
build_mps_cli:
runs-on: ubuntu-latest
env:
DISPLAY: ':99'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup headless environment
run: |
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
chmod 777 mps-cli-gradle-plugin/gradlew
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build MPS-CLI and Test
uses: gradle/gradle-build-action@v2
with:
arguments: :plugin:functionalTest --debug
wrapper-cache-enabled: true
dependencies-cache-enabled: true
dependencies-cache-key: gradle/dependency-locks/**
dependencies-cache-exact: true
configuration-cache-enabled: true
build-root-directory: mps-cli-gradle-plugin
- uses: actions/upload-artifact@v3
if: failure()
with:
name: gradle-test-report
path: ./mps-cli-gradle-plugin/plugin/build/reports/
- name: Publish
uses: gradle/gradle-build-action@v2
if: github.event_name == 'push' && github.ref_name == 'main'
with:
arguments: :plugin:publish -Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
wrapper-cache-enabled: true
dependencies-cache-enabled: true
dependencies-cache-key: gradle/dependency-locks/**
dependencies-cache-exact: true
configuration-cache-enabled: true
build-root-directory: mps-cli-gradle-plugin