CI: Fix Windows build running out of disk space (#284)

- Clean package temporaries during building to save disk space
- Remove msvc workaround which is no longer needed
This commit is contained in:
Exzap 2022-09-22 11:34:13 +02:00 committed by GitHub
parent 030d15900d
commit 9b76b0e2d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,35 +114,6 @@ jobs:
echo "[INFO] Experimental version ${{ inputs.experimentalversion }}"
echo "BUILD_FLAGS=${{ env.BUILD_FLAGS }} -DEXPERIMENTAL_VERSION=${{ inputs.experimentalversion }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Workaround
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.14.32.17.2.ARM"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ARM.Spectre"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ARM64"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ARM64.Spectre"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.x86.x64"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.x86.x64.Spectre"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL.Spectre"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL.ARM"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL.ARM.Spectre"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL.ARM64"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL.ARM64.Spectre"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC.Spectre"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC.ARM"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC.ARM.Spectre"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC.ARM64"
"Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC.ARM64.Spectre"
)
[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: Configure MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
@ -174,7 +145,7 @@ jobs:
cd build
echo "[INFO] BUILD_FLAGS: ${{ env.BUILD_FLAGS }}"
echo "[INFO] BUILD_MODE: ${{ env.BUILD_MODE }}"
cmake .. ${{ env.BUILD_FLAGS }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_MODE }}
cmake .. ${{ env.BUILD_FLAGS }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_MODE }} -DVCPKG_INSTALL_OPTIONS="--clean-after-build"
- name: "Build Cemu"
run: |