forked from scipy/scipy
-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (91 loc) · 3.76 KB
/
linux_intel_oneAPI.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Intel oneAPI tests
on:
push:
branches:
- maintenance/**
pull_request:
branches:
- main
- maintenance/**
permissions:
contents: read # to fetch code (actions/checkout)
# The environment variable LINUX_BASEKIT_URL and LINUX_HPCKIT_URL
# store the URL for downloading Intel oneAPI.
# Reference - https://github.com/oneapi-src/oneapi-ci/blob/b4a96bd1888c130fcb73524d2b77b90f43681cbc/.github/workflows/build_all.yml#L11-L12
env:
LINUX_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/9a98af19-1c68-46ce-9fdd-e249240c7c42/l_BaseKit_p_2024.2.0.634_offline.sh
LINUX_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/d4e49548-1492-45c9-b678-8268cb0f1b05/l_HPCKit_p_2024.2.0.635_offline.sh
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
get_commit_message:
name: Get commit message
uses: ./.github/workflows/commit_message.yml
icx_icpx_ifx_mkl:
name: py3.12, dev.py
needs: get_commit_message
# Ensure (a) this doesn't run on forks by default, and
# (b) it does run with Act locally (`github` doesn't exist there)
if: >
needs.get_commit_message.outputs.message == 1
&& (github.repository == 'scipy/scipy' || github.repository == '')
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.12"]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive
- name: Setup Conda
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: true
activate-environment: scipy-dev
use-only-tar-bz2: false
miniforge-variant: Miniforge3
miniforge-version: latest
use-mamba: true
- name: Update Conda Environment
shell: bash -l {0}
run: |
conda activate scipy-dev
conda install -c conda-forge pkg-config meson meson-python ninja numpy cython pybind11 pytest pytest-xdist pytest-timeout pytest-fail-slow pooch rich-click click doit pydevtool hypothesis
- name: cache install
id: cache-install
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: |
/opt/intel/oneapi/
key: install-${{ env.LINUX_BASEKIT_URL }}-${{ env.LINUX_HPCKIT_URL }}-compiler
- name: Install oneAPI Base kit
if: steps.cache-install.outputs.cache-hit != 'true'
run: |
printenv LINUX_BASEKIT_URL
bash tools/install_intel_oneAPI_linux.sh $LINUX_BASEKIT_URL
- name: Install oneAPI HPC kit
if: steps.cache-install.outputs.cache-hit != 'true'
run: |
printenv LINUX_HPCKIT_URL
bash tools/install_intel_oneAPI_linux.sh $LINUX_HPCKIT_URL
- name: Initialise Intel oneAPI and Build SciPy
shell: bash -l {0}
run: |
. /opt/intel/oneapi/setvars.sh --force
conda activate scipy-dev
# Note that we have to install Pythran from PyPI to avoid pulling in compilers
# from conda-forge (those may break Intel Fortran, which rely on system GCC/Clang,
# xref https://github.com/conda-forge/pythran-feedstock/issues/77).
pip install pythran
unset FFLAGS
CC=icx CXX=icpx FC=ifx python dev.py build -C-Dblas=mkl-dynamic-lp64-iomp -C-Dlapack=mkl-dynamic-lp64-iomp
- name: Test scipy
shell: bash -l {0}
run: |
. /opt/intel/oneapi/setvars.sh --force
conda activate scipy-dev
python dev.py test