1616 strategy :
1717 fail-fast : false
1818 matrix :
19- os : [windows-2019, windows-2022]
2019 BuildType : [Debug, Release, BinDist]
2120
22- runs-on : ${{ matrix.os }}
21+ runs-on : ' windows-2022 '
2322
2423 steps :
2524 - name : ' Checkout Code'
@@ -34,17 +33,12 @@ jobs:
3433 - name : ' Download nCine-libraries and project data'
3534 run : |
3635 $env:GIT_REDIRECT_STDERR = '2>&1'
37- $env:vsversion = switch ("${{ matrix.os }}")
38- {
39- "windows-2022" {"vs2022"}
40- "windows-2019" {"vs2019"}
41- }
4236
4337 cd ..
4438 git clone https://github.com/nCine/nCine-libraries-artifacts.git
4539 cd nCine-libraries-artifacts
4640
47- $env:LIBRARIES_BRANCH = $env:LIBRARIES_BRANCH -creplace "OS","windows" -creplace "COMPILER",$env:vsversion
41+ $env:LIBRARIES_BRANCH = $env:LIBRARIES_BRANCH -creplace "OS","windows" -creplace "COMPILER","vs2022"
4842 git checkout $env:LIBRARIES_BRANCH
4943 $env:LIBRARIES_FILE = Get-ChildItem -Path $(pwd) -Name -File | Select-Object -First 1
5044 7z x $env:LIBRARIES_FILE
@@ -67,46 +61,34 @@ jobs:
6761
6862 - name : ' CMake Configuration and Make of nCine as a static library'
6963 run : |
70- $env:generator = switch ("${{ matrix.os }}")
71- {
72- "windows-2022" {"Visual Studio 17 2022"}
73- "windows-2019" {"Visual Studio 16 2019"}
74- }
75-
7664 cd ../nCine
7765 if ("${{ matrix.BuildType }}" -eq "BinDist")
7866 { $nCineBuildType = "Release" }
7967 else
8068 { $nCineBuildType = "${{ matrix.BuildType }}" }
8169
82- cmake -G "$env:generator " -A x64 -B ../nCine-build-$nCineBuildType -D CMAKE_BUILD_TYPE=$nCineBuildType -D NCINE_DYNAMIC_LIBRARY=OFF -D IMGUI_VERSION_TAG=docking -D NCINE_PREFERRED_BACKEND=SDL2 -D NCINE_WITH_THREADS=OFF -D NCINE_WITH_WEBP=OFF -D NCINE_WITH_AUDIO=OFF -D NCINE_WITH_SCRIPTING_API=OFF -D NCINE_BUILD_TESTS=OFF
70+ cmake -G "Visual Studio 17 2022 " -A x64 -B ../nCine-build-$nCineBuildType -D CMAKE_BUILD_TYPE=$nCineBuildType -D NCINE_DYNAMIC_LIBRARY=OFF -D IMGUI_VERSION_TAG=v1.91.9b- docking -D NCINE_PREFERRED_BACKEND=SDL2 -D NCINE_WITH_THREADS=OFF -D NCINE_WITH_WEBP=OFF -D NCINE_WITH_AUDIO=OFF -D NCINE_WITH_SCRIPTING_API=OFF -D NCINE_BUILD_TESTS=OFF
8371
8472 cd ..
85- cmake --build nCine-build-$nCineBuildType --config $nCineBuildType
73+ cmake --build nCine-build-$nCineBuildType --config $nCineBuildType -j $env:NUMBER_OF_PROCESSORS
8674
8775 - name : ' CMake Configuration'
8876 run : |
8977 $env:project_name = Split-Path -Path "$env:GITHUB_REPOSITORY" -leaf
9078
91- $env:generator = switch ("${{ matrix.os }}")
92- {
93- "windows-2022" {"Visual Studio 17 2022"}
94- "windows-2019" {"Visual Studio 16 2019"}
95- }
96-
9779 if ("${{ matrix.BuildType }}" -eq "BinDist")
98- { cmake -G "$env:generator " -A x64 -B ../$env:project_name-build-${{ matrix.BuildType }} -D NCPROJECT_OPTIONS_PRESETS=${{ matrix.BuildType }} -D nCine_DIR=$(pwd)/../nCine-build-Release }
80+ { cmake -G "Visual Studio 17 2022 " -A x64 -B ../$env:project_name-build-${{ matrix.BuildType }} -D NCPROJECT_OPTIONS_PRESETS=${{ matrix.BuildType }} -D nCine_DIR=$(pwd)/../nCine-build-Release }
9981 else
100- { cmake -G "$env:generator " -A x64 -B ../$env:project_name-build-${{ matrix.BuildType }} -D nCine_DIR=$(pwd)/../nCine-build-${{ matrix.BuildType }} }
82+ { cmake -G "Visual Studio 17 2022 " -A x64 -B ../$env:project_name-build-${{ matrix.BuildType }} -D nCine_DIR=$(pwd)/../nCine-build-${{ matrix.BuildType }} }
10183
10284 - name : ' CMake Build'
10385 run : |
10486 $env:project_name = Split-Path -Path "$env:GITHUB_REPOSITORY" -leaf
10587
10688 if ("${{ matrix.BuildType }}" -eq "BinDist")
107- { cmake --build ../$env:project_name-build-${{ matrix.BuildType }} --config Release }
89+ { cmake --build ../$env:project_name-build-${{ matrix.BuildType }} --config Release -j $env:NUMBER_OF_PROCESSORS }
10890 else
109- { cmake --build ../$env:project_name-build-${{ matrix.BuildType }} --config ${{ matrix.BuildType }} }
91+ { cmake --build ../$env:project_name-build-${{ matrix.BuildType }} --config ${{ matrix.BuildType }} -j $env:NUMBER_OF_PROCESSORS }
11092
11193 - name : ' Package'
11294 if : matrix.BuildType == 'BinDist'
@@ -128,15 +110,9 @@ jobs:
128110 $env:DEPLOY_MESSAGE = $env:DEPLOY_MESSAGE -creplace "PROJECT_NAME",$env:project_name
129111 $env:DEPLOY_MESSAGE = $env:DEPLOY_MESSAGE -creplace "BRANCH_NAME",$env:branch_name
130112
131- $env:vsversion = switch ("${{ matrix.os }}")
132- {
133- "windows-2022" {"vs2022"}
134- "windows-2019" {"vs2019"}
135- }
136-
137113 $env:DEPLOY_BRANCH = $env:DEPLOY_BRANCH -creplace "PROJECT_NAME",$env:project_name
138114 $env:DEPLOY_BRANCH = $env:DEPLOY_BRANCH -creplace "BRANCH_NAME",$env:branch_name
139- $env:DEPLOY_BRANCH = $env:DEPLOY_BRANCH -creplace "OS","windows" -creplace "COMPILER",$env:vsversion
115+ $env:DEPLOY_BRANCH = $env:DEPLOY_BRANCH -creplace "OS","windows" -creplace "COMPILER","vs2022"
140116
141117 Write-Output $env:project_name
142118 Write-Output $env:branch_name
0 commit comments