Lower timeout-minutes. #1
Workflow file for this run
This file contains 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: Build and Cache Kokkos | ||
env: | ||
GCC_VERSION: 11 | ||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: true | ||
type: string | ||
outputs: | ||
exec_model: | ||
description: "The execution model for Kokkos." | ||
value: ${{ jobs.linux-set-builder-matrix.outputs.exec_model }} | ||
kokkos_version: | ||
description: "Kokkos version" | ||
value: ${{ jobs.linux-set-builder-matrix.outputs.kokkos_version }} | ||
concurrency: | ||
group: build_and_cache_Kokkos_linux-${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
jobs: | ||
timeout-minutes: 30 | ||
linux-set-builder-matrix: | ||
name: Set Kokkos builder matrix | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Kokkos execution strategy | ||
id: exec_model | ||
run: echo "exec_model=[\"SERIAL\", \"OPENMP\"]" >> $GITHUB_OUTPUT | ||
- name: Kokkos version | ||
id: kokkos_version | ||
run: echo "kokkos_version=[\"4.0.01\"]" >> $GITHUB_OUTPUT | ||
outputs: | ||
exec_model: ${{ steps.exec_model.outputs.exec_model }} | ||
kokkos_version: ${{ steps.kokkos_version.outputs.kokkos_version }} | ||
build_dependencies: | ||
needs: [linux-set-builder-matrix] | ||
strategy: | ||
matrix: | ||
exec_model: ${{ fromJson(needs.linux-set-builder-matrix.outputs.exec_model) }} | ||
kokkos_version: ${{ fromJson(needs.linux-set-builder-matrix.outputs.kokkos_version) }} | ||
name: Kokkos core (${{ matrix.exec_model }}) | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- name: Cache installation directories | ||
id: kokkos-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ github.workspace}}/Kokkos_install/${{ matrix.exec_model }} | ||
key: ${{ inputs.os }}-kokkos${{ matrix.kokkos_version }}-${{ matrix.exec_model }} | ||
- name: Clone Kokkos repository | ||
if: steps.kokkos-cache.outputs.cache-hit != 'true' | ||
run: | | ||
git clone https://github.com/kokkos/kokkos.git | ||
cd kokkos | ||
git checkout ${{ matrix.kokkos_version }} | ||
cd - | ||
pushd . &> /dev/null | ||
- name: Install dependencies (Ubuntu) | ||
if: ${{ (((inputs.os == 'ubuntu-latest') || (inputs.os == 'ubuntu-20.04') || (inputs.os == 'ubuntu-22.04')) && (steps.kokkos-cache.outputs.cache-hit != 'true')) }} | ||
run: | | ||
sudo apt-get update && sudo apt-get -y -q install cmake gcc-$GCC_VERSION g++-$GCC_VERSION ninja-build git | ||
- name: Build Kokkos core library (Ubuntu) | ||
if: ${{ (((inputs.os == 'ubuntu-latest') || (inputs.os == 'ubuntu-20.04') || (inputs.os == 'ubuntu-22.04')) && (steps.kokkos-cache.outputs.cache-hit != 'true')) }} | ||
run: | | ||
mkdir -p ${{ github.workspace}}/Kokkos_install/${{ matrix.exec_model }} | ||
cd kokkos | ||
cmake -BBuild . -DCMAKE_INSTALL_PREFIX=${{ github.workspace}}/Kokkos_install/${{ matrix.exec_model }} \ | ||
-DKokkos_ENABLE_COMPLEX_ALIGN=OFF \ | ||
-DKokkos_ENABLE_SERIAL=ON \ | ||
-DKokkos_ENABLE_${{ matrix.exec_model }}=ON \ | ||
-DKokkos_ENABLE_DEPRECATION_WARNINGS=OFF \ | ||
-DCMAKE_CXX_COMPILER="$(which g++-$GCC_VERSION)" \ | ||
-DCMAKE_CXX_STANDARD=20 \ | ||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \ | ||
-G Ninja | ||
cmake --build ./Build --verbose | ||
cmake --install ./Build | ||
cd - |