Skip to content

Commit c15ed4e

Browse files
committed
Add Github Action to detect changes to the target platform.
Signed-off-by: Roland Grunberg <[email protected]>
1 parent c2cd627 commit c15ed4e

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/tp-verify.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Target Platform Differences
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 8 * * *'
7+
8+
jobs:
9+
compute-differences:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
repo-cache-hit: ${{ steps.cache-jdtls-list.outputs.cache-hit }}
13+
steps:
14+
- name: Check out repository code
15+
uses: actions/checkout@v4
16+
- name: Cache .m2 repository
17+
uses: actions/cache@v4
18+
with:
19+
path: ~/.m2/repository
20+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml', '**/*.target') }}
21+
save-always: true
22+
- name: Cache Maven wrapper
23+
uses: actions/cache@v4
24+
with:
25+
path: ~/.m2/wrapper
26+
key: maven-wrapper-${{ hashFiles('**/mvnw') }}
27+
save-always: true
28+
- name: Set up Eclipse Temurin JDK
29+
uses: actions/setup-java@v2
30+
with:
31+
java-version: '21'
32+
distribution: 'temurin'
33+
- name: Build JDT-LS
34+
run: |
35+
./mvnw -B -U clean verify -DskipTests
36+
ls -1 org.eclipse.jdt.ls.product/target/repository/plugins/ | grep -v org.eclipse.jdt.ls | tee jdt-ls-runtime.list
37+
- name: Check New Changes
38+
id: cache-jdtls-list
39+
uses: actions/cache@v4
40+
with:
41+
path: jdt-ls-runtime.list
42+
key: jdt-ls-runtime.list-${{ hashFiles('jdt-ls-runtime.list') }}
43+
- name: Upload JDT-LS Runtime List
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: jdt-ls-runtime
47+
path: |
48+
jdt-ls-runtime.list
49+
if-no-files-found: error
50+
has-differences:
51+
runs-on: ubuntu-latest
52+
needs: compute-differences
53+
if: ${{ needs.compute-differences.outputs.repo-cache-hit != 'true' }}
54+
steps:
55+
- name: Notify Target Platform Changed
56+
run: |
57+
echo "There was a change"
58+

0 commit comments

Comments
 (0)