forked from oneapi-src/oneMKL
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 1.77 KB
/
pr.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
name: "PR Tests"
permissions: read-all
# Trigger for PR an merge to develop branch
on:
push:
branches: develop
pull_request:
workflow_dispatch:
env:
CTEST_OUTPUT_ON_FAILURE: 1
LAPACK_VERSION: 3.12.0
PARALLEL: -j 2
jobs:
mkl:
runs-on: ubuntu-latest
# One runner for each domain
strategy:
matrix:
domain: [blas, dft, lapack, rng]
steps:
- uses: actions/checkout@v4
- name: Restore netlib from cache
id: cache-lapack
uses: actions/cache@v3
with:
path: lapack/install
key: lapack-${{ env.LAPACK_VERSION }}
- name: Install netlib
if: steps.cache-lapack.outputs.cache-hit != 'true'
run: |
curl -sL https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v${LAPACK_VERSION}.tar.gz | tar zx
SHARED_OPT="lapack-${LAPACK_VERSION} -DBUILD_SHARED_LIBS=on -DCBLAS=on -DLAPACKE=on -DCMAKE_INSTALL_PREFIX=${PWD}/lapack/install"
# 32 bit int
cmake ${SHARED_OPT} -B lapack/build32
cmake --build lapack/build32 ${PARALLEL} --target install
# 64 bit int
cmake ${SHARED_OPT} -DBUILD_INDEX64=on -B lapack/build64
cmake --build lapack/build64 ${PARALLEL} --target install
- name: Install oneapi
uses: rscohn2/setup-oneapi@v0
with:
components: |
icx@2024.1.0
mkl@2024.1.0
- name: Configure/Build for a domain
run: |
source /opt/intel/oneapi/setvars.sh
cmake -DREF_BLAS_ROOT=${PWD}/lapack/install -DREF_LAPACK_ROOT=${PWD}/lapack/install -DTARGET_DOMAINS=${{ matrix.domain }} -B build
cmake --build build ${PARALLEL}
- name: Run tests
run: |
source /opt/intel/oneapi/setvars.sh
# Run tests, skip GPU tests
ctest --test-dir build ${PARALLEL} -E 'gpu$'