Update build.yml #11
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 \ | |
| libomp-dev libtbb-dev openmpi-bin libopenmpi-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, clang++, g++] | |
| generator: [Ninja, "Visual Studio 17 2022"] | |
| exclude: | |
| - compiler: clang++ | |
| generator: "Visual Studio 17 2022" | |
| - compiler: g++ | |
| generator: "Visual Studio 17 2022" | |
| include: | |
| - compiler: clang++ | |
| generator: "MinGW Makefiles" | |
| - compiler: g++ | |
| generator: "MinGW Makefiles" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: choco install cmake ninja -y | |
| - name: Install MinGW | |
| if: matrix.compiler == 'g++' | |
| run: choco install mingw -y | |
| - name: Set up MSVC environment | |
| if: matrix.compiler == 'cl' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Configure CMake | |
| run: > | |
| cmake -S . -B build | |
| -G "${{ matrix.generator }}" | |
| -DCMAKE_CXX_COMPILER="${{ matrix.compiler }}" | |
| shell: bash | |
| - name: Build | |
| if: matrix.compiler == 'cl' | |
| run: cmake --build build --config Release | |
| - name: Run verification | |
| if: matrix.compiler == 'cl' | |
| run: ./build/Release/verify_parallel.exe | |
| - name: Build | |
| if: matrix.compiler != 'cl' | |
| run: cmake --build build | |
| - name: Run verification | |
| if: matrix.compiler != 'cl' | |
| run: ./build/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 libomp 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 |