Skip to content

Commit

Permalink
CI: hack to shorten windows paths
Browse files Browse the repository at this point in the history
 - win has a 32k char process arg limit
 - test classpath args for the junit JVM can go over this limit if
   the workspace path is too long and the process will fail to start
 - this moves the workspace close to the drive letter as workaround
  • Loading branch information
mbien committed Apr 6, 2024
1 parent cbb5eaa commit 505348d
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2417,8 +2417,31 @@ jobs:
exclude:
- os: ${{ (contains(github.event.pull_request.labels.*.name, 'PHP') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request') && 'nothing' || 'windows-latest' }}
fail-fast: false
defaults:
run:
# hack: shorten paths to stay below 32k char process arg limit of windows
# note 'a' is apparently a mount point, we shouldn't go below that
# actions don't seem to care about the workspace attribute -> we symlink just for tests
working-directory: ${{ contains(matrix.os, 'windows') && 'D:\\a\\ws' || github.workspace }}

steps:

- name: Download Build
uses: actions/download-artifact@v4
with:
name: build
path: ${{ contains(matrix.os, 'windows') && 'D:\\a\\ws' || github.workspace }}

- name: Extract
run: tar --zstd -xf build.tar.zst
working-directory: ${{ contains(matrix.os, 'windows') && 'D:\\a\\ws' || github.workspace }}

# - name: symlink short paths for windows
# if: contains(matrix.os, 'windows')
# run: mklink /d D:\\a\\ws ${{ github.workspace }}
# shell: cmd
# working-directory: ${{ github.workspace }}

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
Expand All @@ -2440,14 +2463,6 @@ jobs:
run: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
# - - -

- name: Download Build
uses: actions/download-artifact@v4
with:
name: build

- name: Extract
run: tar --zstd -xf build.tar.zst

- name: hudson.php
run: ant $OPTS -f php/hudson.php test

Expand Down

0 comments on commit 505348d

Please sign in to comment.