forked from gchq/sleeper
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (54 loc) · 2.02 KB
/
chunk.yaml
File metadata and controls
56 lines (54 loc) · 2.02 KB
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
on:
workflow_call:
inputs:
chunkId:
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
- name: Cache dependencies
uses: actions/cache@v3
with:
path: java/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Resolve dependencies
run: mvn de.qaware.maven:go-offline-maven-plugin:resolve-dependencies -Dmaven.repo.local=.m2/repository
working-directory: ./java
- name: Get chunk configuration
id: config
working-directory: ./java/build
run: |
mvn compile exec:java -q -Dexec.mainClass=sleeper.build.chunks.GetChunkConfig \
-Dmaven.repo.local=../.m2/repository \
-Dexec.args="${{ inputs.chunkId }} github_actions_outputs ${{ github.workspace }}/.github/config/chunks.yaml" \
>> $GITHUB_OUTPUT
- name: Compile
run: mvn --batch-mode clean install -am -pl ${{ steps.config.outputs.moduleList }} -Pquick,skipShade -Dmaven.repo.local=.m2/repository
working-directory: ./java
- name: Test
id: test
run: mvn --batch-mode --fail-at-end verify -pl ${{ steps.config.outputs.moduleList }} -Dmaven.repo.local=.m2/repository -e
working-directory: ./java
- name: Generate site
id: site
if: failure() && steps.test.conclusion == 'failure'
run: |
mvn --batch-mode clean site-deploy -PcleanForSite -pl sleeper:aws,${{ steps.config.outputs.moduleList }} \
-Dmaven.repo.local=.m2/repository
working-directory: ./java
- name: Upload site as artifact
if: failure() && steps.site.conclusion == 'success'
uses: actions/upload-artifact@v3
with:
name: site
path: |
/tmp/sleeper/site