diff --git a/.github/workflows/visionos-cpu.yml b/.github/workflows/visionos-cpu.yml new file mode 100644 index 000000000000..0a563a1aaf35 --- /dev/null +++ b/.github/workflows/visionos-cpu.yml @@ -0,0 +1,70 @@ +name: visionos-cpu +on: + push: + branches: [master] + paths: + - '.github/workflows/visionos-cpu.yml' + - 'toolchains/ios.toolchain.cmake' + - 'CMakeLists.txt' + - 'cmake/**' + - 'src/*' + - 'src/layer/*' + - 'src/layer/arm/**' + pull_request: + branches: [master] + paths: + - '.github/workflows/visionos-cpu.yml' + - 'toolchains/ios.toolchain.cmake' + - 'CMakeLists.txt' + - 'cmake/**' + - 'src/*' + - 'src/layer/*' + - 'src/layer/arm/**' +concurrency: + group: visionos-cpu-${{ github.ref }} + cancel-in-progress: true +env: + DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer + VISIONOS_DEPLOYMENT_TARGET: '1.0' + ENABLE_BITCODE: OFF + ENABLE_ARC: OFF + ENABLE_VISIBILITY: OFF +permissions: + contents: read + +jobs: + visionos: + runs-on: macos-12 + steps: + - uses: actions/checkout@v4 + + - name: build-arm64 + run: | + mkdir build-arm64 && cd build-arm64 + cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/ios.toolchain.cmake -DPLATFORM=VISIONOS -DARCHS="arm64" \ + -DDEPLOYMENT_TARGET=$VISIONOS_DEPLOYMENT_TARGET -DENABLE_BITCODE=$ENABLE_BITCODE -DENABLE_ARC=$ENABLE_ARC -DENABLE_VISIBILITY=$ENABLE_VISIBILITY \ + -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install \ + .. + cmake --build . -j 3 + + visionos-simulator: + runs-on: macos-12 + steps: + - uses: actions/checkout@v4 + + - name: build-x86_64 + run: | + mkdir build-x86_64 && cd build-x86_64 + cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/ios.toolchain.cmake -DPLATFORM=SIMULATOR_VISIONOS -DARCHS="x86_64" \ + -DDEPLOYMENT_TARGET=$VISIONOS_DEPLOYMENT_TARGET -DENABLE_BITCODE=$ENABLE_BITCODE -DENABLE_ARC=$ENABLE_ARC -DENABLE_VISIBILITY=$ENABLE_VISIBILITY \ + -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install \ + .. + cmake --build . -j 3 + - name: build-arm64 + run: | + mkdir build-arm64 && cd build-arm64 + cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/ios.toolchain.cmake -DPLATFORM=SIMULATOR_VISIONOS -DARCHS="arm64" \ + -DDEPLOYMENT_TARGET=$VISIONOS_DEPLOYMENT_TARGET -DENABLE_BITCODE=$ENABLE_BITCODE -DENABLE_ARC=$ENABLE_ARC -DENABLE_VISIBILITY=$ENABLE_VISIBILITY \ + -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install \ + .. + cmake --build . -j 3