Skip to content

Commit 8a59f50

Browse files
committed
chore: run samples when testing, add simple makefile
Signed-off-by: melodicore <datafox@datafox.me>
1 parent 5057962 commit 8a59f50

5 files changed

Lines changed: 74 additions & 3 deletions

File tree

.github/workflows/job.build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ jobs:
5252
- name: "Build: Elide Plugin"
5353
run: ./mvnw clean install -pl elide-plugin
5454
- name: "Test: Java Compiler"
55-
run: ./mvnw clean package -f sample-java
55+
run: ./mvnw clean package exec:java -f sample-java
5656
- name: "Test: Kotlin Plugin"
57-
run: ./mvnw clean package -f sample-kotlin
57+
run: ./mvnw clean package exec:java -f sample-kotlin
5858
- name: "Test: Mixed source"
59-
run: ./mvnw clean package -f sample-mixed
59+
run: ./mvnw clean package exec:java -f sample-mixed

Makefile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
all: clean install samples
2+
3+
clean:
4+
./mvnw clean
5+
6+
install: java kotlin plugin
7+
8+
java:
9+
./mvnw install -pl java-compiler
10+
11+
kotlin:
12+
./mvnw install -pl kotlin-plugin
13+
14+
plugin:
15+
./mvnw install -pl elide-plugin
16+
17+
samples: sample-java sample-kotlin sample-plugin
18+
19+
sample-java:
20+
./mvnw clean package exec:java -f sample-java
21+
22+
sample-kotlin:
23+
./mvnw clean package exec:java -f sample-kotlin
24+
25+
sample-plugin:
26+
./mvnw clean package exec:java -f sample-mixed

sample-java/pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@
2222
<compilerId>elide</compilerId>
2323
</configuration>
2424
</plugin>
25+
<plugin>
26+
<groupId>org.codehaus.mojo</groupId>
27+
<artifactId>exec-maven-plugin</artifactId>
28+
<version>3.6.3</version>
29+
<executions>
30+
<execution>
31+
<goals>
32+
<goal>java</goal>
33+
</goals>
34+
</execution>
35+
</executions>
36+
<configuration>
37+
<mainClass>com.sample.Hello</mainClass>
38+
</configuration>
39+
</plugin>
2540
</plugins>
2641
</build>
2742
</project>

sample-kotlin/pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,21 @@
2424
<version>1.0.0</version>
2525
<extensions>true</extensions>
2626
</plugin>
27+
<plugin>
28+
<groupId>org.codehaus.mojo</groupId>
29+
<artifactId>exec-maven-plugin</artifactId>
30+
<version>3.6.3</version>
31+
<executions>
32+
<execution>
33+
<goals>
34+
<goal>java</goal>
35+
</goals>
36+
</execution>
37+
</executions>
38+
<configuration>
39+
<mainClass>com.sample.HelloKt</mainClass>
40+
</configuration>
41+
</plugin>
2742
</plugins>
2843
</build>
2944
</project>

sample-mixed/pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,21 @@
2929
<version>1.0.0</version>
3030
<extensions>true</extensions>
3131
</plugin>
32+
<plugin>
33+
<groupId>org.codehaus.mojo</groupId>
34+
<artifactId>exec-maven-plugin</artifactId>
35+
<version>3.6.3</version>
36+
<executions>
37+
<execution>
38+
<goals>
39+
<goal>java</goal>
40+
</goals>
41+
</execution>
42+
</executions>
43+
<configuration>
44+
<mainClass>com.sample.Hello</mainClass>
45+
</configuration>
46+
</plugin>
3247
</plugins>
3348
</build>
3449
</project>

0 commit comments

Comments
 (0)