Executing: .\gradlew build --stacktrace
Start param:
executor:
name: win/server-2019
size: “medium”
I ended up getting a message:
BUILD SUCCESSFUL but CircleCi prints “Too long with no output (exceeded 10m0s): context deadline exceeded”
config.yml:
version: 2.1
orbs:
win: circleci/windows@4.1.1
jobs:
build-exe:
executor:
name: win/server-2019
size: “medium”
steps:
- checkout
- run:
name: Download Sining Tools
command: .\.circleci\scripts\download_signing_tools.ps1
- run:
name: Unzip Sining Tools
command: Expand-Archive C:\Users\circleci\SigningTools.zip -DestinationPath C:\Users\circleci\
- run:
name: Install Sining Tools
command: .\.circleci\scripts\install_signing_tools.ps1
- run:
name: Download Java
command: .\.circleci\scripts\download_java.ps1
- run:
name: Unzip Java
command: Expand-Archive C:\Users\circleci\jdk1.8.0_202.zip -DestinationPath C:\Users\circleci\
- run:
name: Set environments
command: .\.circleci\scripts\set_environments.bat
- run:
name: Build exe
command: .\gradlew build --stacktrace
- persist_to_workspace:
root: C:\Users\circleci\project\
paths: build\distributions
workflows:
version: 2
commit:
jobs:
- build-exe:
filters:
branches:
only:
- deployment
The first place to look is going to be your gradlew.bat script as the output you have posted indicates that this is not returning back to the shell created by CircleCI.
Another possibility is - what else do you have within the run: statement/script that executes the gradlew script as this could also be causing control not to be returned to CircleCi.
If possible could you post a copy of your config.yml file using the preformatted text feature (so retaining white space detail). This may help someone spot an issue at this level. Issues with the gradlew.bat file may be harder to resolve if it is a bespoke file as it may contain detail you do not wish to share.
Hi, I have the same problem trying to build a gradle project on Windows, this is my CircleCI configuration:
version: 2.1
orbs:
win: circleci/windows@5.0
jobs:
build:
executor:
name: win/default
steps:
- checkout
- run:
name: Build
command: |
$env:WIX_PATH = "$env:CIRCLE_WORKING_DIRECTORY\wix\wix311-binaries"
Write-Host $env:WIX_PATH
cd '.\gui\Mid-Motor - Diagnostics - Desktop\'
.\gradlew :ui:packageMsi
- store_artifacts:
path: '.\gui\Mid-Motor - Diagnostics - Desktop\ui\build\compose\binaries\main\msi\'
workflows:
my-workflow:
jobs:
- build
gradlew.bat is this: gradlew.bat - Pastebin.com
Thanks,
Francesco
I’ve contacted CircleCI support and they suggested to use
shell: bash.exe
on the run step, so it’s working for me now.
Here’s a complete configuration file building a Compose Desktop application on Windows:
version: 2.1
orbs:
win: circleci/windows@5.0
jobs:
build:
executor:
name: win/default
steps:
- checkout
- run:
name: Build
shell: bash.exe
command: |
export WIX_PATH="$CIRCLE_WORKING_DIRECTORY\wix\wix311-binaries"
cd './gui/Mid-Motor - Diagnostics - Desktop/'
./gradlew :ui:packageMsi
- store_artifacts:
path: '.\gui\Mid-Motor - Diagnostics - Desktop\ui\build\compose\binaries\main\msi\'
workflows:
my-workflow:
jobs:
- build