-
Notifications
You must be signed in to change notification settings - Fork 16
166 lines (160 loc) · 5.27 KB
/
maven.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: RESOLVE (Custom Java CI with Maven)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
# This job checks that our Java files have the proper license header.
check_license:
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: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run License Validation Check
run: mvn license:check
# This job checks that our code styles are the same.
check_style:
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: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run Formatter Validation Check
run: mvn formatter:validate
# This job runs our JUnit tests.
junit:
runs-on: ubuntu-latest
strategy:
matrix:
java-dist: [ 'corretto', 'liberica', 'microsoft', 'temurin', 'semeru', 'zulu' ]
java: [ '17', '21' ]
steps:
- uses: actions/checkout@v4
- name: Set up Java JDK
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.java-dist }}
java-version: ${{ matrix.java }}
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run JUnit Tests
run: mvn test -B
# This job runs the RESOLVE compiler to analyze files that we know to be working.
# run_compiler_analyze_files:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v2
# - name: Set up JDK 11
# uses: actions/setup-java@v2
# with:
# java-version: '11'
# distribution: 'adopt'
# - name: Cache Maven packages
# uses: actions/cache@v2
# with:
# path: ~/.m2
# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
# restore-keys: ${{ runner.os }}-m2
# - name: Run Compiler to Analyze Workspace Files
# run: |
# # Build the RESOLVE compiler as a jar
# mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
#
# # Make the script runnable
# chmod +x "${GITHUB_WORKSPACE}/bin/runAnalyzeTests"
#
# # Analyze the specified RESOLVE files
# "${GITHUB_WORKSPACE}/bin/runAnalyzeTests"
#
# # Delete temporary folder
# rm -rf "${GITHUB_WORKSPACE}/temp"
# This job runs the RESOLVE compiler to build a runnable jar from files that we know to be working.
# run_compiler_buildjar:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v2
# - name: Set up JDK 11
# uses: actions/setup-java@v2
# with:
# java-version: '11'
# distribution: 'adopt'
# - name: Cache Maven packages
# uses: actions/cache@v2
# with:
# path: ~/.m2
# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
# restore-keys: ${{ runner.os }}-m2
# - name: Run Compiler to Build Jars from Workspace Files
# run: |
# # Build the RESOLVE compiler as a jar
# mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
#
# # Make the script runnable
# chmod +x "${GITHUB_WORKSPACE}/bin/runBuildJarTests"
#
# # Build a Jar from the specified RESOLVE files
# "${GITHUB_WORKSPACE}/bin/runBuildJarTests"
#
# # Delete temporary folder
# rm -rf "${GITHUB_WORKSPACE}/temp"
# This job runs the RESOLVE compiler to prove files that we know to be working.
# run_compiler_prove_files:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v2
# - name: Set up JDK 11
# uses: actions/setup-java@v2
# with:
# java-version: '11'
# distribution: 'adopt'
# - name: Cache Maven packages
# uses: actions/cache@v2
# with:
# path: ~/.m2
# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
# restore-keys: ${{ runner.os }}-m2
# - name: Run Compiler to Prove Workspace Files
# run: |
# # Build the RESOLVE compiler as a jar
# mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
#
# # Make the script runnable
# chmod +x "${GITHUB_WORKSPACE}/bin/runProveTests"
#
# # Prove the specified RESOLVE files
# "${GITHUB_WORKSPACE}/bin/runProveTests"
#
# # Delete temporary folder
# rm -rf "${GITHUB_WORKSPACE}/temp"