Skip to content

Commit

Permalink
CI: Add Ubuntu runner using GCC without OpenMP
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuetzel committed Oct 7, 2023
1 parent cf88398 commit 1066fc1
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
runs-on: ubuntu-latest

name: ubuntu (${{ matrix.compiler }} ${{ matrix.cuda }} CUDA)
name: ubuntu (${{ matrix.compiler }} ${{ matrix.cuda }} CUDA ${{ matrix.openmp }} OpenMP)

strategy:
# Allow other runners in the matrix to continue if some fail
Expand All @@ -31,6 +31,7 @@ jobs:
matrix:
compiler: [gcc, clang]
cuda: [with, without]
openmp: [with]
include:
- compiler: gcc
compiler-pkgs: "g++ gcc"
Expand All @@ -51,6 +52,19 @@ jobs:
-DENABLE_CUDA=On
-DCUDAToolkit_INCLUDE_DIR="/usr/include"
-DCMAKE_CUDA_COMPILER_LAUNCHER="ccache"
- openmp: without
openmp-cmake-flags: "-DNOPENMP=ON"
compiler: gcc
compiler-pkgs: "g++ gcc"
cc: "gcc"
cxx: "g++"
ccache-max: 600M
cuda: with
cuda-pkgs: "nvidia-cuda-dev nvidia-cuda-toolkit"
cuda-cmake-flags:
-DENABLE_CUDA=On
-DCUDAToolkit_INCLUDE_DIR="/usr/include"
-DCMAKE_CUDA_COMPILER_LAUNCHER="ccache"

env:
CC: ${{ matrix.cc }}
Expand All @@ -75,7 +89,7 @@ jobs:
# used in action/cache/restore and action/cache/save steps
id: ccache-prepare
run: |
echo "key=ccache:ubuntu:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT
echo "key=ccache:ubuntu:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ matrix.openmp }}:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT
- name: restore ccache
# setup the GitHub cache used to maintain the ccache from one job to the next
Expand All @@ -85,8 +99,8 @@ jobs:
key: ${{ steps.ccache-prepare.outputs.key }}
# Prefer caches from the same branch. Fall back to caches from the dev branch.
restore-keys: |
ccache:ubuntu:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ github.ref }}
ccache:ubuntu:${{ matrix.compiler }}:${{ matrix.cuda }}:
ccache:ubuntu:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ matrix.openmp }}:${{ github.ref }}
ccache:ubuntu:${{ matrix.compiler }}:${{ matrix.cuda }}:${{ matrix.openmp }}:
- name: create empty libraries
# This is to work around a bug in nvlink.
Expand Down Expand Up @@ -127,6 +141,7 @@ jobs:
-DCMAKE_Fortran_COMPILER_LAUNCHER="ccache" \
-DBLA_VENDOR="OpenBLAS" \
${{ matrix.cuda-cmake-flags }} \
${{ matrix.openmp-cmake-flags }} \
..
echo "::endgroup::"
echo "::group::Build $lib"
Expand Down

0 comments on commit 1066fc1

Please sign in to comment.