Skip to content

Commit

Permalink
Fix Windows bat file, add a CircleCI build step for it (#1608)
Browse files Browse the repository at this point in the history
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
  • Loading branch information
atoulme authored Nov 25, 2020
1 parent f41fb97 commit 006e701
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
version: 2.1
orbs:
win: circleci/windows@2.2.0

executors:
besu_executor_med: # 2cpu, 4G ram
docker:
Expand Down Expand Up @@ -99,6 +102,27 @@ jobs:
path: build/distributions
destination: distributions
when: always
testWindows:
executor: win/default
steps:
- attach_workspace:
at: ~/project
- run:
name: Unzip Windows build
no_output_timeout: 20m
command: |
cd build/distributions
unzip besu-*.zip -d besu-tmp
cd besu-tmp
mv besu-* ../besu
- run:
name: Test Besu Windows executable
no_output_timeout: 10m
command: |
build\distributions\besu\bin\besu.bat --help
build\distributions\besu\bin\besu.bat --version
unitTests:
executor: besu_executor_xl
Expand Down Expand Up @@ -234,6 +258,9 @@ workflows:
- assemble
context:
- besu-dockerhub-ro
- testWindows:
requires:
- assemble
- referenceTests:
requires:
- assemble
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ exec "$$JAVACMD" $$TRACING_AGENT /$
createScriptTask.unixScript.text = createScriptTask.unixScript.text.replace(unixRegex, unixReplacement)
// OpenTelemetry Wiring for windows scripts
def windowsRegex = $/"%JAVA_EXE%" %DEFAULT_JVM_OPTS%/$
def windowsReplacement = $/if Defined TRACING (TRACING_AGENT="-javaagent:"%APP_HOME%\agent\/$ + agentFileName + '")\r\n"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %TRACING_AGENT%'
def windowsReplacement = $/if Defined TRACING (TRACING_AGENT="-javaagent:" "%APP_HOME%\agent\/$ + agentFileName + '")\r\n"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %TRACING_AGENT%'
createScriptTask.windowsScript.text = createScriptTask.windowsScript.text.replace(windowsRegex, windowsReplacement)
// Prevent the error originating from the 8191 chars limit on Windows
Expand Down

0 comments on commit 006e701

Please sign in to comment.