Test if workflow runs without cached environment
This commit is contained in:
34
.github/workflows/release.yml
vendored
34
.github/workflows/release.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user