Skip to content

Commit

Permalink
Merge pull request #21 from Elikill58/master
Browse files Browse the repository at this point in the history
Fix missing tools jar, add github workflow and add how to use for newer versions
  • Loading branch information
sk89q authored Sep 21, 2023
2 parents 3fe5e55 + 81e9419 commit a000df0
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 51 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build

on:
- push
- pull_request

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
name: Checkout repo

- name: Set up JDK 17 (LTS)
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
cache: maven

- name: Build with Maven
run: mvn install

- uses: actions/upload-artifact@v2
name: Upload Artifact
with:
name: WarmRoast
path: target/warmroast-*.jar
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ WarmRoast is an easy-to-use CPU sampling tool for JVM applications, but particul
* See the percentage of CPU time for each method relative to its parent methods.
* Maintains style and function with use of "File -> Save As" (in tested browsers).

**Download Latest Version:** http://builds.enginehub.org/job/warmroast/last-successful/
### Download

Java 7 and above is required to use WarmRoast.
**Latest release**: [here](../../releases)

**Latest build**: [here](../../actions/workflows/build.yml)

Screenshots
-----------
Expand All @@ -24,6 +26,14 @@ Screenshots
Usage
-----

## For Java 9 and newer

The `tools.jar` is automatically included into JDK's since Java 9. You only should use something like this:

java -cp warmroast-1.0.0-SNAPSHOT.jar com.sk89q.warmroast.WarmRoast --thread "Server thread"

## For Java 7 & 8

1. Note the path of your JDK.

2. Download WarmRoast.
Expand Down
50 changes: 1 addition & 49 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<version>1.0.0-SNAPSHOT</version>
<name>WarmRoast</name>
<url>http://www.sk89q.com</url>

<scm>
<connection>scm:git:git://github.com/sk89q/warmroast.git</connection>
<url>https://github.com/sk89q/warmroast</url>
Expand Down Expand Up @@ -101,59 +102,10 @@
</excludes>
</filter>
</filters>
<artifactSet>
<excludes>
<exclude>com.sun:tools</exclude>
</excludes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>tools-default</id>
<activation>
<activeByDefault>true</activeByDefault>
<file>
<exists>${java.home}/../lib/tools.jar</exists>
</file>
</activation>
<properties>
<toolsJar>${java.home}/../lib/tools.jar</toolsJar>
</properties>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${toolsJar}</systemPath>
</dependency>
</dependencies>
</profile>
<profile>
<id>tools-mac</id>
<activation>
<activeByDefault>false</activeByDefault>
<file>
<exists>${java.home}/../Classes/classes.jar</exists>
</file>
</activation>
<properties>
<toolsJar>${java.home}/../Classes/classes.jar</toolsJar>
</properties>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${toolsJar}</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
</project>

0 comments on commit a000df0

Please sign in to comment.