add visionos ci #2226
Workflow file for this run
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: windows-x64-cpu | |
on: | |
push: | |
branches: [master] | |
paths: | |
- '.github/workflows/windows-x64-cpu.yml' | |
- 'CMakeLists.txt' | |
- 'cmake/**' | |
- 'src/*' | |
- 'src/layer/*' | |
- 'src/layer/x86/**' | |
- 'tests/**' | |
- 'tools/**' | |
- '!tools/pnnx/**' | |
- 'examples/**' | |
pull_request: | |
branches: [master] | |
paths: | |
- '.github/workflows/windows-x64-cpu.yml' | |
- 'CMakeLists.txt' | |
- 'cmake/**' | |
- 'src/*' | |
- 'src/layer/*' | |
- 'src/layer/x86/**' | |
- 'tests/**' | |
- 'tools/**' | |
- '!tools/pnnx/**' | |
- 'examples/**' | |
concurrency: | |
group: windows-x64-cpu-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
windows: | |
name: ${{ matrix.vs-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- vs-version: vs2015 | |
toolset-version: v140 | |
os: windows-2019 | |
- vs-version: vs2017 | |
toolset-version: v141 | |
os: windows-2019 | |
- vs-version: vs2019 | |
toolset-version: v142 | |
os: windows-2022 | |
- vs-version: vs2022 | |
toolset-version: v143 | |
os: windows-2022 | |
env: | |
UseMultiToolTask: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: cache-protobuf | |
id: cache-protobuf | |
uses: actions/cache@v4 | |
with: | |
path: "protobuf-install" | |
key: protobuf-${{ matrix.vs-version }}-x64-install-2 | |
- name: protobuf | |
if: steps.cache-protobuf.outputs.cache-hit != 'true' | |
run: | | |
Invoke-WebRequest -Uri https://github.com/protocolbuffers/protobuf/archive/v3.11.2.zip -OutFile protobuf-3.11.2.zip | |
7z x ./protobuf-3.11.2.zip | |
cd protobuf-3.11.2 | |
mkdir build-${{ matrix.vs-version }}; cd build-${{ matrix.vs-version }}; 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: build-sse2 | |
run: | | |
mkdir build-sse2; cd build-sse2 | |
cmake -T ${{ matrix.toolset-version }},host=x64 -A x64 -Dprotobuf_DIR="$env:GITHUB_WORKSPACE\protobuf-install\cmake" -DNCNN_RUNTIME_CPU=OFF -DNCNN_AVX2=OFF -DNCNN_AVX=OFF -DNCNN_AVX512=OFF -DNCNN_XOP=OFF -DNCNN_BUILD_TESTS=ON -DNCNN_DISABLE_RTTI=ON -DNCNN_DISABLE_EXCEPTION=ON .. | |
cmake --build . --config Release -j 4 | |
- name: test-sse2 | |
run: cd build-sse2; ctest -C Release --output-on-failure -j 4 | |
- name: build-shared | |
run: | | |
mkdir build-shared; cd build-shared | |
cmake -T ${{ matrix.toolset-version }},host=x64 -A x64 -Dprotobuf_DIR="$env:GITHUB_WORKSPACE\protobuf-install\cmake" -DNCNN_RUNTIME_CPU=ON -DNCNN_AVX2=ON -DNCNN_SHARED_LIB=ON .. | |
cmake --build . --config Release -j 4 | |
- name: build-avx2 | |
run: | | |
mkdir build-avx2; cd build-avx2 | |
cmake -T ${{ matrix.toolset-version }},host=x64 -A x64 -Dprotobuf_DIR="$env:GITHUB_WORKSPACE\protobuf-install\cmake" -DNCNN_RUNTIME_CPU=OFF -DNCNN_AVX2=ON -DNCNN_AVX512=OFF -DNCNN_XOP=OFF -DNCNN_AVXVNNI=OFF -DNCNN_BUILD_TESTS=ON .. | |
cmake --build . --config Release -j 4 | |
- name: test-avx2 | |
run: cd build-avx2; ctest -C Release --output-on-failure -j 4 | |
- name: build-avx | |
run: | | |
mkdir build-avx; cd build-avx | |
cmake -T ${{ matrix.toolset-version }},host=x64 -A x64 -Dprotobuf_DIR="$env:GITHUB_WORKSPACE\protobuf-install\cmake" -DNCNN_RUNTIME_CPU=OFF -DNCNN_AVX2=OFF -DNCNN_AVX512=OFF -DNCNN_XOP=OFF -DNCNN_AVX=ON -DNCNN_BUILD_TESTS=ON .. | |
cmake --build . --config Release -j 4 | |
- name: test-avx | |
run: cd build-avx; ctest -C Release --output-on-failure -j 4 |