Test if workflow runs without cached environment

This commit is contained in:
2026-03-12 15:55:23 +01:00
parent 4ffb988bac
commit c7e92f7086

View File

@@ -122,27 +122,27 @@ jobs:
run: |
$envName="eos_build"
$envFile="conda_windows.yml"
$hashFile="$env:TEMP\$envName.hash"
#$hashFile="$env:TEMP\$envName.hash"
$newHash = (Get-FileHash $envFile).Hash
#$newHash = (Get-FileHash $envFile).Hash
if (!(Test-Path $hashFile)) {
$rebuild = $true
} else {
$oldHash = Get-Content $hashFile
$rebuild = $oldHash -ne $newHash
}
#if (!(Test-Path $hashFile)) {
# $rebuild = $true
#} else {
# $oldHash = Get-Content $hashFile
# $rebuild = $oldHash -ne $newHash
#}
if ($rebuild) {
Write-Host "Environment changed → rebuilding"
if (micromamba env list | Select-String $envName) {
micromamba env remove -n $envName -y 2>$null
}
#if ($rebuild) {
# Write-Host "Environment changed → rebuilding"
# if (micromamba env list | Select-String $envName) {
# micromamba env remove -n $envName -y 2>$null
# }
micromamba create -n $envName -f $envFile -y
$newHash | Out-File $hashFile
} else {
Write-Host "Environment unchanged → using cached env"
}
# $newHash | Out-File $hashFile
#} else {
# Write-Host "Environment unchanged → using cached env"
#}
- name: Build with pyinstaller
run: |
micromamba activate eos_build