Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

atlbase.h missing overnight #127

Closed
sodul opened this issue May 16, 2024 · 2 comments
Closed

atlbase.h missing overnight #127

sodul opened this issue May 16, 2024 · 2 comments

Comments

@sodul
Copy link

sodul commented May 16, 2024

We have a CI pipeline that worked yesterday on a private repository that has had no commits in weeks.

As of about 16hs ago we now get:

fatal error C1083: Cannot open include file: 'atlbase.h': No such file or directory

Here is what our workflow file looks like:

name: CI
on:
  push:
    branches: [ 'main', 'releases/**' ]
  pull_request:
    branches: [ '**' ]
  workflow_dispatch:
  # Allow manual trigger for debugging the workflow.
jobs:
  CI-checks:
    runs-on: windows-2022
    steps:
      - name: Disable git autocrlf
        run: git config --global core.autocrlf false

      - uses: actions/checkout@v4

      # The msbuild version is dictated by the Windows image provided by GitHub.
      - uses: microsoft/setup-msbuild@v2
      - uses: darenm/Setup-VSTest@v1.2
      - name: Build and test with Sonar Wrapper
        shell: cmd
        run: test-all.cmd

Since there was no recent changes to our repository there must be some changes to the VisualStudio installation that made altbase.h no longer available when compiling.

@sodul
Copy link
Author

sodul commented May 16, 2024

Apparently caused by: actions/runner-images#9701

A workaround is to add this to our workflow files, but that add an extra 5-6 minutes to the runs.

    steps:
      - name: Delete components
        run: |
                Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
                $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
                $componentsToRemove= @(
                    "Microsoft.VisualStudio.Component.VC.ATL"
                )
                [string]$workloadArgs = $componentsToRemove | ForEach-Object {" --remove " +  $_}
                $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
                # should be run twice
                $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
                $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
      
      - name: Install components
        run: |
                Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
                $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
                $componentsToRemove= @(
                  "Microsoft.VisualStudio.Component.VC.v141.ATL"
                  "Microsoft.VisualStudio.Component.VC.14.29.16.11.ATL"
                )
                [string]$workloadArgs = $componentsToRemove | ForEach-Object {" --add " +  $_}
                $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
                # should be run twice
                $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
                $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden

@timheuer
Copy link
Member

Hi @sodul I'm sorry but this issue looks unrelated to this setup-msbuild action. As you noted it looks like impacted by something in actions/runner-images and I recommend you open an issue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants