This repository has been archived by the owner on Aug 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (56 loc) · 1.46 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
name: Build JLox
on:
push:
branches:
- main
paths:
- '.github/**'
- 'jlox/**'
- 'tests/**'
- '*.java'
jobs:
jlox:
name: ⚙️ Build Java Version of Lox
runs-on: ubuntu-latest
steps:
- name: ⏬ Checkout code
uses: actions/checkout@v2
- name: ⚙️ Set up JDK 11
uses: actions/setup-java@v2.1.0
with:
java-version: 11
distribution: 'adopt'
- name: 💽 Restore Maven cache
uses: actions/cache@v2.1.6
with:
path: ~/.m2/repository
key: build-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
build-${{ runner.os }}-
- name: 🧪 Run tests & 📦 Build package
run: mvn clean test package
working-directory: ./jlox
- name: 🚀 Upload JAR
uses: actions/upload-artifact@v2
with:
name: jlox
path: ./jlox/target/jlox.jar
performance:
name: 🧪 Run performance tests
runs-on: ubuntu-latest
needs: jlox
steps:
- name: ⏬ Checkout code
uses: actions/checkout@v2
- name: ⚙️ Set up JDK 11
uses: actions/setup-java@v2.1.0
with:
java-version: 11
distribution: 'adopt'
- name: ⏬ Download jlox
uses: actions/download-artifact@v2
with:
name: jlox
path: .
- name: 🧪 Perform jlox tests
run: java Tests.java