Skip to content

Commit bd0e3d3

Browse files
committed
Fixed branch behavior and CI
1 parent b2f0826 commit bd0e3d3

2 files changed

Lines changed: 25 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: CI
22

33
on:
44
push:
5+
branches:
6+
- main
7+
- master
58
pull_request:
69

710
jobs:
@@ -21,6 +24,14 @@ jobs:
2124
- name: Set up Android SDK
2225
uses: android-actions/setup-android@v3
2326

27+
- name: Set up Codename One Build Client
28+
shell: bash
29+
run: |
30+
set -euo pipefail
31+
mkdir -p "$HOME/.codenameone"
32+
curl -fsSL https://github.com/codenameone/CodenameOne/raw/refs/heads/master/maven/CodeNameOneBuildClient.jar \
33+
-o "$HOME/.codenameone/CodeNameOneBuildClient.jar"
34+
2435
- name: Compute snapshot version
2536
id: versions
2637
shell: bash
@@ -39,15 +50,15 @@ jobs:
3950
run: |
4051
set -euo pipefail
4152
mvn -B -ntp versions:set -DnewVersion="${{ steps.versions.outputs.snapshot_version }}" -DgenerateBackupPoms=false
42-
mvn -B -ntp -DskipTests install
53+
xvfb-run -a mvn -B -ntp -DskipTests install
4354
4455
- name: Generate Android source project from sample app
4556
working-directory: fingerprint-scanner-test
4657
shell: bash
4758
run: |
4859
set -euo pipefail
4960
chmod +x mvnw
50-
./mvnw -B -ntp package \
61+
xvfb-run -a ./mvnw -B -ntp package \
5162
-DskipTests \
5263
-Dopen=false \
5364
-Dcodename1.platform=android \
@@ -75,6 +86,14 @@ jobs:
7586
java-version: "17"
7687
cache: maven
7788

89+
- name: Set up Codename One Build Client
90+
shell: bash
91+
run: |
92+
set -euo pipefail
93+
mkdir -p "$HOME/.codenameone"
94+
curl -fsSL https://github.com/codenameone/CodenameOne/raw/refs/heads/master/maven/CodeNameOneBuildClient.jar \
95+
-o "$HOME/.codenameone/CodeNameOneBuildClient.jar"
96+
7897
- name: Compute snapshot version
7998
id: versions
8099
shell: bash
@@ -93,15 +112,15 @@ jobs:
93112
run: |
94113
set -euo pipefail
95114
mvn -B -ntp versions:set -DnewVersion="${{ steps.versions.outputs.snapshot_version }}" -DgenerateBackupPoms=false
96-
mvn -B -ntp -DskipTests install
115+
xvfb-run -a mvn -B -ntp -DskipTests install
97116
98117
- name: Generate iOS source project from sample app
99118
working-directory: fingerprint-scanner-test
100119
shell: bash
101120
run: |
102121
set -euo pipefail
103122
chmod +x mvnw
104-
./mvnw -B -ntp package \
123+
xvfb-run -a ./mvnw -B -ntp package \
105124
-DskipTests \
106125
-Dopen=false \
107126
-Dcodename1.platform=ios \

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
<java.version>1.8</java.version>
5454
<java-tests.version>11</java-tests.version>
5555
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
56+
<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
5657
<maven.compiler.source>8</maven.compiler.source>
5758
<maven.compiler.target>8</maven.compiler.target>
5859
<cn1lib.name>fingerprint-scanner</cn1lib.name>
@@ -203,6 +204,7 @@
203204
<plugin>
204205
<groupId>org.apache.maven.plugins</groupId>
205206
<artifactId>maven-source-plugin</artifactId>
207+
<version>${maven-source-plugin.version}</version>
206208
<executions>
207209
<execution>
208210
<id>attach-sources</id>

0 commit comments

Comments
 (0)