Skip to content

Refactor comment and script execute flags #597

Refactor comment and script execute flags

Refactor comment and script execute flags #597

Workflow file for this run

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: clone and build procyon devel we depeond on Linux
if: matrix.os == 'ubuntu-latest'
run: |
set -x
git clone https://github.com/mstrobel/procyon.git
cd procyon
git checkout develop
sed "s/6.9/7.3/g" -i gradle/wrapper/gradle-wrapper.properties
sed "s/.*<tt>.*//g" -i Procyon.Reflection/src/main/java/com/strobel/reflection/emit/CodeStream.java
./gradlew install
shell: bash
- name: clone and build procyon devel we depeond on Windows
if: matrix.os == 'windows-latest'
run: |
@echo on
git clone https://github.com/mstrobel/procyon.git
cd procyon
git checkout develop
./gradlew.bat install
shell: cmd
- 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"