Skip to content

Sync with 0.5.6

Sync with 0.5.6 #96

Workflow file for this run

name: Test All
on: [pull_request]
jobs:
test-all:
runs-on: ${{matrix.OS}}
strategy:
fail-fast: false
matrix:
OS: [ubuntu-22.04, windows-2022]
# Test using the same Scala 3 as used to publish ScalaNative artifacts
scala: [2.12.18, 2.13.12, 3.1.3]
steps:
- uses: actions/checkout@v3
- uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1
with:
jvm: adopt:8
- name: Set env Linux
if: ${{ startsWith(matrix.OS, 'ubuntu') }}
run: |
export LLVM_BIN=$(dirname $(readlink -f /usr/bin/clang))
echo "LLVM_BIN=${LLVM_BIN}" >> $GITHUB_ENV
- name: Set env Windows
if: ${{ startsWith(matrix.OS, 'windows') }}
shell: pwsh
run: |
$retryCount = 3
$retryDelay = 5 # seconds
function InstallLLVM {
Write-Host "Attempting to install LLVM (try $($retryCount + 1 - $global:retryAttempt) of $($retryCount + 1))..."
choco install llvm --version=17.0.6 --allow-downgrade --force
}
# Attempt to install LLVM with retries
for ($global:retryAttempt = 1; $global:retryAttempt -le $retryCount; $global:retryAttempt++) {
try {
InstallLLVM
Write-Host "LLVM installation successful!"
break # Exit the loop if installation is successful
} catch {
Write-Host "Error installing LLVM: $_"
if ($global:retryAttempt -lt $retryCount) {
Write-Host "Retrying in $retryDelay seconds..."
Start-Sleep -Seconds $retryDelay
} else {
Write-Host "Maximum retry attempts reached. Exiting."
exit 1
}
}
}
echo "${env:ProgramFiles}\LLVM\bin" | Out-File -FilePath ${env:GITHUB_PATH} -Encoding utf8 -Append
echo "LLVM_BIN=${env:ProgramFiles}\LLVM\bin" >> ${env:GITHUB_OUTPUT}
- name: Test
run: >
sbt ++${{matrix.scala}}
cli/test
"cliScriptedTests/scripted ${{ startsWith(matrix.OS, 'windows') && 'integration/cli' || ''}}"
shell: bash