forked from apache/incubator-kie-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
101 lines (88 loc) · 2.77 KB
/
action.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
name: "Setup KIE Tools build environment"
description: ""
inputs:
working_dir:
description: "kie-tools path"
required: false
default: "."
runs:
using: "composite"
steps:
- name: "Print storage usage (before setup)"
shell: bash
run: |
echo "STEP: Print storage usage (before setup)"
cd ${{ inputs.working_dir }}
du -sh .
- name: "Setup pnpm"
uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd
with:
version: 7.0.0
- name: "Setup Node"
uses: actions/setup-node@v2
with:
node-version: 16.13.2
- name: "Setup JDK 11"
uses: actions/setup-java@v1
with:
java-version: 11
- name: "Set up GOLANG 1.19"
uses: actions/setup-go@v3
with:
go-version: "1.19"
- name: "Setup network timeout"
shell: bash
run: |
echo "STEP: Setup network timeout"
cd ${{ inputs.working_dir }}
pnpm config set network-timeout 1000000
- name: "Setup default Maven args"
shell: bash
run: |
echo "STEP: Setup default Maven args"
cd ${{ inputs.working_dir }}
pnpm -r exec 'bash' '-c' 'mkdir .mvn'
pnpm -r exec 'bash' '-c' 'echo -B -ntp > .mvn/maven.config'
pnpm -r exec 'bash' '-c' 'echo -Xmx2g > .mvn/jvm.config'
- name: "Start Xvfb (Ubuntu only)"
shell: bash
run: |
echo "STEP: Start Xvfb (Ubuntu only)"
cd ${{ inputs.working_dir }}
if [ "${{ runner.os }}" == "Linux" ]; then
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
fi
- name: "Configure Pagefile (Windows only)"
if: runner.os == 'Windows'
uses: al-cheb/configure-pagefile-action@7e234852c937eea04d6ee627c599fb24a5bfffee
with:
minimum-size: 16GB
maximum-size: 16GB
disk-root: "C:"
- name: "Increase inotify watches (Ubuntu only)"
shell: bash
run: |
echo "STEP: Increase inotify watches (Ubuntu only)"
cd ${{ inputs.working_dir }}
if [ "${{ runner.os }}" == "Linux" ]; then
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
fi
- name: "Setup GOLANG packages (Linux)"
shell: bash
run: |
echo "STEP: Setup GOLANG packages (Linux)"
cd ${{ inputs.working_dir }}
if [ "${{ runner.os }}" == "Linux" ]; then
sudo apt update && \
sudo apt install -y \
build-essential \
libgtk-3-dev \
libappindicator3-dev \
gir1.2-appindicator3-0.1
fi
- name: "Print storage usage (after setup)"
shell: bash
run: |
echo "STEP: Print storage usage (after setup)"
cd ${{ inputs.working_dir }}
du -sh .