MInor checkstyle fixes and formattings #551
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
java-version: [ 11, 17 ] | |
fail-fast: false | |
name: ${{ matrix.os }} - Java ${{ matrix.java-version }} - Maven | |
steps: | |
- name: Checkout JRD repo | |
uses: actions/checkout@v2 | |
- name: Set up JDK ${{ matrix.java-version }} | |
uses: actions/setup-java@v2 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: 'adopt' | |
cache: maven | |
- name: Build JRD with Maven | |
run: mvn --batch-mode --update-snapshots clean install | |
- name: Create and populate config file on Linux | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
set -x | |
CONFIG_HOME="$HOME/.config/java-runtime-decompiler/conf" | |
mkdir -p -v "$CONFIG_HOME" | |
AGENT_PATH=$(find "${{ github.workspace }}" -name "decompiler-agent-*.jar" | head -n 1) | |
echo "{\"AGENT_PATH\":\"${AGENT_PATH}\"}" > "$CONFIG_HOME/config.json" | |
cat "$CONFIG_HOME/config.json" | |
shell: bash | |
- name: Create and populate config file on Windows | |
if: matrix.os == 'windows-latest' | |
run: | | |
@echo on | |
setLocal EnableDelayedExpansion | |
set "CONFIG_HOME=%UserProfile%\.config\java-runtime-decompiler\conf" | |
md %CONFIG_HOME% | |
for /f "delims=" %%i in ('dir *decompiler-agent-*.jar /B /S') do set "AGENT_PATH=%%i" | |
set "AGENT_PATH=%AGENT_PATH:\=/%" | |
echo {"AGENT_PATH":"%AGENT_PATH%"} >"%CONFIG_HOME%\config.json" | |
type "%CONFIG_HOME%\config.json" | |
shell: cmd | |
- name: Test Cli | |
timeout-minutes: 10 | |
run: mvn --batch-mode test -Dtest=*CliTest -DfailIfNoTests=false "-Dsurefire.reportFormat=plain" |