Update build.yml #3
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] | |
| continue-on-error: true | |
| 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: Configure CMake | |
| run: > | |
| cmake -S . -B build | |
| -G "${{ matrix.generator }}" | |
| -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Run verification | |
| run: ./build/verify_parallel | |
| continue-on-error: true | |
| windows: | |
| name: Windows Verification | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [msvc, clang++, mingw] | |
| generator: [Ninja, "Visual Studio 17 2022"] | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: choco install cmake ninja -y | |
| - name: Install MinGW | |
| if: matrix.compiler == 'mingw' | |
| run: | | |
| choco install mingw -y | |
| echo "CXX=C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/g++.exe" >> $GITHUB_ENV | |
| - name: Set up MSVC environment | |
| if: matrix.compiler == 'msvc' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Configure CMake | |
| run: > | |
| cmake -S . -B build | |
| -G "${{ matrix.generator }}" | |
| -DCMAKE_CXX_COMPILER=${{ env.CXX || (matrix.compiler == 'msvc' && 'cl') || matrix.compiler }} | |
| shell: bash | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Run verification | |
| run: ./build/Release/verify_parallel.exe | |
| continue-on-error: true | |
| macos: | |
| name: macOS Verification | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [clang++, g++-13] | |
| generator: [Unix Makefiles, Ninja] | |
| continue-on-error: true | |
| 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: Configure CMake | |
| run: > | |
| cmake -S . -B build | |
| -G "${{ matrix.generator }}" | |
| -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Run verification | |
| run: ./build/verify_parallel | |
| continue-on-error: true |