diff --git a/.github/workflows/build-with-clang.yml b/.github/workflows/build-with-clang.yml index eb7e976..143cf04 100644 --- a/.github/workflows/build-with-clang.yml +++ b/.github/workflows/build-with-clang.yml @@ -1,4 +1,4 @@ -name: Build mkl-service with clang +name: Build project with IntelLLVM clang compiler on: push: @@ -10,12 +10,19 @@ permissions: read-all jobs: build-with-clang: - name: Build project with IntelLLVM clang compiler runs-on: ubuntu-latest + strategy: + matrix: + python: ["3.10", "3.11", "3.12"] # 3.9 fails - gh-issue#56 + 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 @@ -39,7 +46,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: ${{ matrix.python }} architecture: x64 - name: Checkout repo @@ -48,28 +55,25 @@ jobs: fetch-depth: 0 - name: Install mkl-service dependencies - shell: bash -l {0} - run: | - pip install numpy cython setuptools pytest pytest-cov + uses: BSFishy/pip-action@v1 + with: + packages: | + cython + setuptools + pytest - name: List oneAPI folder content - shell: bash -l {0} - run: ls /opt/intel/oneapi/compiler + run: ls ${{ env.ONEAPI_ROOT }}/compiler - name: Build mkl-service - 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/compiler/clang - export CXX=$CMPLR_ROOT/bin/compiler/clang++ + export CC=$CMPLR_ROOT/bin/icx export CFLAGS="${CFLAGS} -fno-fast-math" - echo "CC = ${CC} CXX=${CXX}" - ls -l ${CC} ${CXX} python setup.py develop - - name: Run mkl-service tests - shell: bash -l {0} + - name: Run mkl-service tests run: | - source /opt/intel/oneapi/setvars.sh + source ${{ env.ONEAPI_ROOT }}/setvars.sh pytest -s -v --pyargs mkl diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 12bbc10..7db4b51 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -22,6 +22,11 @@ jobs: matrix: python: ["3.9", "3.10", "3.11", "3.12"] steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.12.1 + with: + access_token: ${{ github.token }} + - uses: actions/checkout@v4.1.7 with: fetch-depth: 0 @@ -71,6 +76,11 @@ jobs: env: conda-bld: C:\Miniconda\conda-bld\win-64\ steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.12.1 + with: + access_token: ${{ github.token }} + - uses: actions/checkout@v4.1.7 with: fetch-depth: 0