| @@ -1,5 +1,4 @@ | |||
| name: windows | |||
| on: | |||
| push: | |||
| branches: [master] | |||
| @@ -29,11 +28,9 @@ on: | |||
| - 'tools/**' | |||
| - '!tools/pnnx/**' | |||
| - 'examples/**' | |||
| concurrency: | |||
| group: windows-${{ github.ref }} | |||
| cancel-in-progress: true | |||
| permissions: | |||
| contents: read | |||
| @@ -56,18 +53,16 @@ jobs: | |||
| env: | |||
| UseMultiToolTask: true | |||
| steps: | |||
| - uses: actions/checkout@v4 | |||
| with: | |||
| submodules: true | |||
| - name: Install VS 2017 (v141) Build Tools | |||
| if: matrix.vs-version == 'vs2017' | |||
| run: | | |||
| $vsInstallPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath | |||
| Start-Process -FilePath "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe" -ArgumentList "modify --installPath `"$vsInstallPath`" --add Microsoft.VisualStudio.Component.VC.v141.x86.x64 --quiet --norestart --nocache" -Wait | |||
| - name: Install and Setup VS 2015 (v140) Build Tools | |||
| if: matrix.vs-version == 'vs2015' | |||
| run: | | |||
| @@ -100,7 +95,6 @@ jobs: | |||
| cmake -T ${{ matrix.toolset-version }},host=x64 -A x64 -DCMAKE_INSTALL_PREFIX="$env:GITHUB_WORKSPACE\protobuf-install" -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_MSVC_STATIC_RUNTIME=OFF -DNCNN_BUILD_TESTS=ON ../cmake | |||
| cmake --build . --config Release -j 4 | |||
| cmake --build . --config Release --target install | |||
| - name: cache-swiftshader | |||
| if: matrix.vs-version != 'vs2015' && matrix.vs-version != 'vs2017' | |||
| id: cache-swiftshader | |||
| @@ -108,7 +102,6 @@ jobs: | |||
| with: | |||
| path: swiftshader-install | |||
| key: swiftshader-${{ matrix.vs-version }}-x64-install-20240622 | |||
| - name: checkout-swiftshader | |||
| if: matrix.vs-version != 'vs2015' && matrix.vs-version != 'vs2017' && steps.cache-swiftshader.outputs.cache-hit != 'true' | |||
| uses: actions/checkout@v4 | |||
| @@ -116,13 +109,11 @@ jobs: | |||
| repository: google/swiftshader | |||
| path: swiftshader | |||
| ref: de870ac7518fe2b6bb651ecc22fc36647cf7b986 | |||
| - name: checkout-swiftshader-submodules | |||
| if: matrix.vs-version != 'vs2015' && matrix.vs-version != 'vs2017' && steps.cache-swiftshader.outputs.cache-hit != 'true' | |||
| run: | | |||
| cd swiftshader | |||
| git -c submodule."third_party/git-hooks".update=none submodule update --init --recursive | |||
| - name: swiftshader | |||
| if: matrix.vs-version != 'vs2015' && matrix.vs-version != 'vs2017' && steps.cache-swiftshader.outputs.cache-hit != 'true' | |||
| run: | | |||
| @@ -138,7 +129,6 @@ jobs: | |||
| mkdir build-x64; cd build-x64 | |||
| cmake -T ${{ matrix.toolset-version }},host=x64 -A x64 -Dprotobuf_DIR="$env:GITHUB_WORKSPACE\protobuf-install\cmake" -DNCNN_VULKAN=ON -DNCNN_BUILD_TESTS=ON .. | |||
| cmake --build . --config Release -j 4 | |||
| - name: x64-test | |||
| if: matrix.vs-version != 'vs2015' && matrix.vs-version != 'vs2017' | |||
| run: | | |||