forked from apache/causeway
114 lines (101 loc) · 3.56 KB
/
ci-build-artifacts-no-push-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
name: Build and Test (w/ Maven)
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: build-local-no-push
runs-on: ubuntu-latest
env:
# to be shared among all steps of this job
BASELINE: 2.0.0-M6
PROJECT_ROOT_PATH: ${{ github.workspace }}
CI_SCRIPTS_PATH: ${{ github.workspace }}/scripts/ci
# not used, would be nice if we could transform the TIMESTAMP string into the REVISION
# variable here, but it seems github not yet has any string expression manipulation
# operators other than concatination
TIMESTAMP: ${{ github.event.head_commit.timestamp }}
# set this to 'deploy' when intent is to push the built packages to a repo
# requires 'secrets' which we don't have yet
MVN_STAGES: install
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 17
- name: Print Maven Version
run: mvn --version
- name: Activate Cache for Maven Downloads
uses: actions/cache@v2.1.7
env:
# change the cache-name if we want to rebuild the cache
# currently there is no concept of cache clearing
cache-name: maven-2021-08
with:
path: ~/.m2/repository
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
${{ runner.os }}-
- name: Setup Script Environment
shell: bash
run: |
echo ============== ENV =================
echo BASELINE \: $BASELINE
echo TIMESTAMP \: $TIMESTAMP
echo PROJECT_ROOT_PATH\: $PROJECT_ROOT_PATH
echo CI_SCRIPTS_PATH \: $CI_SCRIPTS_PATH
echo MVN_STAGES \: $MVN_STAGES
echo ======================================
- name: Build Artifacts
shell: bash
run: bash $CI_SCRIPTS_PATH/build-artifacts.sh
env:
# -Dmodule-all ... build all modules
# -Dmodule-all-except-incubator ... build all modules except 'incubator' (eg. when vaadin build fails)
# -Denforcer.failFast=true ... fail fast on convergence issues (enforcer plugin)
# -Dmaven.source.skip=true ... no need for the CI build to pull sources
# -Djacoco.skip=true ... no need for the CI build to add test coverage reports
# -T 1C ... 1 build thread per core
MVN_ADDITIONAL_OPTS: >-
-Dmodule-all
-Dproject.build.outputTimestamp=1
-Dmaven.source.skip=true
-Denforcer.failFast=true
-Djacoco.skip=true
-T 1C
# FOR DEBUG USE
# - name: Dump GitHub context
# env:
# ENV_CONTEXT: ${{ toJson(env) }}
# run: echo "$ENV_CONTEXT"
# - name: Dump GitHub context
# env:
# GITHUB_CONTEXT: ${{ toJson(github) }}
# run: echo "$GITHUB_CONTEXT"
# - name: Dump job context
# env:
# JOB_CONTEXT: ${{ toJson(job) }}
# run: echo "$JOB_CONTEXT"
# - name: Dump steps context
# env:
# STEPS_CONTEXT: ${{ toJson(steps) }}
# run: echo "$STEPS_CONTEXT"
# - name: Dump runner context
# env:
# RUNNER_CONTEXT: ${{ toJson(runner) }}
# run: echo "$RUNNER_CONTEXT"
# - name: Dump strategy context
# env:
# STRATEGY_CONTEXT: ${{ toJson(strategy) }}
# run: echo "$STRATEGY_CONTEXT"
# - name: Dump matrix context
# env:
# MATRIX_CONTEXT: ${{ toJson(matrix) }}
# run: echo "$MATRIX_CONTEXT"