add support for concurrent runs, better agent support, running a locally built jar #34
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Webroot Handling Matrix | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| macos-bash: | |
| name: MacOS Bash | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Run all webroot/execute combinations | |
| shell: bash | |
| env: | |
| LUCEE_VERSION_QUERY: 7/all/zero | |
| run: | | |
| luceeVersionQuery="${LUCEE_VERSION_QUERY:-7/all/zero}" | |
| webroots=( '.' './webroot' 'webroot' "${{ github.workspace }}/webroot" ) | |
| executes=( 'index.cfm' 'test.cfm' 'sub/test.cfm' ) | |
| for w in "${webroots[@]}"; do | |
| for e in "${executes[@]}"; do | |
| echo "Testing webroot=$w execute=$e" | |
| result=$(ant -buildfile build.xml -Dwebroot=$w -Dexecute="$e" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery="$luceeVersionQuery" 2>&1) | |
| if [ $? -ne 0 ]; then | |
| cmd="ant -buildfile build.xml -Dwebroot=$w -Dexecute=\"$e\" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=$luceeVersionQuery" | |
| platform="macos-latest" | |
| shell="bash" | |
| echo -e "## Platform: $platform | Shell: $shell\n### $cmd\n\`\`\`\nFAILED: $w / $e\n$result\n\`\`\`\n" >> "$GITHUB_STEP_SUMMARY" | |
| fi | |
| done | |
| done | |
| working-directory: ${{ github.workspace }} | |
| ubuntu-bash: | |
| name: Ubuntu Bash | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Run all webroot/execute combinations | |
| shell: bash | |
| env: | |
| LUCEE_VERSION_QUERY: 7/all/zero | |
| run: | | |
| luceeVersionQuery="${LUCEE_VERSION_QUERY:-7/all/zero}" | |
| webroots=( '.' './webroot' 'webroot' "${{ github.workspace }}/webroot" ) | |
| executes=( 'index.cfm' 'test.cfm' 'sub/test.cfm' ) | |
| for w in "${webroots[@]}"; do | |
| for e in "${executes[@]}"; do | |
| echo "Testing webroot=$w execute=$e" | |
| result=$(ant -buildfile build.xml -Dwebroot=$w -Dexecute="$e" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery="$luceeVersionQuery" 2>&1) | |
| if [ $? -ne 0 ]; then | |
| cmd="ant -buildfile build.xml -Dwebroot=$w -Dexecute=\"$e\" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=$luceeVersionQuery" | |
| platform="ubuntu-latest" | |
| shell="bash" | |
| echo -e "## Platform: $platform | Shell: $shell\n### $cmd\n\`\`\`\nFAILED: $w / $e\n$result\n\`\`\`\n" >> "$GITHUB_STEP_SUMMARY" | |
| fi | |
| done | |
| done | |
| working-directory: ${{ github.workspace }} | |
| windows-cmd: | |
| name: Windows CMD | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Run all webroot/execute combinations | |
| shell: cmd | |
| env: | |
| LUCEE_VERSION_QUERY: 7/all/zero | |
| run: | | |
| set webroots=.,./webroot,webroot,${{ github.workspace }}\webroot | |
| set executes=index.cfm,test.cfm,sub/test.cfm | |
| for %%w in (%webroots%) do ( | |
| for %%e in (%executes%) do ( | |
| echo Testing webroot=%%w execute=%%e | |
| ant -buildfile build.xml -Dwebroot=%%w -Dexecute=%%e -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=%LUCEE_VERSION_QUERY% > result.txt 2>&1 | |
| if errorlevel 1 ( | |
| set cmd=ant -buildfile build.xml -Dwebroot=%%w -Dexecute="%%e" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=%LUCEE_VERSION_QUERY% | |
| echo ## Platform: windows-latest ^| Shell: cmd>> %GITHUB_STEP_SUMMARY% | |
| echo ### %cmd%>> %GITHUB_STEP_SUMMARY% | |
| echo "```" >> %GITHUB_STEP_SUMMARY% | |
| echo FAILED: %%w / %%e:>> %GITHUB_STEP_SUMMARY% | |
| type result.txt >> %GITHUB_STEP_SUMMARY% | |
| echo "```" >> %GITHUB_STEP_SUMMARY% | |
| echo.>> %GITHUB_STEP_SUMMARY% | |
| ) | |
| ) | |
| ) | |
| working-directory: ${{ github.workspace }} | |
| windows-pwsh: | |
| name: Windows PowerShell | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Run all webroot/execute combinations | |
| shell: pwsh | |
| env: | |
| LUCEE_VERSION_QUERY: 7/all/zero | |
| run: | | |
| $webroots = @('.', './webroot', 'webroot', "${{ github.workspace }}\webroot", '"./webroot"', '"${{ github.workspace }}\\webroot"') | |
| $executes = @('index.cfm', 'test.cfm', 'sub/test.cfm') | |
| foreach ($w in $webroots) { | |
| foreach ($e in $executes) { | |
| Write-Host "Testing webroot=$w execute=$e" | |
| $luceeVersionQuery = $env:LUCEE_VERSION_QUERY | |
| $antArgs = @( | |
| '-buildfile', 'build.xml', | |
| "-Dwebroot=$w", | |
| "-Dexecute=$e", | |
| '-DpreCleanup=false', | |
| '-DpostCleanup=false', | |
| "-DluceeVersionQuery=$luceeVersionQuery" | |
| ) | |
| Write-Host "CMD: ant $($antArgs -join ' ')" | |
| $result = & ant @antArgs 2>&1 | |
| if ($LASTEXITCODE -ne 0) { | |
| $cmd = "ant -buildfile build.xml -Dwebroot=$w -Dexecute=$e -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=$luceeVersionQuery" | |
| $platform = "windows-latest" | |
| $shell = "pwsh" | |
| $summary = @() | |
| $summary += "## Platform: $platform | Shell: $shell" | |
| $summary += "### $cmd" | |
| $summary += '```' | |
| $summary += "FAILED: $w / $e" | |
| $summary += $result | |
| $summary += '```' | |
| $summary -join "`n" | Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY | |
| } | |
| } | |
| } | |
| working-directory: ${{ github.workspace }} | |
| windows-bash: | |
| name: Windows Bash | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Run all webroot/execute combinations | |
| shell: bash | |
| env: | |
| LUCEE_VERSION_QUERY: 7/all/zero | |
| run: | | |
| luceeVersionQuery="${LUCEE_VERSION_QUERY:-7/all/zero}" | |
| webroots=( '.' './webroot' 'webroot' "${{ github.workspace }}/webroot" ) | |
| executes=( 'index.cfm' 'test.cfm' 'sub/test.cfm' ) | |
| for w in "${webroots[@]}"; do | |
| for e in "${executes[@]}"; do | |
| echo "Testing webroot=$w execute=$e" | |
| result=$(ant -buildfile build.xml -Dwebroot=$w -Dexecute="$e" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery="$luceeVersionQuery" 2>&1) | |
| if [ $? -ne 0 ]; then | |
| cmd="ant -buildfile build.xml -Dwebroot=$w -Dexecute=\"$e\" -DpreCleanup=false -DpostCleanup=false -DluceeVersionQuery=$luceeVersionQuery" | |
| platform="windows-latest" | |
| shell="bash" | |
| echo -e "## Platform: $platform | Shell: $shell\n### $cmd\n\`\`\`\nFAILED: $w / $e\n$result\n\`\`\`\n" >> "$GITHUB_STEP_SUMMARY" | |
| fi | |
| done | |
| done | |
| working-directory: ${{ github.workspace }} |