Skip to content

Commit 04a4c42

Browse files
authored
Merge 475291b into 44bb068
2 parents 44bb068 + 475291b commit 04a4c42

File tree

8 files changed

+91
-73
lines changed

8 files changed

+91
-73
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 18 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ jobs:
3636
pull-requests: write
3737

3838
env:
39-
python-ver: '3.12'
40-
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'
39+
environment-file: 'environments/environment.yml'
40+
build-with-oneapi-env: 'environments/build_with_oneapi.yml'
41+
building-docs-env: 'environments/building_docs.yml'
42+
oneapi-pkgs-env: ''
43+
# Enable env when it's required to use only conda packages without OneAPI installation
44+
# oneapi-pkgs-env: 'environments/oneapi_pkgs.yml'
4445

4546
steps:
4647
- name: Cancel Previous Runs
@@ -101,16 +102,25 @@ jobs:
101102
with:
102103
fetch-depth: 0
103104

105+
- name: Install conda-merge tool
106+
uses: BSFishy/pip-action@8f2d471d809dc20b6ada98c91910b6ae6243f318 # v1
107+
with:
108+
packages: conda-merge
109+
110+
- name: Merge conda env files
111+
run: |
112+
conda-merge ${{ env.build-with-oneapi-env }} ${{ env.building-docs-env }} ${{ env.oneapi-pkgs-env }} > ${{ env.environment-file }}
113+
cat ${{ env.environment-file }}
114+
104115
- name: Setup miniconda
105116
id: setup_miniconda
106117
continue-on-error: true
107118
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
108119
with:
109120
miniforge-version: latest
110121
use-mamba: 'true'
111-
channels: conda-forge
112122
conda-remove-defaults: 'true'
113-
python-version: ${{ env.python-ver }}
123+
environment-file: '${{ env.environment-file }}'
114124
activate-environment: 'docs'
115125

116126
- name: ReSetup miniconda
@@ -119,35 +129,10 @@ jobs:
119129
with:
120130
miniforge-version: latest
121131
use-mamba: 'true'
122-
channels: conda-forge
123132
conda-remove-defaults: 'true'
124-
python-version: ${{ env.python-ver }}
133+
environment-file: '${{ env.environment-file }}'
125134
activate-environment: 'docs'
126135

127-
# Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
128-
- name: Disable speed limit check in mamba
129-
run: echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV
130-
131-
- name: Install sphinx dependencies
132-
run: |
133-
mamba install sphinx sphinx_rtd_theme
134-
pip install sphinxcontrib-googleanalytics==0.4 \
135-
pyenchant sphinxcontrib-spelling
136-
137-
- name: Install dpnp dependencies
138-
if: env.INSTALL_ONE_API == 'yes'
139-
run: |
140-
mamba install numpy dpctl">=0.18.0dev0" cmake cython pytest ninja scikit-build ${{ env.NO_INTEL_CHANNELS }}
141-
142-
- name: Install dpnp dependencies
143-
if: env.INSTALL_ONE_API != 'yes'
144-
run: |
145-
mamba install numpy dpctl">=0.18.0dev0" mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
146-
cmake cython pytest ninja scikit-build ${{ env.CHANNELS }}
147-
148-
- name: Install cuPy dependencies
149-
run: mamba install cupy
150-
151136
- name: Conda info
152137
run: mamba info
153138

@@ -178,7 +163,6 @@ jobs:
178163
echo PROJECT_NUMBER=${PROJECT_NUMBER}
179164
echo "PROJECT_NUMBER=$PROJECT_NUMBER" >> $GITHUB_ENV
180165
181-
# https://github.com/marketplace/actions/doxygen-action
182166
- name: Build backend docs
183167
uses: mattnotmitt/doxygen-action@cbe72c8e402e8a3faa1f0b247ef90aa6c8e4ce74 # v1.9.8
184168
with:
@@ -187,7 +171,6 @@ jobs:
187171
- name: Copy backend docs
188172
run: cp -r dpnp/backend/doc/html ${{ env.PUBLISH_DIR }}/backend_doc
189173

190-
# https://github.com/marketplace/actions/github-pages-action
191174
# The step is only used to build docs while pushing a PR to "master"
192175
- name: Deploy docs
193176
if: env.GH_EVENT_PUSH_UPSTREAM == 'true'

.github/workflows/generate_coverage.yaml

Lines changed: 29 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,20 @@ jobs:
2020
shell: bash -el {0}
2121

2222
env:
23-
python-ver: '3.12'
24-
CHANNELS: '-c dppy/label/dev -c intel -c conda-forge --override-channels'
25-
NO_INTEL_CHANNELS: '-c dppy/label/dev -c conda-forge --override-channels'
26-
# Install the latest oneAPI compiler to work around an issue
27-
INSTALL_ONE_API: 'yes'
23+
environment-file: 'environments/environment.yml'
24+
build-with-oneapi-env: 'environments/build_with_oneapi.yml'
25+
coverage-env: 'environments/coverage.yml'
26+
oneapi-pkgs-env: ''
27+
# Enable env when it's required to use only conda packages without OneAPI installation
28+
# oneapi-pkgs-env: 'environments/oneapi_pkgs.yml'
2829

2930
steps:
3031
- name: Cancel Previous Runs
3132
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
3233
with:
3334
access_token: ${{ github.token }}
3435

