@@ -33,30 +33,30 @@ jobs:
3333 ubuntu-pwsh :
3434 name : Ubuntu PowerShell
3535 runs-on : ubuntu-latest
36- strategy :
37- matrix :
38- webroot :
39- - ' .'
40- - " ./webroot"
41- - " webroot"
42- - ${{ github.workspace }}/webroot
43- - ' "./webroot"'
44- - ' "${{ github.workspace }}/webroot"'
45- execute :
46- - " index.cfm"
47- - " test.cfm"
48- - " sub/test.cfm"
4936 steps :
5037 - uses : actions/checkout@v4
5138 - name : Set up Java
5239 uses : actions/setup-java@v4
5340 with :
5441 distribution : ' temurin'
5542 java-version : ' 21'
56- - name : Run Ant webroot test
43+ - name : Run all webroot/execute combinations
5744 shell : pwsh
5845 run : |
59- ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
46+ $webroots = @('.', './webroot', 'webroot', "${{ github.workspace }}/webroot", '"./webroot"', '"${{ github.workspace }}/webroot"')
47+ $executes = @('index.cfm', 'test.cfm', 'sub/test.cfm')
48+ foreach ($w in $webroots) {
49+ foreach ($e in $executes) {
50+ Write-Host "Testing webroot=$w execute=$e"
51+ $result = ant -buildfile build.xml -Dwebroot=$w -Dexecute="$e" -DuniqueWorkingDir=true 2>&1
52+ if ($LASTEXITCODE -ne 0) {
53+ $cmd = "ant -buildfile build.xml -Dwebroot=$w -Dexecute=\"$e\" -DuniqueWorkingDir=true"
54+ $platform = "ubuntu-latest"
55+ $shell = "pwsh"
56+ "## Platform: $platform | Shell: $shell`n### $cmd`nFAILED: $w / $e`n$result`n" | Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY
57+ }
58+ }
59+ }
6060 working-directory : ${{ github.workspace }}
6161 - name : Check output
6262 shell : pwsh
@@ -67,30 +67,30 @@ jobs:
6767 macos-bash :
6868 name : MacOS Bash
6969 runs-on : macos-latest
70- strategy :
71- matrix :
72- webroot :
73- - ' .'
74- - " ./webroot"
75- - " webroot"
76- - ${{ github.workspace }}/webroot
77- - ' "./webroot"'
78- - ' "${{ github.workspace }}/webroot"'
79- execute :
80- - " index.cfm"
81- - " test.cfm"
82- - " sub/test.cfm"
8370 steps :
8471 - uses : actions/checkout@v4
8572 - name : Set up Java
8673 uses : actions/setup-java@v4
8774 with :
8875 distribution : ' temurin'
8976 java-version : ' 21'
90- - name : Run Ant webroot test
77+ - name : Run all webroot/execute combinations
9178 shell : bash
9279 run : |
93- ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
80+ webroots=( '.' './webroot' 'webroot' "${{ github.workspace }}/webroot" '"./webroot"' '"${{ github.workspace }}/webroot"' )
81+ executes=( 'index.cfm' 'test.cfm' 'sub/test.cfm' )
82+ for w in "${webroots[@]}"; do
83+ for e in "${executes[@]}"; do
84+ echo "Testing webroot=$w execute=$e"
85+ result=$(ant -buildfile build.xml -Dwebroot=$w -Dexecute="$e" -DuniqueWorkingDir=true 2>&1)
86+ if [ $? -ne 0 ]; then
87+ cmd="ant -buildfile build.xml -Dwebroot=$w -Dexecute=\"$e\" -DuniqueWorkingDir=true"
88+ platform="macos-latest"
89+ shell="bash"
90+ echo -e "## Platform: $platform | Shell: $shell\n### $cmd\nFAILED: $w / $e\n$result\n" >> "$GITHUB_STEP_SUMMARY"
91+ fi
92+ done
93+ done
9494 working-directory : ${{ github.workspace }}
9595 - name : Check output
9696 shell : bash
@@ -101,30 +101,30 @@ jobs:
101101 macos-pwsh :
102102 name : MacOS PowerShell
103103 runs-on : macos-latest
104- strategy :
105- matrix :
106- webroot :
107- - ' .'
108- - " ./webroot"
109- - " webroot"
110- - ${{ github.workspace }}/webroot
111- - ' "./webroot"'
112- - ' "${{ github.workspace }}/webroot"'
113- execute :
114- - " index.cfm"
115- - " test.cfm"
116- - " sub/test.cfm"
117104 steps :
118105 - uses : actions/checkout@v4
119106 - name : Set up Java
120107 uses : actions/setup-java@v4
121108 with :
122109 distribution : ' temurin'
123110 java-version : ' 21'
124- - name : Run Ant webroot test
111+ - name : Run all webroot/execute combinations
125112 shell : pwsh
126113 run : |
127- ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
114+ $webroots = @('.', './webroot', 'webroot', "${{ github.workspace }}/webroot", '"./webroot"', '"${{ github.workspace }}/webroot"')
115+ $executes = @('index.cfm', 'test.cfm', 'sub/test.cfm')
116+ foreach ($w in $webroots) {
117+ foreach ($e in $executes) {
118+ Write-Host "Testing webroot=$w execute=$e"
119+ $result = ant -buildfile build.xml -Dwebroot=$w -Dexecute="$e" -DuniqueWorkingDir=true 2>&1
120+ if ($LASTEXITCODE -ne 0) {
121+ $cmd = "ant -buildfile build.xml -Dwebroot=$w -Dexecute=\"$e\" -DuniqueWorkingDir=true"
122+ $platform = "macos-latest"
123+ $shell = "pwsh"
124+ "## Platform: $platform | Shell: $shell`n### $cmd`nFAILED: $w / $e`n$result`n" | Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY
125+ }
126+ }
127+ }
128128 working-directory : ${{ github.workspace }}
129129 - name : Check output
130130 shell : pwsh
@@ -135,30 +135,32 @@ jobs:
135135 windows-cmd :
136136 name : Windows CMD
137137 runs-on : windows-latest
138- strategy :
139- matrix :
140- webroot :
141- - ' .'
142- - " ./webroot"
143- - " webroot"
144- - ${{ github.workspace }}\webroot
145- - ' "./webroot"'
146- - ' "${{ github.workspace }}\\webroot"'
147- execute :
148- - " index.cfm"
149- - " test.cfm"
150- - " sub/test.cfm"
151138 steps :
152139 - uses : actions/checkout@v4
153140 - name : Set up Java
154141 uses : actions/setup-java@v4
155142 with :
156143 distribution : ' temurin'
157144 java-version : ' 21'
158- - name : Run Ant webroot test
145+ - name : Run all webroot/execute combinations
159146 shell : cmd
160147 run : |
161- ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
148+ set webroots=.,./webroot,webroot,"${{ github.workspace }}\webroot","./webroot","${{ github.workspace }}\\webroot"
149+ set executes=index.cfm,test.cfm,sub/test.cfm
150+ for %w in (%webroots%) do (
151+ for %e in (%executes%) do (
152+ echo Testing webroot=%w execute=%e
153+ ant -buildfile build.xml -Dwebroot=%w -Dexecute=%e -DuniqueWorkingDir=true > result.txt 2>&1
154+ if errorlevel 1 (
155+ set cmd=ant -buildfile build.xml -Dwebroot=%w -Dexecute="%e" -DuniqueWorkingDir=true
156+ echo ## Platform: windows-latest ^| Shell: cmd>> %GITHUB_STEP_SUMMARY%
157+ echo ### %cmd%>> %GITHUB_STEP_SUMMARY%
158+ echo FAILED: %w / %e:>> %GITHUB_STEP_SUMMARY%
159+ type result.txt >> %GITHUB_STEP_SUMMARY%
160+ echo.>> %GITHUB_STEP_SUMMARY%
161+ )
162+ )
163+ )
162164 working-directory : ${{ github.workspace }}
163165 - name : Check output
164166 shell : cmd
@@ -169,30 +171,30 @@ jobs:
169171 windows-pwsh :
170172 name : Windows PowerShell
171173 runs-on : windows-latest
172- strategy :
173- matrix :
174- webroot :
175- - ' .'
176- - " ./webroot"
177- - " webroot"
178- - ${{ github.workspace }}\webroot
179- - ' "./webroot"'
180- - ' "${{ github.workspace }}\\webroot"'
181- execute :
182- - " index.cfm"
183- - " test.cfm"
184- - " sub/test.cfm"
185174 steps :
186175 - uses : actions/checkout@v4
187176 - name : Set up Java
188177 uses : actions/setup-java@v4
189178 with :
190179 distribution : ' temurin'
191180 java-version : ' 21'
192- - name : Run Ant webroot test
181+ - name : Run all webroot/execute combinations
193182 shell : pwsh
194183 run : |
195- ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
184+ $webroots = @('.', './webroot', 'webroot', "${{ github.workspace }}\webroot", '"./webroot"', '"${{ github.workspace }}\\webroot"')
185+ $executes = @('index.cfm', 'test.cfm', 'sub/test.cfm')
186+ foreach ($w in $webroots) {
187+ foreach ($e in $executes) {
188+ Write-Host "Testing webroot=$w execute=$e"
189+ $result = ant -buildfile build.xml -Dwebroot=$w -Dexecute="$e" -DuniqueWorkingDir=true 2>&1
190+ if ($LASTEXITCODE -ne 0) {
191+ $cmd = "ant -buildfile build.xml -Dwebroot=$w -Dexecute=\"$e\" -DuniqueWorkingDir=true"
192+ $platform = "windows-latest"
193+ $shell = "pwsh"
194+ "## Platform: $platform | Shell: $shell`n### $cmd`nFAILED: $w / $e`n$result`n" | Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY
195+ }
196+ }
197+ }
196198 working-directory : ${{ github.workspace }}
197199 - name : Check output
198200 shell : pwsh
@@ -203,30 +205,30 @@ jobs:
203205 windows-bash :
204206 name : Windows Bash
205207 runs-on : windows-latest
206- strategy :
207- matrix :
208- webroot :
209- - ' .'
210- - " ./webroot"
211- - " webroot"
212- - ${{ github.workspace }}/webroot
213- - ' "./webroot"'
214- - ' "${{ github.workspace }}/webroot"'
215- execute :
216- - " index.cfm"
217- - " test.cfm"
218- - " sub/test.cfm"
219208 steps :
220209 - uses : actions/checkout@v4
221210 - name : Set up Java
222211 uses : actions/setup-java@v4
223212 with :
224213 distribution : ' temurin'
225214 java-version : ' 21'
226- - name : Run Ant webroot test
215+ - name : Run all webroot/execute combinations
227216 shell : bash
228217 run : |
229- ant -buildfile build.xml -Dwebroot=${{ matrix.webroot }} -Dexecute="${{ matrix.execute }}" -DuniqueWorkingDir=true
218+ webroots=( '.' './webroot' 'webroot' "${{ github.workspace }}/webroot" '"./webroot"' '"${{ github.workspace }}/webroot"' )
219+ executes=( 'index.cfm' 'test.cfm' 'sub/test.cfm' )
220+ for w in "${webroots[@]}"; do
221+ for e in "${executes[@]}"; do
222+ echo "Testing webroot=$w execute=$e"
223+ result=$(ant -buildfile build.xml -Dwebroot=$w -Dexecute="$e" -DuniqueWorkingDir=true 2>&1)
224+ if [ $? -ne 0 ]; then
225+ cmd="ant -buildfile build.xml -Dwebroot=$w -Dexecute=\"$e\" -DuniqueWorkingDir=true"
226+ platform="windows-latest"
227+ shell="bash"
228+ echo -e "## Platform: $platform | Shell: $shell\n### $cmd\nFAILED: $w / $e\n$result\n" >> "$GITHUB_STEP_SUMMARY"
229+ fi
230+ done
231+ done
230232 working-directory : ${{ github.workspace }}
231233 - name : Check output
232234 shell : bash
0 commit comments