Skip to content

Commit

Permalink
Support for buildx cross platform unit testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jjlauer committed Jan 10, 2025
1 parent 49cd257 commit ea07a67
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 22 deletions.
4 changes: 3 additions & 1 deletion .blaze/blaze.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
blaze.dependencies = [
"com.fizzed:jne:4.1.1"
"com.fizzed:blaze-ssh"
"com.fizzed:buildx:1.2.0"
"com.fizzed:jne:4.3.0"
]
27 changes: 26 additions & 1 deletion .blaze/blaze.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import com.fizzed.buildx.Buildx;
import com.fizzed.buildx.Target;
import com.fizzed.jne.JavaHome;
import com.fizzed.jne.JavaHomeFinder;
import org.slf4j.Logger;
Expand Down Expand Up @@ -214,5 +216,28 @@ public void update_readme() throws Exception {
Thread.sleep(2000L);
Files.move(newReadmeFile, readmeFile, StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE);
}


private final List<Target> crossTestTargets = asList(
new Target("linux", "x64").setTags("test").setHost("bmh-build-x64-linux-latest"),
new Target("linux", "arm64").setTags("test").setHost("bmh-build-arm64-linux-latest"),
new Target("linux", "riscv64").setTags("extended-test").setHost("bmh-build-riscv64-linux-latest"),
new Target("linux_musl", "x64").setTags("test").setHost("bmh-build-x64-linux-musl-latest"),
new Target("macos", "x64").setTags("test").setHost("bmh-build-x64-macos-latest"),
new Target("macos", "arm64").setTags("test").setHost("bmh-build-arm64-macos-latest"),
new Target("windows", "x64").setTags("test").setHost("bmh-build-x64-windows-latest"),
new Target("windows", "arm64").setTags("test").setHost("bmh-build-arm64-windows-latest"),
new Target("freebsd", "x64").setTags("test").setHost("bmh-build-x64-freebsd-latest"),
new Target("openbsd", "x64").setTags("test").setHost("bmh-build-x64-openbsd-latest")
);

@Task(order = 100)
public void cross_tests() throws Exception {
new Buildx(crossTestTargets)
.tags("test")
.execute((target, project) -> {
project.action("mvn", "clean", "test")
.run();
});
}

}
46 changes: 28 additions & 18 deletions .blaze/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,50 +20,60 @@
<sourceDirectory>${project.basedir}</sourceDirectory>
</build>
<dependencies>
<dependency>
<groupId>org.apache.ivy</groupId>
<artifactId>ivy</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>com.fizzed</groupId>
<artifactId>blaze-ivy</artifactId>
<version>1.5.0</version>
<artifactId>blaze-core</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.7</version>
<version>2.16.1</version>
</dependency>
<dependency>
<groupId>com.typesafe</groupId>
<artifactId>config</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.ivy</groupId>
<artifactId>ivy</artifactId>
<version>2.5.2</version>
<version>1.4.3</version>
</dependency>
<dependency>
<groupId>com.fizzed</groupId>
<artifactId>blaze-core</artifactId>
<version>1.5.0</version>
<artifactId>blaze-ivy</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.7</version>
<version>2.0.13</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.13</version>
</dependency>
<dependency>
<groupId>org.zeroturnaround</groupId>
<artifactId>zt-exec</artifactId>
<version>1.12</version>
</dependency>
<dependency>
<groupId>com.fizzed</groupId>
<artifactId>blaze-ssh</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>com.fizzed</groupId>
<artifactId>buildx</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>com.fizzed</groupId>
<artifactId>jne</artifactId>
<version>4.1.1</version>
<version>4.3.0</version>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion .github/workflows/macos-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up Azul JDK 8
- name: Set up Azul JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-x64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Azul JDK 8
- name: Set up Azul JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ target
.idea
.gradle
build
.buildx
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,29 @@

[![Maven Central](https://img.shields.io/maven-central/v/com.fizzed/rocker?color=blue&style=flat-square)](https://mvnrepository.com/artifact/com.fizzed/rocker)

## Automated Testing

The following Java versions and platforms are tested using GitHub workflows:

[![Java 8](https://img.shields.io/github/actions/workflow/status/fizzed/rocker/java8.yaml?branch=master&label=Java%208&style=flat-square)](https://github.com/fizzed/rocker/actions/workflows/java8.yaml)
[![Java 11](https://img.shields.io/github/actions/workflow/status/fizzed/rocker/java11.yaml?branch=master&label=Java%2011&style=flat-square)](https://github.com/fizzed/rocker/actions/workflows/java11.yaml)
[![Java 17](https://img.shields.io/github/actions/workflow/status/fizzed/rocker/java17.yaml?branch=master&label=Java%2017&style=flat-square)](https://github.com/fizzed/rocker/actions/workflows/java17.yaml)
[![Java 21](https://img.shields.io/github/actions/workflow/status/fizzed/rocker/java21.yaml?branch=master&label=Java%2021&style=flat-square)](https://github.com/fizzed/rocker/actions/workflows/java21.yaml)

[![Linux x64](https://img.shields.io/github/actions/workflow/status/fizzed/rocker/java8.yaml?branch=master&label=Linux%20x64&style=flat-square)](https://github.com/fizzed/rocker/actions/workflows/java8.yaml)
[![MacOS arm64](https://img.shields.io/github/actions/workflow/status/fizzed/rocker/macos-arm64.yaml?branch=master&label=MacOS%20arm64&style=flat-square)](https://github.com/fizzed/rocker/actions/workflows/macos-arm64.yaml)
[![Windows x64](https://img.shields.io/github/actions/workflow/status/fizzed/rocker/windows-x64.yaml?branch=master&label=Windows%20x64&style=flat-square)](https://github.com/fizzed/rocker/actions/workflows/windows-x64.yaml)

The following platforms are tested using the [Fizzed, Inc.](http://fizzed.com) build system:

[![Linux arm64](https://img.shields.io/badge/Linux%20arm64-passing-green)](buildx-results.txt)
[![Linux riscv64](https://img.shields.io/badge/Linux%20riscv64-passing-green)](buildx-results.txt)
[![Linux MUSL x64](https://img.shields.io/badge/Linux%20MUSL%20x64-passing-green)](buildx-results.txt)
[![MacOS x64](https://img.shields.io/badge/MacOS%20x64-passing-green)](buildx-results.txt)
[![Windows arm64](https://img.shields.io/badge/Windows%20arm64-passing-green)](buildx-results.txt)
[![FreeBSD x64](https://img.shields.io/badge/FreeBSD%20x64-passing-green)](buildx-results.txt)
[![OpenBSD x64](https://img.shields.io/badge/OpenBSD%20x64-passing-green)](buildx-results.txt)

## Overview

Rocker is a Java 8+ optimized, near zero-copy rendering,
Expand Down
Binary file modified blaze.jar
Binary file not shown.
16 changes: 16 additions & 0 deletions buildx-results.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Buildx Results
--------------
Cross platform tests use the Buildx project: https://github.com/fizzed/buildx
Commit: 49cd2575e4d4f6456a8b9f4bdc10cac1b5991061
Date: 2025-01-10T20:36:56.774381Z[UTC]

linux-x64 success
linux-arm64 success
linux_musl-x64 success
macos-x64 success
macos-arm64 success
windows-x64 success
windows-arm64 success
freebsd-x64 success
openbsd-x64 success

0 comments on commit ea07a67

Please sign in to comment.