Add testing to matrix

This commit is contained in:
Henri Vasserman 2023-05-02 16:54:28 +03:00
parent a0de04a6f1
commit 5d4158b12c
No known key found for this signature in database
GPG key ID: 2995FC0F58B1A986

View file

@ -120,7 +120,7 @@ jobs:
make make
macOS-latest-cmake: macOS-latest-cmake:
runs-on: macOS-latest runs-on: macos-latest
steps: steps:
- name: Clone - name: Clone
@ -152,16 +152,21 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- build: 'avx2' - build: 'avx2'
defines: '' defines: ''
- build: 'avx' testing: true
defines: '-DLLAMA_AVX2=OFF' - build: 'avx'
- build: 'avx512' defines: '-DLLAMA_AVX2=OFF'
defines: '-DLLAMA_AVX512=ON -DBUILD_SHARED_LIBS=ON' testing: true
- build: 'opencl' - build: 'avx512'
defines: '-DLLAMA_CLBLAST=ON -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/clblast"' defines: '-DLLAMA_AVX512=ON -DBUILD_SHARED_LIBS=ON'
- build: 'openblas' testing: true
defines: '-DLLAMA_OPENBLAS=ON -DBLAS_LIBRARIES="/LIBPATH:$env:RUNNER_TEMP/openblas/lib" -DOPENBLAS_INC="$env:RUNNER_TEMP/openblas/include"' - build: 'opencl'
defines: '-DLLAMA_CLBLAST=ON -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/clblast"'
testing: false
- build: 'openblas'
defines: '-DLLAMA_OPENBLAS=ON -DBLAS_LIBRARIES="/LIBPATH:$env:RUNNER_TEMP/openblas/lib" -DOPENBLAS_INC="$env:RUNNER_TEMP/openblas/include"'
testing: true
steps: steps:
- name: Clone - name: Clone
@ -187,6 +192,7 @@ jobs:
$txt = Get-Content -Path $f -Raw $txt = Get-Content -Path $f -Raw
$txt.Replace('C:/dependencies/opencl/', "$($env:RUNNER_TEMP.Replace('\','/'))/opencl/") | Set-Content -Path $f -Encoding UTF8 $txt.Replace('C:/dependencies/opencl/', "$($env:RUNNER_TEMP.Replace('\','/'))/opencl/") | Set-Content -Path $f -Encoding UTF8
} }
- name: Download OpenBLAS - name: Download OpenBLAS
id: get_openblas id: get_openblas
if: ${{ matrix.build == 'openblas' }} if: ${{ matrix.build == 'openblas' }}
@ -218,7 +224,7 @@ jobs:
- name: Check AVX512F support - name: Check AVX512F support
id: check_avx512f id: check_avx512f
if: ${{ matrix.build == 'avx512' }} if: ${{ matrix.testing && matrix.build == 'avx512' }}
continue-on-error: true continue-on-error: true
run: | run: |
cd build cd build
@ -231,7 +237,7 @@ jobs:
- name: Test - name: Test
id: cmake_test id: cmake_test
if: ${{ ( matrix.build != 'avx512' || env.HAS_AVX512F == '1' ) && matrix.build != 'opencl' }} # Test AVX-512 only when possible if: ${{ matrix.testing && (matrix.build != 'avx512' || env.HAS_AVX512F == '1') }} # Test AVX-512 only when possible
run: | run: |
cd build cd build
ctest -C Release --verbose ctest -C Release --verbose