Skip to content

Commit 53a7be3

Browse files
authored
Build conda enviroment for build docs action without intel channel (#1918)
* Create conda env without intel channel * List conda channels explicitly * Bump python version to 3.11 * Don't use intel channel * Stock numpy returns different dtypes from fft() and ifft() * Relax type check for rfft() * Create conda env without intel channel * Add TBB installation from OneAPI * Activate oneAPI enviroment * Activate oneAPI enviroment and build in the same step * Activate oneAPI enviroment in step with spell check * Activate oneAPI enviroment in step with docs build
1 parent 313e0b7 commit 53a7be3

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
env:
3939
python-ver: '3.9'
4040
CHANNELS: '-c dppy/label/dev -c intel -c conda-forge --override-channels'
41+
NO_INTEL_CHANNELS: '-c dppy/label/dev -c conda-forge --override-channels'
42+
# Install the latest oneAPI compiler to work around an issue
43+
INSTALL_ONE_API: 'yes'
4144

4245
steps:
4346
- name: Cancel Previous Runs
@@ -75,6 +78,8 @@ jobs:
7578
run: |
7679
sudo apt-get install intel-oneapi-mkl \
7780
intel-oneapi-mkl-devel \
81+
intel-oneapi-tbb-devel \
82+
intel-oneapi-libdpstd-devel \
7883
intel-oneapi-compiler-dpcpp-cpp
7984
8085
# required by sphinxcontrib-spelling extension
@@ -124,6 +129,12 @@ jobs:
124129
pyenchant sphinxcontrib-spelling
125130
126131
- name: Install dpnp dependencies
132+
if: env.INSTALL_ONE_API == 'yes'
133+
run: |
134+
mamba install numpy"<1.24" dpctl">=0.18.0dev0" cmake cython pytest ninja scikit-build ${{ env.NO_INTEL_CHANNELS }}
135+
136+
- name: Install dpnp dependencies
137+
if: env.INSTALL_ONE_API != 'yes'
127138
run: |
128139
mamba install numpy"<1.24" dpctl">=0.18.0dev0" mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
129140
cmake cython pytest ninja scikit-build ${{ env.CHANNELS }}
@@ -138,14 +149,20 @@ jobs:
138149
run: mamba list
139150

140151
- name: Build library
141-
run: python scripts/build_locally.py
152+
run: |
153+
[ -f /opt/intel/oneapi/setvars.sh ] && source /opt/intel/oneapi/setvars.sh
154+
python scripts/build_locally.py
142155
143156
- name: Run a spelling checker for docs
144-
run: make spelling
157+
run: |
158+
[ -f /opt/intel/oneapi/setvars.sh ] && source /opt/intel/oneapi/setvars.sh
159+
make spelling
145160
working-directory: doc
146161

147162
- name: Build docs
148-
run: make html
163+
run: |
164+
[ -f /opt/intel/oneapi/setvars.sh ] && source /opt/intel/oneapi/setvars.sh
165+
make html
149166
working-directory: doc
150167

151168
- name: Set a project number to current release

.github/workflows/generate_coverage.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@ jobs:
4949
- name: Install latest Intel OneAPI
5050
if: env.INSTALL_ONE_API == 'yes'
5151
run: |
52-
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp
53-
sudo apt-get install intel-oneapi-mkl-devel
54-
sudo apt-get install intel-oneapi-libdpstd-devel
55-
sudo apt-get install intel-oneapi-tbb-devel
52+
sudo apt-get install intel-oneapi-mkl \
53+
intel-oneapi-mkl-devel \
54+
intel-oneapi-tbb-devel \
55+
intel-oneapi-libdpstd-devel \
56+
intel-oneapi-compiler-dpcpp-cpp
5657
5758
- name: Install Lcov
5859
run: |

0 commit comments

Comments
 (0)