Skip to content

Commit

Permalink
Selective CI basecd on changes to a domain
Browse files Browse the repository at this point in the history
  • Loading branch information
rscohn2 committed May 31, 2024
1 parent 6d6a7b7 commit 83e77b8
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,41 @@ env:
jobs:
unit-tests:
runs-on: ubuntu-latest
if: steps.changes.outputs.src == 'true'
# One runner for each domain
strategy:
matrix:
include:
- config: portBLAS
options: -DTARGET_DOMAINS=blas -DREF_BLAS_ROOT=${PWD}/lapack/install -DENABLE_PORTBLAS_BACKEND=ON -DENABLE_MKLCPU_BACKEND=OFF -DPORTBLAS_TUNING_TARGET=INTEL_CPU
tests: '.*'
domain: blas
build_options: -DREF_BLAS_ROOT=${PWD}/lapack/install -DENABLE_PORTBLAS_BACKEND=ON -DENABLE_MKLCPU_BACKEND=OFF -DPORTBLAS_TUNING_TARGET=INTEL_CPU
- config: portFFT
options: -DENABLE_PORTFFT_BACKEND=ON -DENABLE_MKLCPU_BACKEND=OFF -DTARGET_DOMAINS=dft -DCMAKE_CXX_FLAGS="-fsycl -fsycl-targets=spir64"
tests: 'DFT/CT/.*ComputeTests_in_place_COMPLEX.COMPLEX_SINGLE_in_place_buffer.sizes_8_batches_1*'
domain: dft
build_options: -DENABLE_PORTFFT_BACKEND=ON -DENABLE_MKLCPU_BACKEND=OFF -DCMAKE_CXX_FLAGS="-fsycl -fsycl-targets=spir64"
test_options: -R 'DFT/CT/.*ComputeTests_in_place_COMPLEX.COMPLEX_SINGLE_in_place_buffer.sizes_8_batches_1*'
- config: MKL BLAS
options: -DTARGET_DOMAINS=blas -DREF_BLAS_ROOT=${PWD}/lapack/install
tests: '.*'
domain: blas
build_options: -DREF_BLAS_ROOT=${PWD}/lapack/install
- config: MKL DFT
options: -DTARGET_DOMAINS=dft
tests: '.*'
domain: dft
- config: MKL LAPACK
options: -DTARGET_DOMAINS=lapack -DREF_LAPACK_ROOT=${PWD}/lapack/install
tests: '.*'
domain: lapack
build_options: -DREF_LAPACK_ROOT=${PWD}/lapack/install
- config: MKL RNG
options: -DTARGET_DOMAINS=rng
tests: '.*'
domain: rng
name: unit tests ${{ matrix.config }} CPU
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Check for changes to this domain
id: changes
uses: dorny/paths-filter@v2
with:
filters: |
src:
- 'src/${{ matrix.domain}}/**'
- 'tests/unit_tests/${{ matrix.domain }}/**'
- CMakeLists.txt
# - '.github/workflows/**'
- name: Restore netlib from cache
id: cache-lapack
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
Expand All @@ -64,12 +74,13 @@ jobs:
components: |
[email protected]
[email protected]
- name: Configure/Build for a domain
run: |
source /opt/intel/oneapi/setvars.sh
cmake -DENABLE_MKLGPU_BACKEND=off -DCMAKE_VERBOSE_MAKEFILE=on ${{ matrix.options }} -B build
cmake -DTARGET_DOMAINS=${{ matrix.domain }} -DENABLE_MKLGPU_BACKEND=off -DCMAKE_VERBOSE_MAKEFILE=on ${{ matrix.build_options }} -B build
cmake --build build ${PARALLEL}
- name: Run tests
run: |
source /opt/intel/oneapi/setvars.sh
ctest --test-dir build -R ${{ matrix.tests }}
ctest --test-dir build ${{ matrix.test_options }}

0 comments on commit 83e77b8

Please sign in to comment.