forked from scipy/scipy
-
Notifications
You must be signed in to change notification settings - Fork 0
125 lines (112 loc) · 5.15 KB
/
Copy pathlinux_intel_oneAPI.yml
File metadata and controls
125 lines (112 loc) · 5.15 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: Intel oneAPI tests
on:
push:
branches:
- maintenance/**
pull_request:
branches:
- main
- maintenance/**
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
- cron: "9 9 2/2 * *"
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_CPPKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/189a6c48-72de-4bef-a43c-eb1ee49787d6/intel-cpp-essentials-2025.0.1.27_offline.sh
LINUX_FORTRANKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/9e86b555-f238-4dea-b4b2-01b243e42483/intel-fortran-essentials-2025.0.1.27_offline.sh
LINUX_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b7f71cf2-8157-4393-abae-8cea815509f7/intel-oneapi-hpc-toolkit-2025.0.1.47_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, spin
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: recursive
# Reference https://github.com/easimon/maximize-build-space/blob/master/action.yml
# see https://github.com/scipy/scipy/issues/23813
- name: Free up disk space
run: |
df -h
sudo rm -rf /usr/local/lib/android
df -h
- name: cache install
id: cache-install
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: |
/opt/intel/oneapi/
key: install-${{ env.LINUX_CPPKIT_URL }}-${{ env.LINUX_FORTRANKIT_URL }}-${{ env.LINUX_HPCKIT_URL }}-compiler
- name: Install oneAPI CPP kit
if: steps.cache-install.outputs.cache-hit != 'true'
run: |
printenv LINUX_CPPKIT_URL
bash tools/install_intel_oneAPI_linux.sh $LINUX_CPPKIT_URL "" a585655669cee57a0965eba46d96b1081d9ab86e3e4b421505ebec651b41564b # 2025.0.1.27
- name: Install oneAPI Fortran kit
if: steps.cache-install.outputs.cache-hit != 'true'
run: |
printenv LINUX_FORTRANKIT_URL
bash tools/install_intel_oneAPI_linux.sh $LINUX_FORTRANKIT_URL "" ff9eb5a639c0fcc3d386f5798cc4259103842d783f34c08da27155431215ed0c # 2025.0.1.27
- 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 "" 941a4d4ccc05cfb60f5edbe7c2c5e34197cce561c12d565cd8c6fefe6b752fb6 # 2025.0.1.47
- name: Setup Conda
uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.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 pooch hypothesis spin "click<8.3.0"
- 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 spin build -- -Dblas=mkl-dynamic-lp64-iomp -Dlapack=mkl-dynamic-lp64-iomp
- name: Test scipy
shell: bash -l {0}
run: |
. /opt/intel/oneapi/setvars.sh --force
conda activate scipy-dev
spin test