Fix windows TBB setup #19
This file contains hidden or 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: Verify Parallelization Libraries for C++ | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| linux: | |
| name: Linux Verification | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [g++, clang++] | |
| generator: [Unix Makefiles, Ninja] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake ninja-build g++ clang libtbb-dev | |
| - name: Set compiler path | |
| run: echo "CXX=${{ matrix.compiler }}" >> $GITHUB_ENV | |
| shell: bash | |
| - name: Configure CMake | |
| run: > | |
| cmake -S . -B build | |
| -G "${{ matrix.generator }}" | |
| -DCMAKE_CXX_COMPILER=${{ env.CXX }} | |
| shell: bash | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Run verification | |
| run: ./build/verify_parallel | |
| windows: | |
| name: Windows Verification | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [cl] | |
| generator: ["Visual Studio 17 2022"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: choco install cmake ninja -y | |
| - name: Install oneTBB via vcpkg | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg | |
| ./vcpkg/bootstrap-vcpkg.bat | |
| ./vcpkg/vcpkg install tbb:x64-windows | |
| echo "CMAKE_TOOLCHAIN_FILE=$PWD/vcpkg/scripts/buildsystems/vcpkg.cmake" >> $env:GITHUB_ENV | |
| shell: pwsh | |
| - name: Debug vcpkg TBB install (optional) | |
| run: | | |
| dir vcpkg/installed/x64-windows/share/tbb | |
| dir vcpkg/installed/x64-windows/lib | |
| shell: pwsh | |
| - name: Set up MSVC environment | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Configure CMake | |
| run: > | |
| cmake -S . -B build | |
| -G "${{ matrix.generator }}" | |
| -DCMAKE_CXX_COMPILER="${{ matrix.compiler }}" | |
| -DCMAKE_TOOLCHAIN_FILE="${{ env.CMAKE_TOOLCHAIN_FILE }}" | |
| shell: bash | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Run verification | |
| run: ./build/Release/verify_parallel.exe | |
| macos: | |
| name: macOS Verification | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [clang++, g++-13] | |
| generator: [Unix Makefiles, Ninja] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: brew install cmake ninja tbb | |
| - name: Install GCC | |
| if: matrix.compiler == 'g++-13' | |
| run: brew install gcc | |
| - name: Set compiler path | |
| run: echo "CXX=${{ matrix.compiler }}" >> $GITHUB_ENV | |
| shell: bash | |
| - name: Configure CMake | |
| run: > | |
| cmake -S . -B build | |
| -G "${{ matrix.generator }}" | |
| -DCMAKE_CXX_COMPILER=${{ env.CXX }} | |
| shell: bash | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Run verification | |
| run: ./build/verify_parallel |