Skip to content

CI: Add VS2019 build jobs - #757

Merged
jrosdahl merged 1 commit into
ccache:masterfrom
nickhutchinson:win-ci
Jan 6, 2021
Merged

jrosdahl merged 1 commit into
ccache:masterfrom
nickhutchinson:win-ci

Conversation

@nickhutchinson

Copy link
Copy Markdown
Contributor

Add VS2019 build jobs that use clang for the test suite. There are many test failures on Windows, but these are ignored for now.

Tweak CMake build scripts:

  • Fix CI build type handling for MSVC (recognise /NDEBUG and not just -DNDEBUG)
  • Fix incorrect warnings-as-errors flag for MSVC
  • Suppress an additional conversion warning on MSVC

@nickhutchinson nickhutchinson changed the title CI: Add MSVC2019 build jobs CI: Add VS2019 build jobs Dec 28, 2020
Comment on lines +315 to +303
# The test suite currently requires that the compiler specified by the "CC"
# env variable is on a path without spaces. Provide that by creating a
# junction from ~/opt/llvm to the Visual Studio path.

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that'll be tricky unfortunately -- there seem to be loads of implicit assumptions in the test/suites/*.bash tests that all tools are in paths without spaces. Ccache itself seems to cope okay, with the exception of environment variables like CCACHE_COMPILERCHECK where you can't reference tools with spaces

Comment thread .github/workflows/build.yaml Outdated
Comment on lines +295 to +304
# Determine VS2019 install path
$vsInstallPath = (Get-VSSetupInstance | `
Select-VSSetupInstance -Product '*' -Latest -Version '[16.0,17.0)' `
).InstallationPath

$vcvarsall = "${vsInstallPath}\VC\Auxiliary\Build\vcvarsall.bat"
if (-not (Test-Path -Path $vcvarsall)) {
Out-Error "Could not find Visual Studio setup script"
exit 1
}

This comment was marked as outdated.

Comment thread .github/workflows/build.yaml Outdated
Comment on lines +308 to +313
cmd /c "`"${vcvarsall}`" ${{ matrix.config.msvc_arch }} & set" | foreach {
if ($_ -match '^\w+=') {
$k, $v = $_.split('=', 2)
Set-Item -Force -Path "env:\${k}" -Value $v
}
}

This comment was marked as outdated.

Comment thread .github/workflows/build.yaml Outdated
[System.IO.File]::AppendAllLines(
$env:GITHUB_ENV,
[string[]]$msvcEnv,
$Utf8NoBomEncoding)

@AlexanderLanin AlexanderLanin Dec 28, 2020 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have a look at the action and see how much of this can be replaced by it. Only disadvantage I can see is that it doesn't let you pick with Visual Studio major version to use, but it looks like the current GitHub runner only has 2019 installed so that's not really an issue.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks a lot simpler now. I love the action marketplace 👍

@nickhutchinson
nickhutchinson force-pushed the win-ci branch 2 times, most recently from caffbc4 to cc9e970 Compare December 28, 2020 20:39
Add VS2019 build jobs that use clang for the test suite. There are many
test failures on Windows, but these are ignored for now.

Tweak CMake build scripts:
- Fix CI build type handling for MSVC (recognise `/NDEBUG` and not just
  `-DNDEBUG`)
- Fix incorrect warnings-as-errors flag for MSVC
- Suppress an additional conversion warning on MSVC
@jrosdahl jrosdahl added area: build Affects building of Ccache itself issue: improvement Enhancements that improve performance, usability or code quality, not a new feature os: windows Related to building or running on Windows area: ci Affects continuous integration and removed area: build Affects building of Ccache itself labels Jan 6, 2021
@jrosdahl jrosdahl added this to the 4.2 milestone Jan 6, 2021
@jrosdahl
jrosdahl merged commit 69bb827 into ccache:master Jan 6, 2021
@jrosdahl

jrosdahl commented Jan 6, 2021

Copy link
Copy Markdown
Member

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci Affects continuous integration issue: improvement Enhancements that improve performance, usability or code quality, not a new feature os: windows Related to building or running on Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants