Skip to content

Commit

Permalink
GitHub Action fixes (#920)
Browse files Browse the repository at this point in the history
Fix for new GHA 2024.06.10.1.0 runner image behavior which sets env.
vars to empty string, instead of not setting, when build matrix has no
corresponding value.

Workaround 2024.06.03.1.0 GHA runner image bug that continues in
2024.06.10.1.0. Mutex-related SIGSEGVs. See
actions/runner-images#10004.
  • Loading branch information
MarkCallow authored Jun 13, 2024
1 parent 29aedde commit e8a2e19
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
strategy:
matrix:
os: [ windows-latest ]
generator: [ 'Visual Studio 17 2022' ]
toolset: [v143, CLangCL]
arch: [ x64 ]
check_mkvk: [ NO ]
Expand Down Expand Up @@ -254,6 +255,14 @@ jobs:
if: matrix.check_mkvk == 'ONLY'
run: scripts/check_mkvk.ps1

# Works around issues with 2024.06.03.1.0 runner image. See
# https://github.com/actions/runner-images/issues/10004 and
# https://github.com/actions/runner-images/issues/10055
- name: Remove conflicting msvcp140.dll as workaround for runner image bugs.
shell: bash -l {0}
run: |
find "C:/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk" -name "msvcp140.dll" -exec rm {} \;
- name: Test Windows build
# Tests built for arm64 can't be run as the CI runners are all x64.
if: matrix.arch == 'x64' && matrix.options.tests == 'ON'
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ for ($i=0; $i -lt $args.length; $i++)
function Set-ConfigVariable {
param ( $VariableName, $DefaultValue )
$res = get-variable $VariableName -ValueOnly -ErrorAction 'SilentlyContinue'
if ($res -eq $null) {
if ([string]::IsNullOrEmpty($res)) {
$res = [Environment]::GetEnvironmentVariable($VariableName)
if ($res -eq $null) {
$res = $DefaultValue
Expand Down

0 comments on commit e8a2e19

Please sign in to comment.