-
Notifications
You must be signed in to change notification settings - Fork 167
141 lines (109 loc) · 3.63 KB
/
Copy pathbuild.yml
File metadata and controls
141 lines (109 loc) · 3.63 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
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Setup Build Environment
run: |
sudo apt-get update
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
sudo /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 20
- name: Install Node.js modules
run: npm install
- name: Lint
run: npm run lint
- name: Build OSGi bundle
run: npm run build-plugin
# buildJdtlsExt.js regenerates contributes.javaExtensions from server/.
# If the committed list is stale (e.g. someone bumped a Maven dep in
# java-extension/ without re-running the build), the regenerated file
# will differ. Fail the build with the diff so the drift can't slip
# into a release unnoticed (cf. the 5.14.3/1.14.3 -> 5.14.4/1.14.4
# mismatch this script was added to guard against).
- name: Verify javaExtensions is in sync with server/
run: git diff --exit-code --ignore-cr-at-eol -- package.json
- name: prepublish
run: npm run vscode:prepublish
- name: Test extension
run: DISPLAY=:99 npm test
- name: Print language server Log if job failed
if: ${{ failure() }}
run: find $HOME/.config/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;;
windows:
name: Windows
runs-on: windows-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 20
- name: Install Node.js modules
run: npm install
- name: Lint
run: npm run lint
- name: Build OSGi bundle
run: npm run build-plugin
- name: Verify javaExtensions is in sync with server/
run: git diff --exit-code --ignore-cr-at-eol -- package.json
- name: prepublish
run: npm run vscode:prepublish
- name: Test extension
run: npm test
- name: Print language server Log if job failed
if: ${{ failure() }}
run: Get-ChildItem -Path $env:APPDATA/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log | cat
darwin:
name: macOS
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 20
- name: Install Node.js modules
run: npm install
- name: Lint
run: npm run lint
- name: Build OSGi bundle
run: npm run build-plugin
- name: Verify javaExtensions is in sync with server/
run: git diff --exit-code --ignore-cr-at-eol -- package.json
- name: prepublish
run: npm run vscode:prepublish
- name: Test extension
run: npm test
- name: Print language server Log if job failed
if: ${{ failure() }}
run: find $HOME/Library/Application\ Support/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;;