From b16fcebcbaff2ceb1eef6458d7cba46de3c443e8 Mon Sep 17 00:00:00 2001 From: Christian Heimlich Date: Sun, 1 Sep 2024 21:23:31 -0400 Subject: [PATCH] Ensure OpenMP is available --- .github/workflows/build-project.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build-project.yml b/.github/workflows/build-project.yml index ac71ffe..c4a7005 100644 --- a/.github/workflows/build-project.yml +++ b/.github/workflows/build-project.yml @@ -19,3 +19,16 @@ jobs: uses: oblivioncth/actions/.github/workflows/build-cxx-project.yml@v1 secrets: ffynnon_access: ${{ secrets.OBYBOT_FFYNNON_ACCESS }} + with: + pre_build_steps: | + - name: Install OpenMP lib [Linux] + if: env.run_is_linux == 'true' + shell: pwsh + run: | + if($Env:run_compiler.StartsWith('g++-')) { + sudo apt-get install libgomp1 + } elseif($Env:run_compiler.StartsWith('clang++-')) { + $ver = $Env:run_compiler.replace('clang++-', '') + $pkg = "libomp-${ver}-dev" + sudo apt-get install $pkg + }