Skip to content

Commit

Permalink
Bump Windows SDK to 10.0.18362.0 with conforming preprocessor support (
Browse files Browse the repository at this point in the history
  • Loading branch information
themarpe committed Dec 19, 2021
1 parent b4b366e commit eff3262
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/main.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ on:
- gen2
- gen2_develop

env:
CMAKE_WINDOWS_SDK_VERSION: '10.0.18362.0'

jobs:

Expand Down Expand Up @@ -57,7 +59,7 @@ jobs:
run: cmake . -Bbuild -DDEPTHAI_CLANG_TIDY=ON -DCLANG_TIDY_BIN=clang-tidy-10

- name: Run clang-tidy
run: cmake --build build --parallel 8
run: cmake --build build --parallel 4


build:
Expand Down Expand Up @@ -108,18 +110,19 @@ jobs:
choco install opencv
echo "OpenCV_DIR=C:\tools\opencv\build" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "C:\tools\opencv\build\x64\vc15\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "CMAKE_ARGS=-D'CMAKE_SYSTEM_VERSION=${{ env.CMAKE_WINDOWS_SDK_VERSION }}'" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Build (old CMake, gcc/Clang)
if: matrix.cmake == '3.10.x' && matrix.os != 'windows-latest'
run: |
cmake -H. -Bbuild -D'DEPTHAI_BUILD_EXAMPLES=ON' -D'DEPTHAI_BUILD_TESTS=ON'
cmake --build build -- -j8
cmake -H. -Bbuild -D'DEPTHAI_BUILD_EXAMPLES=ON' -D'DEPTHAI_BUILD_TESTS=ON' ${{ env.CMAKE_ARGS }}
cmake --build build -- -j4
- name: Build (newest CMake)
if: matrix.cmake != '3.10.x'
run: |
cmake -S . -B build -D DEPTHAI_BUILD_EXAMPLES=ON -D DEPTHAI_BUILD_TESTS=ON
cmake --build build --parallel 8
cmake -S . -B build -D DEPTHAI_BUILD_EXAMPLES=ON -D DEPTHAI_BUILD_TESTS=ON ${{ env.CMAKE_ARGS }}
cmake --build build --parallel 4
integration:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -174,25 +177,26 @@ jobs:
choco install opencv
echo "OpenCV_DIR=C:\tools\opencv\build" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "C:\tools\opencv\build\x64\vc15\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "CMAKE_ARGS=-D'CMAKE_SYSTEM_VERSION=${{ env.CMAKE_WINDOWS_SDK_VERSION }}'" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Configure ${{ matrix.build-type }}, ${{ matrix.shared }}, ${{ matrix.platform }}
if: matrix.shared == 'Shared' && matrix.os == 'windows-latest'
run: cmake -A ${{ matrix.platform }} -S . -B build -D BUILD_SHARED_LIBS=ON -D CMAKE_BUILD_TYPE=${{ matrix.build-type }} -D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/depthai_install
run: cmake -A ${{ matrix.platform }} -S . -B build -D BUILD_SHARED_LIBS=ON -D CMAKE_BUILD_TYPE=${{ matrix.build-type }} -D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/depthai_install ${{ env.CMAKE_ARGS }}

- name: Configure ${{ matrix.build-type }}, ${{ matrix.shared }}
if: matrix.shared == 'Shared' && matrix.os != 'windows-latest'
run: cmake -S . -B build -D BUILD_SHARED_LIBS=ON -D CMAKE_BUILD_TYPE=${{ matrix.build-type }} -D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/depthai_install
run: cmake -S . -B build -D BUILD_SHARED_LIBS=ON -D CMAKE_BUILD_TYPE=${{ matrix.build-type }} -D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/depthai_install ${{ env.CMAKE_ARGS }}

- name: Configure ${{ matrix.build-type }}, ${{ matrix.shared }}
if: matrix.shared == 'Static'
run: cmake -S . -B build -D BUILD_SHARED_LIBS=OFF -D CMAKE_BUILD_TYPE=${{ matrix.build-type }} -D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/depthai_install
run: cmake -S . -B build -D BUILD_SHARED_LIBS=OFF -D CMAKE_BUILD_TYPE=${{ matrix.build-type }} -D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/depthai_install ${{ env.CMAKE_ARGS }}

- name: Set path to shared library dll (Windows)
if: matrix.os == 'windows-latest'
run: echo "$GITHUB_WORKSPACE/depthai_install/bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Build and install
run: cmake --build build --config ${{ matrix.build-type }} --target install --parallel 8
run: cmake --build build --config ${{ matrix.build-type }} --target install --parallel 4

- name: Upload Win64 shared library
if: matrix.os == 'windows-latest' && matrix.shared == 'Shared' && matrix.platform == 'x64'
Expand All @@ -210,22 +214,22 @@ jobs:

- name: Build and test add_subdirectory
run: |
cmake -S tests/integration/ -B tests/integration/build_add_subdirectory -D TEST_FIND_PACKAGE=OFF
cmake --build tests/integration/build_add_subdirectory --config ${{ matrix.build-type }} --parallel 8
cmake -S tests/integration/ -B tests/integration/build_add_subdirectory -D TEST_FIND_PACKAGE=OFF ${{ env.CMAKE_ARGS }}
cmake --build tests/integration/build_add_subdirectory --config ${{ matrix.build-type }} --parallel 4
cd tests/integration/build_add_subdirectory
ctest -C ${{ matrix.build-type }}
- name: Build and test find_package (installed)
run: |
cmake -S tests/integration/ -B tests/integration/build_find_package -D TEST_FIND_PACKAGE=ON -D depthai_DIR=$GITHUB_WORKSPACE/depthai_install/lib/cmake/depthai
cmake --build tests/integration/build_find_package --config ${{ matrix.build-type }} --parallel 8
cmake -S tests/integration/ -B tests/integration/build_find_package -D TEST_FIND_PACKAGE=ON -D depthai_DIR=$GITHUB_WORKSPACE/depthai_install/lib/cmake/depthai ${{ env.CMAKE_ARGS }}
cmake --build tests/integration/build_find_package --config ${{ matrix.build-type }} --parallel 4
cd tests/integration/build_find_package
ctest -C ${{ matrix.build-type }}
- name: Build and test find_package (build directory)
run: |
cmake -S tests/integration/ -B tests/integration/build_find_package_2 -D TEST_FIND_PACKAGE=ON -D depthai_DIR=$GITHUB_WORKSPACE/build
cmake --build tests/integration/build_find_package_2 --config ${{ matrix.build-type }} --parallel 8
cmake -S tests/integration/ -B tests/integration/build_find_package_2 -D TEST_FIND_PACKAGE=ON -D depthai_DIR=$GITHUB_WORKSPACE/build ${{ env.CMAKE_ARGS }}
cmake --build tests/integration/build_find_package_2 --config ${{ matrix.build-type }} --parallel 4
cd tests/integration/build_find_package_2
ctest -C ${{ matrix.build-type }}
Expand Down

0 comments on commit eff3262

Please sign in to comment.