-
Notifications
You must be signed in to change notification settings - Fork 14
95 lines (77 loc) · 2.67 KB
/
main.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: FASTEN_CI
on:
push:
branches:
- master
- 'maintenance/*'
pull_request:
workflow_dispatch:
inputs:
publish:
description: Whether to publish the build result to Maven repositories
type: boolean
default: false
required: false
env:
MPS_VER: "2022.2"
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.FASTEN_GITHUB_PKG_REGISTRY }}
jobs:
build_fasten_distribution_and_perform_checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Gradle
run: |
echo "$(pwd)/rcp_resources/external_tools" >> "$GITHUB_PATH"
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build FASTEN
run: |
./gradlew package_fasten_safety_distribution_win -Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
- name: Check Consistency of the FASTEN-NuSMV Tutorial
run: |
./gradlew -PcheckProject=nusmv -Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
- name: Check Consistency of the FASTEN-Safety Tutorial
run: |
./gradlew -PcheckProject=safety -Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
- name: Run Tests
run: |
xvfb-run ./gradlew run_all_tests -Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
with:
fail_on_failure: true
require_tests: true
report_paths: 'build/**/TEST*.xml'
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload distribution
uses: actions/upload-artifact@v4
with:
name: fasten-distribution
path: build/distributions/fasten-*.zip
publish:
# Only publish on push (to maintenance or master) or on dispatch if requested
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.publish == 'true')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
- name: Publish
run: |
./gradlew publish \
-Pgpr.user=${{ github.actor }} \
-Pgpr.token=${{ secrets.GITHUB_TOKEN }} \
-Partifacts.itemis.cloud.user=${{ secrets.ARTIFACTS_ITEMIS_CLOUD_USER }} \
-Partifacts.itemis.cloud.pw=${{ secrets.ARTIFACTS_ITEMIS_CLOUD_PW }}