-
-
Notifications
You must be signed in to change notification settings - Fork 109
86 lines (72 loc) · 2.56 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
81
82
83
84
85
86
# This file must be in the .github/workflows folder for git actions to work
# but currently is disabled, since builds are being done by jenkins
name: Java CI
on:
push:
# pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: "adopt"
# NEATO ! CACHE !!!!
cache: "maven"
- name: Install Missing Dependencies
run: sudo apt-get install -y libv4l-0 libopencv-dev python3-opencv
- name: Dependency Test # installs all dependencies
run: mvn test -Dtest=org.myrobotlab.framework.DependencyTest -q
- name: Build with Maven # currently cannot test opencv
run: mvn clean verify -q
- name: Get next version
uses: reecetech/[email protected]
id: version
with:
scheme: semver
increment: patch
- name: Package with Maven
run: "mvn package -DskipTests -Dversion=${{ steps.version.outputs.version }} -q"
# - name: Fake Build
# run: |
# mkdir -p target
# echo ${{ github.sha }} > ./target/myrobotlab.zip
- name: Pre Release
if: github.ref != 'refs/heads/develop'
id: prerelease
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
prerelease: true
files: ./target/myrobotlab.zip
name: "Pre ${{ steps.version.outputs.version }} Nixie"
tag_name: ${{ steps.version.outputs.version }}
generate_release_notes: true
body_path: ./release-template.md
# - name: Publish Test Report
# if: success() || failure()
# uses: scacap/action-surefire-report@v1
- name: Add Coverage to PR
id: jacoco
uses: madrapps/[email protected]
with:
paths: |
${{ github.workspace }}/target/site/jacoco/jacoco.xml
token: ${{ secrets.ACCESS_TOKEN }}
debug-mode: true
min-coverage-overall: 40
min-coverage-changed-files: 60
- name: Release
if: github.ref == 'refs/heads/develop'
id: release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
files: ./target/myrobotlab.zip
name: "${{ steps.version.outputs.version }} Nixie"
tag_name: ${{ steps.version.outputs.version }}
generate_release_notes: true
body_path: ./release-template.md