-
Notifications
You must be signed in to change notification settings - Fork 21
154 lines (142 loc) · 4.33 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
# https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Coatjava-CI
on:
pull_request:
push:
branches: [ development ]
tags: [ '*' ]
schedule:
# NOTE: From what I read, the email notification for cron can only go
# to the last committer of this file!!!!!
- cron: '0 22 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
# build
#############################################################################
build:
strategy:
fail-fast: true
matrix:
runner:
- ubuntu-latest
- macos-latest
outputs:
default_runner: ubuntu-latest
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
distribution: zulu
- name: build
run: ./build-coatjava.sh --spotbugs --unittests --quiet
- name: tar # tarball to preserve permissions
run: tar czvf coatjava.tar.gz coatjava
- uses: actions/upload-artifact@v3
with:
name: build_${{ matrix.runner }}
retention-days: 1
path: coatjava.tar.gz
- name: collect jacoco report
if: ${{ matrix.runner == 'ubuntu-latest' }}
run: validation/jacoco-aggregate.sh
- name: publish jacoco report
if: ${{ matrix.runner == 'ubuntu-latest' }}
uses: actions/upload-pages-artifact@v2
with:
path: publish/
retention-days: 1
# tests
#############################################################################
test_coatjava:
needs: [ build ]
strategy:
fail-fast: true
matrix:
runner:
- ubuntu-latest
id:
- kpp
- eb-ep
- eb-eg
- eb-epc
- eb-enc
- eb-eftpi
include:
# run all tests on ubuntu
- { id: kpp, cmd: ./run-advanced-tests.sh }
- { id: eb-ep, cmd: ./run-eb-tests.sh -100 electronproton }
- { id: eb-eg, cmd: ./run-eb-tests.sh -100 electrongamma }
- { id: eb-epc, cmd: ./run-eb-tests.sh -100 electronprotonC }
- { id: eb-enc, cmd: ./run-eb-tests.sh -100 electronneutronC }
- { id: eb-eftpi, cmd: ./run-eb-tests.sh -100 electronFTpion }
# run one macos test
- { runner: macos-latest, id: eb-ep, cmd: ./run-eb-tests.sh -100 electronproton }
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
distribution: zulu
- uses: actions/download-artifact@v3
with:
name: build_${{ matrix.runner }}
- name: untar build
run: tar xzvf coatjava.tar.gz
- name: run test
run: |
cd validation/advanced-tests
echo "COMMAND: ${{ matrix.cmd }}"
${{ matrix.cmd }}
test_run-groovy:
needs: [ build ]
runs-on: ${{ needs.build.outputs.default_runner }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
distribution: zulu
- name: setup groovy
uses: wtfjoke/setup-groovy@v1
with:
groovy-version: 4.x
- uses: actions/download-artifact@v3
with:
name: build_${{ needs.build.outputs.default_runner }}
- name: untar build
run: tar xzvf coatjava.tar.gz
- name: test run-groovy
run: coatjava/bin/run-groovy validation/advanced-tests/test-run-groovy.groovy
final:
needs:
- build
- test_coatjava
- test_run-groovy
runs-on: ${{ needs.build.outputs.default_runner }}
steps:
- name: pass
run: exit 0
# deploy web pages
#############################################################################
deploy_web_pages:
if: ${{ github.event_name == 'push' }}
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: deployment
id: deployment
uses: actions/deploy-pages@v2