35-
- name: Checkout repo
36-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37-
with:
38-
fetch-depth: 0
39-
4036
- name: Add Intel repository
41-
if: env.INSTALL_ONE_API == 'yes'
4237
run: |
4338
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
4439
cat GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
@@ -47,7 +42,6 @@ jobs:
4742
sudo apt update
4843
4944
- name: Install latest Intel OneAPI
50-
if: env.INSTALL_ONE_API == 'yes'
5145
run: |
5246
sudo apt install hwloc \
5347
intel-oneapi-mkl \
@@ -60,6 +54,22 @@ jobs:
6054
- name: Install Lcov
6155
run: |
6256
sudo apt-get install lcov
57+
sudo gem install coveralls-lcov
58+
59+
- name: Checkout repo
60+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
61+
with:
62+
fetch-depth: 0
63+
64+
- name: Install conda-merge tool
65+
uses: BSFishy/pip-action@8f2d471d809dc20b6ada98c91910b6ae6243f318 # v1
66+
with:
67+
packages: conda-merge
68+
69+
- name: Merge conda env files
70+
run: |
71+
conda-merge ${{ env.build-with-oneapi-env }} ${{ env.coverage-env }} ${{ env.oneapi-pkgs-env }} > ${{ env.environment-file }}
72+
cat ${{ env.environment-file }}
6373
6474
- name: Setup miniconda
6575
id: setup_miniconda
@@ -68,9 +78,8 @@ jobs:
6878
with:
6979
miniforge-version: latest
7080
use-mamba: 'true'
71-
channels: conda-forge
7281
conda-remove-defaults: 'true'
73-
python-version: ${{ env.python-ver }}
82+
environment-file: '${{ env.environment-file }}'
7483
activate-environment: 'coverage'
7584

7685
- name: ReSetup miniconda
@@ -79,27 +88,10 @@ jobs:
7988
with:
8089
miniforge-version: latest
8190
use-mamba: 'true'
82-
channels: conda-forge
8391
conda-remove-defaults: 'true'
84-
python-version: ${{ env.python-ver }}
92+
environment-file: '${{ env.environment-file }}'
8593
activate-environment: 'coverage'
8694

87-
# Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
88-
- name: Disable speed limit check in mamba
89-
run: echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV
90-
91-
- name: Install dpnp dependencies
92-
if: env.INSTALL_ONE_API == 'yes'
93-
run: |
94-
mamba install cython llvm cmake">=3.21" scikit-build ninja pytest pytest-cov coverage[toml] \
95-
dpctl">=0.18.0dev0" ${{ env.NO_INTEL_CHANNELS }}
96-
97-
- name: Install dpnp dependencies
98-
if: env.INSTALL_ONE_API != 'yes'
99-
run: |
100-
mamba install cython llvm cmake">=3.21" scikit-build ninja pytest pytest-cov coverage[toml] \
101-
dpctl">=0.18.0dev0" dpcpp_linux-64 mkl-devel-dpcpp tbb-devel onedpl-devel ${{ env.CHANNELS }}
102-
10395
- name: Conda info
10496
run: |
10597
mamba info
@@ -122,12 +114,7 @@ jobs:
122114
123115
- name: Total number of coverage attempts
124116
run: |
125-
echo "Total number of coverage attempts made: ${{ steps.build_coverage.outputs.total_attempts }}"
126-
127-
- name: Install coverall dependencies
128-
run: |
129-
sudo gem install coveralls-lcov
130-
pip install coveralls==4.0.1
117+
echo "Total number of coverage attempts: ${{ steps.build_coverage.outputs.total_attempts }}"
131118
132119
- name: Upload coverage data to coveralls.io
133120
run: |
@@ -144,9 +131,13 @@ jobs:
144131

145132
coveralls:
146133
name: Indicate completion to coveralls.io
134+
147135
needs: generate-coverage
136+
148137
runs-on: ubuntu-latest
138+
149139
container: python:3-slim
140+
150141
steps:
151142
- name: Finished
152143
run: |

environments/base_build_docs.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pyenchant==3.2.2
2+
sphinxcontrib-googleanalytics==0.4
3+
sphinxcontrib-spelling==8.0.1

environments/build_with_oneapi.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Packages to build DPNP with OneAPI env activated
2+
channels:
3+
- dppy/label/dev
4+
- conda-forge
5+
dependencies:
6+
- cmake
7+
- cython
8+
- dpctl>=0.19.0dev0
9+
- ninja
10+
- numpy
11+
- pytest
12+
- scikit-build

environments/building_docs.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Building docs specific packages
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python=3.12
6+
- cupy
7+
- sphinx
8+
- sphinx_rtd_theme
9+
- pip:
10+
- -r base_build_docs.txt

environments/coverage.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
coveralls==4.0.1

environments/coverage.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Coverage specific packages
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python=3.12
6+
- coverage[toml]
7+
- llvm
8+
- pytest-cov
9+
- pip:
10+
- -r coverage.txt

environments/oneapi_pkgs.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: OneAPI packages to build DPNP without OneAPI env activated
2+
channels:
3+
- https://software.repos.intel.com/python/conda/
4+
dependencies:
5+
- dpcpp_linux-64
6+
- mkl-devel-dpcpp
7+
- onedpl-devel
8+
- tbb-devel

0 commit comments

Comments
 (0)