New build matrix for JDKs 8, 11, and 15
This commit is contained in:
Родитель
0c0109e624
Коммит
f8a3427a09
|
@ -11,15 +11,17 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
java: [8, 11, 15]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v2-preview
|
uses: actions/setup-java@v2-preview
|
||||||
with:
|
with:
|
||||||
java-version: 11
|
java-version: ${{ matrix.java }}
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
- name: Build with Maven
|
- name: Build with Maven
|
||||||
run: mvn -B package --file pom.xml
|
run: mvn -B package --file pom.xml
|
||||||
|
|
|
@ -30,11 +30,11 @@ This example illustrates some of the API.
|
||||||
MBeanServerConnection mBeanServer = ManagementFactory.getPlatformMBeanServer();
|
MBeanServerConnection mBeanServer = ManagementFactory.getPlatformMBeanServer();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var flightRecorderConnection = FlightRecorderConnection.connect(mBeanServer);
|
FlightRecorderConnection flightRecorderConnection = FlightRecorderConnection.connect(mBeanServer);
|
||||||
var recordingOptions = new RecordingOptions.Builder().disk("true").build();
|
RecordingOptions recordingOptions = new RecordingOptions.Builder().disk("true").build();
|
||||||
var recordingConfiguration = RecordingConfiguration.PROFILE_CONFIGURATION;
|
RecordingConfiguration recordingConfiguration = RecordingConfiguration.PROFILE_CONFIGURATION;
|
||||||
|
|
||||||
try (var recording = flightRecorderConnection.newRecording(recordingOptions, recordingConfiguration)) {
|
try (Recording recording = flightRecorderConnection.newRecording(recordingOptions, recordingConfiguration)) {
|
||||||
recording.start();
|
recording.start();
|
||||||
TimeUnit.SECONDS.sleep(10);
|
TimeUnit.SECONDS.sleep(10);
|
||||||
recording.stop();
|
recording.stop();
|
||||||
|
|
11
pom.xml
11
pom.xml
|
@ -12,7 +12,11 @@
|
||||||
|
|
||||||
<name>Java Flight Recorder Streaming Library</name>
|
<name>Java Flight Recorder Streaming Library</name>
|
||||||
<description>A library for streaming JFR files via the FlightRecorderMXBean</description>
|
<description>A library for streaming JFR files via the FlightRecorderMXBean</description>
|
||||||
<url>https://github.com/Microsoft/jfr-streaming.git</url>
|
<url>https://github.com/Microsoft/jfr-streaming</url>
|
||||||
|
<organization>
|
||||||
|
<name>Microsoft Corporation</name>
|
||||||
|
<url>http://microsoft.com</url>
|
||||||
|
</organization>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
|
@ -25,13 +29,13 @@
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git@github.com:Microsoft/jfr-streaming.git</connection>
|
<connection>scm:git:git@github.com:Microsoft/jfr-streaming.git</connection>
|
||||||
<developerConnection>scm:git:git@github.com:Microsoft/jfr-streaming.git</developerConnection>
|
<developerConnection>scm:git:git@github.com:Microsoft/jfr-streaming.git</developerConnection>
|
||||||
<url>https://github.com/Microsoft/jfr-streaming.git</url>
|
<url>https://github.com/Microsoft/jfr-streaming</url>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
<developer>
|
<developer>
|
||||||
<id>microsoft</id>
|
<id>microsoft</id>
|
||||||
<name>Microsoft</name>
|
<name>Microsoft Corporation</name>
|
||||||
</developer>
|
</developer>
|
||||||
</developers>
|
</developers>
|
||||||
|
|
||||||
|
@ -73,6 +77,7 @@
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>8</maven.compiler.source>
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
<maven.compiler.target>8</maven.compiler.target>
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче