Skip to content

Commit

Permalink
Switch installer task to EC2
Browse files Browse the repository at this point in the history
Signed-off-by: Jason T. Greene <[email protected]>
  • Loading branch information
n1hility committed Sep 9, 2023
1 parent ab5ca5b commit 7bf9f30
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 10 additions & 4 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -383,17 +383,23 @@ alt_build_task:
win_installer_task:
name: "Verify Win Installer Build"
alias: win_installer
only_if: *no_rhel_release
only_if:
$CIRRUS_TAG == '' &&
$CIRRUS_BRANCH !=~ 'v[0-9\.]+-rhel' &&
$CIRRUS_BASE_BRANCH !=~ 'v[0-9\.]+-rhel'
depends_on:
- alt_build
windows_container:
image: cirrusci/windowsservercore:2019
ec2_instance:
image: "${WINDOWS_AMI}"
type: m5.large
region: us-east-1
platform: windows
env:
PATH: "${PATH};C:\\ProgramData\\chocolatey\\bin"
CIRRUS_SHELL: powershell
# Fake version, we are only testing the installer functions, so version doesn't matter
WIN_INST_VER: 9.9.9
CIRRUS_WORKING_DIR: "${LOCALAPPDATA}\\Temp\\cirrus-ci-build"
CIRRUS_WORKING_DIR: "${LOCALAPPDATA}\\cirrus-ci-build"
install_script: '.\contrib\cirrus\win-installer-install.ps1'
main_script: '.\contrib\cirrus\win-installer-main.ps1'

Expand Down
4 changes: 3 additions & 1 deletion contrib/cirrus/win-installer-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function retryInstall {
$pkg = @("--version", $Matches.2, $Matches.1)
}

choco install -y $pkg
choco install -y --allow-downgrade $pkg
if ($LASTEXITCODE -eq 0) {
break
}
Expand All @@ -22,4 +22,6 @@ function retryInstall {
}
}
}
# Force mingw version 11.2 since later versions are incompatible
# with CGO on some versions of golang
retryInstall wixtoolset mingw@11.2 golang archiver

0 comments on commit 7bf9f30

Please sign in to comment.