forked from kokkos/kokkos
-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (61 loc) · 2.23 KB
/
performance-benchmark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: github-benchmarks
on:
push:
branches:
- develop
workflow_call:
permissions: read-all
jobs:
CI:
continue-on-error: true
strategy:
matrix:
distro: ['ubuntu:latest']
cxx: ['g++', 'clang++']
backend: ['OPENMP']
runs-on: ubuntu-latest
container:
image: ghcr.io/kokkos/ci-containers/${{ matrix.distro }}
env:
BUILD_ID: ${{ matrix.distro }}-${{ matrix.cxx }}-${{ matrix.backend }}
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/cache@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0
with:
path: ~/.cache/ccache
key: kokkos-${{ matrix.distro }}-${{ matrix.cxx }}-${{ matrix.backend }}-${{ github.ref }}-${{ github.sha }}
restore-keys: kokkos-${{ matrix.distro }}-${{ matrix.cxx }}-${{ matrix.backend }}-${{ github.ref }}
- name: Configure Kokkos
run: |
cmake -B builddir \
-DKokkos_ENABLE_HWLOC=ON \
-DKokkos_ENABLE_${{ matrix.backend }}=ON \
-DKokkos_ENABLE_BENCHMARKS=ON \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Release
- name: Build
run: |
ccache -z
NUM_CPU=$(grep -c processor /proc/cpuinfo)
cmake --build builddir --parallel ${NUM_CPU}
ccache -s
- name: Tests
working-directory: builddir
run: ctest --output-on-failure
- name: Gather benchmark results
run: |
mkdir ${{ env.BUILD_ID }}
find builddir/core/perf_test/ -name "*.json" -exec mv {} ${{ env.BUILD_ID }}/ \;
- name: Push benchmark results
if: ${{ github.ref == 'refs/heads/develop' }}
uses: dmnemec/copy_file_to_another_repo_action@bbebd3da22e4a37d04dca5f782edd5201cb97083 # main
env:
API_TOKEN_GITHUB: ${{ secrets.DALG24_PUSH_BENCHMARK_RESULTS }}
with:
source_file: ${{ env.BUILD_ID }}
destination_repo: 'kokkos/kokkos-benchmark-results'
destination_branch: 'main'
user_email: '[email protected]'
user_name: 'Kokkos Developers'