diff --git a/.github/workflows/build-with-clang.yml b/.github/workflows/build-with-clang.yml index 86ad416..3bde36b 100644 --- a/.github/workflows/build-with-clang.yml +++ b/.github/workflows/build-with-clang.yml @@ -1,4 +1,4 @@ -name: Build mkl_random with clang +name: Build project with IntelLLVM clang compiler on: pull_request: push: @@ -8,16 +8,20 @@ permissions: read-all jobs: build-with-clang: - name: Build project with IntelLLVM clang compiler runs-on: ubuntu-latest strategy: matrix: python: ["3.9", "3.10", "3.11", "3.12"] numpy_build_version: ["numpy'<2'", "numpy'>=2'"] + env: ONEAPI_ROOT: /opt/intel/oneapi + defaults: + run: + shell: bash -el {0} + steps: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.12.1 @@ -50,19 +54,16 @@ jobs: fetch-depth: 0 - name: Install mkl_random dependencies - shell: bash -l {0} run: | pip install cython setuptools pytest pytest-cov pip install ${{ matrix.numpy_build_version }} - name: List oneAPI folder content - shell: bash -l {0} - run: ls /opt/intel/oneapi/compiler + run: ls ${{ env.ONEAPI_ROOT }}/compiler - name: Build mkl_random - shell: bash -l {0} run: | - source /opt/intel/oneapi/setvars.sh + source ${{ env.ONEAPI_ROOT }}/setvars.sh echo $CMPLR_ROOT export CC=$CMPLR_ROOT/bin/icx export CXX=$CMPLR_ROOT/bin/icpx @@ -70,9 +71,8 @@ jobs: python setup.py develop - name: Run mkl_random tests - shell: bash -l {0} run: | - source /opt/intel/oneapi/setvars.sh + source ${{ env.ONEAPI_ROOT }}/setvars.sh # Test with NumPy<2 for now pip install numpy"<2" pytest -s -v --pyargs mkl_random