Skip to content

Update build.yml

Update build.yml #5

Workflow file for this run

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: 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
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"]
exclude:
- compiler: clang++
generator: "Visual Studio 17 2022"
- compiler: mingw
generator: "Visual Studio 17 2022"
include:
- compiler: clang++
generator: "MinGW Makefiles"
- compiler: mingw
generator: "MinGW Makefiles"
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
- name: Set compiler path
run: |
if [ "${{ matrix.compiler }}" = "mingw" ]; then
echo "CXX=C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/g++.exe" >> $GITHUB_ENV
elif [ "${{ matrix.compiler }}"