-
Notifications
You must be signed in to change notification settings - Fork 413
113 lines (94 loc) · 3.46 KB
/
pr.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
name: PR CI
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build-linux-jdk8-fx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 1.8
java-package: jdk+fx
- name: Cache Maven dependencies
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2
- name: Run Unit Tests
run: |
cd maven
mvn clean verify -DunitTests=true -pl core-unittests -am -Dmaven.javadoc.skip=true
cd ..
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install xvfb
wget https://github.com/codenameone/cn1-binaries/archive/refs/heads/master.zip
unzip master.zip -d ..
mv ../cn1-binaries-master ../cn1-binaries
- name: Build with Ant
run: xvfb-run ant test-javase
- name: Build CLDC11 JAR
run: ant -noinput -buildfile Ports/CLDC11/build.xml jar
- name: Build Release
run: ant -noinput -buildfile CodenameOne/build.xml weeklyLibUpdate
- name: Build JavaDocs
run: |
cd CodenameOne
mkdir -p build
mkdir -p build/tempJavaSources
mkdir -p dist
mkdir -p dist/javadoc
wget https://github.com/codenameone/JavaDocSourceEmbed/releases/download/refs%2Fheads%2Fmaster/JavaDocSourceEmbed-1.0-SNAPSHOT.jar
java -jar JavaDocSourceEmbed-1.0-SNAPSHOT.jar src build/tempJavaSources
find build/tempJavaSources ../Ports/CLDC11/src -name "*.java" | /usr/bin/grep -v /impl/ | /usr/bin/xargs javadoc --allow-script-in-comments -protected -d dist/javadoc -windowtitle "Codename One API" || true
cd dist/javadoc
zip -r ../../javadocs.zip *
cd ..
- name: Build iOS Port
run: ant -noinput -buildfile Ports/iOSPort/build.xml jar
- name: Build iOS VM API
run: ant -noinput -buildfile vm/JavaAPI/build.xml jar
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: JavaAPI.jar
path: vm/JavaAPI/dist/JavaAPI.jar
- name: Build iOS VM
run: ant -noinput -buildfile vm/ByteCodeTranslator/build.xml jar
- name: Build CLDC 11 VM
run: ant -noinput -buildfile Ports/CLDC11/build.xml jar
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: ByteCodeTranslator.jar
path: vm/ByteCodeTranslator/dist/ByteCodeTranslator.jar
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: CLDC11.jar
path: Ports/CLDC11/dist/CLDC11.jar
- name: Build Android Port
run: ant -noinput -buildfile Ports/Android/build.xml jar
- name: Packaging Everything
run: zip -j result.zip CodenameOne/javadocs.zip CodenameOne/dist/CodenameOne.jar CodenameOne/updatedLibs.zip Ports/JavaSE/dist/JavaSE.jar build/CodenameOneDist/CodenameOne/demos/CodenameOne_SRC.zip
- name: Copying Files to Server
uses: marcodallasanta/[email protected]
with:
host: ${{ secrets.WP_HOST }}
user: ${{ secrets.WP_USER }}
password: ${{ secrets.WP_PASSWORD }}
local: result.zip
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: JavaSE.jar
path: Ports/JavaSE/dist/JavaSE.jar