Documented lc.json file as well #797
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Builds | |
on: [push, pull_request] | |
jobs: | |
Build: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
#matrix: | |
# config: [Release] | |
# platform: [Win32, x64] | |
# Originally the build was then executed with this: | |
# msbuild SKIF.sln -p:Configuration="${{ matrix.config }}" -p:Platform="${{ matrix.platform }}" -m | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: SpecialKO/GA-setup-cpp-n20@master | |
- name: Uninstall MSVC Toolset (latest) 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" | |
"Microsoft.VisualStudio.Component.VC.ATLMFC" | |
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64" | |
"Microsoft.VisualStudio.Component.VC.CLI.Support" | |
) | |
[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 MSVC Toolset (v14.36-17.6) 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.14.36.17.6.ATL" | |
"Microsoft.VisualStudio.Component.VC.14.36.17.6.MFC" | |
"Microsoft.VisualStudio.Component.VC.14.36.17.6.x86.x64" | |
"Microsoft.VisualStudio.Component.VC.14.36.17.6.CLI.Support" | |
) | |
[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 | |
- uses: microsoft/setup-msbuild@v2 | |
with: | |
vs-version: '[17.0,18.0)' | |
- name: Restore the required Nuget packages | |
run: | | |
nuget restore SKIF.sln | |
- name: Build the codebase (64-bit) | |
run: | | |
msbuild SKIF.sln -p:Configuration="Release" -p:Platform="x64" -m | |
- name: Build the codebase (32-bit) | |
run: | | |
msbuild SKIF.sln -p:Configuration="Release" -p:Platform="Win32" -m | |
- name: Prepare environment variables for the artifact name | |
run: | | |
$Version = (Get-Item ".\Builds\SKIF*.exe").VersionInfo.ProductVersion | Select-Object -First 1 | |
If ($null -eq $Version) { $Version = "unknown" } | |
"SKIF_VERSION=$Version" | Out-File -FilePath $env:GITHUB_ENV -Encoding UTF8 -Append | |
"SHORT_SHA=$("${{ github.sha }}".SubString(0, 8))" | Out-File -FilePath $env:GITHUB_ENV -Encoding UTF8 -Append | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: SKIF_${{ env.SKIF_VERSION }}_${{ env.SHORT_SHA }} | |
path: | | |
Builds/SKIF*.exe | |
if-no-files-found: error | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: SKIF_${{ env.SKIF_VERSION }}_${{ env.SHORT_SHA }}_debug_symbols | |
path: | | |
Builds/SKIF*.pdb | |
if-no-files-found: warn |