Skip to content

Commit

Permalink
Appveyor: added installation of .NET SDK (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailGorobets authored Dec 7, 2023
1 parent 27837aa commit 906fc72
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
7 changes: 0 additions & 7 deletions BuildTools/Scripts/appveyor/install.bat

This file was deleted.

21 changes: 21 additions & 0 deletions BuildTools/Scripts/appveyor/install.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$DOTNET_URL = "https://dot.net/v1/dotnet-install.ps1"
$CMAKE_URL = "https://github.com/Kitware/CMake/releases/download/v3.23.3/cmake-3.23.3-windows-x86_64.zip"

# Install .NET
Invoke-WebRequest $DOTNET_URL -OutFile "dotnet-install.ps1"
./dotnet-install.ps1 -Version 6.0.100 -InstallDir "C:\Program Files\dotnet"

# Install CMake
Invoke-WebRequest $CMAKE_URL -OutFile "cmake.zip"
Expand-Archive -Path cmake.zip -DestinationPath C:\projects\deps -Force

# Configuring environment
Move-Item -Path (Get-ChildItem C:\projects\deps\cmake-* | Select-Object -ExpandProperty FullName) -Destination C:\projects\deps\cmake -Force
$env:PATH = "C:\projects\deps\cmake\bin;C:\Python37-x64;$env:PATH"

# Check dependencies
cmake --version
python --version

Write-Host "Available .NET SDK versions:"
dotnet --list-sdks
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ clone_folder: c:\projects\DiligentCore
install:
# clone submodules
- git submodule update --init --recursive
- BuildTools\Scripts\appveyor\install.bat
- ps: .\BuildTools\Scripts\appveyor\install.ps1

before_build:
- 'cd %APPVEYOR_BUILD_FOLDER%\BuildTools\FormatValidation'
Expand Down

0 comments on commit 906fc72

Please sign in to comment.