@@ -20,25 +20,21 @@ jobs:
20
20
shell : bash -el {0}
21
21
22
22
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'
28
29
29
30
steps :
30
31
- name : Cancel Previous Runs
31
32
uses : styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
32
33
with :
33
34
access_token : ${{ github.token }}
34
35
35
- - name : Checkout repo
36
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37
- with :
38
- fetch-depth : 0
39
-
40
36
- name : Add Intel repository
41
- if : env.INSTALL_ONE_API == 'yes '
37
+ if : env.oneapi-pkgs-env == ''
42
38
run : |
43
39
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
44
40
cat GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
47
43
sudo apt update
48
44
49
45
- name : Install latest Intel OneAPI
50
- if : env.INSTALL_ONE_API == 'yes '
46
+ if : env.oneapi-pkgs-env == ''
51
47
run : |
52
48
sudo apt install hwloc \
53
49
intel-oneapi-mkl \
60
56
- name : Install Lcov
61
57
run : |
62
58
sudo apt-get install lcov
59
+ sudo gem install coveralls-lcov
60
+
61
+ - name : Checkout repo
62
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
63
+ with :
64
+ fetch-depth : 0
65
+
66
+ - name : Install conda-merge tool
67
+ uses : BSFishy/pip-action@8f2d471d809dc20b6ada98c91910b6ae6243f318 # v1
68
+ with :
69
+ packages : conda-merge
70
+
71
+ - name : Merge conda env files
72
+ run : |
73
+ conda-merge ${{ env.build-with-oneapi-env }} ${{ env.coverage-env }} ${{ env.oneapi-pkgs-env }} > ${{ env.environment-file }}
74
+ cat ${{ env.environment-file }}
63
75
64
76
- name : Setup miniconda
65
77
id : setup_miniconda
68
80
with :
69
81
miniforge-version : latest
70
82
use-mamba : ' true'
71
- channels : conda-forge
72
83
conda-remove-defaults : ' true'
73
- python-version : ${{ env.python-ver }}
84
+ environment-file : ' ${{ env.environment-file }}'
74
85
activate-environment : ' coverage'
75
86
76
87
- name : ReSetup miniconda
@@ -79,27 +90,10 @@ jobs:
79
90
with :
80
91
miniforge-version : latest
81
92
use-mamba : ' true'
82
- channels : conda-forge
83
93
conda-remove-defaults : ' true'
84
- python-version : ${{ env.python-ver }}
94
+ environment-file : ' ${{ env.environment-file }}'
85
95
activate-environment : ' coverage'
86
96
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
-
103
97
- name : Conda info
104
98
run : |
105
99
mamba info
@@ -122,12 +116,7 @@ jobs:
122
116
123
117
- name : Total number of coverage attempts
124
118
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
119
+ echo "Total number of coverage attempts: ${{ steps.build_coverage.outputs.total_attempts }}"
131
120
132
121
- name : Upload coverage data to coveralls.io
133
122
run : |
@@ -144,9 +133,13 @@ jobs:
144
133
145
134
coveralls :
146
135
name : Indicate completion to coveralls.io
136
+
147
137
needs : generate-coverage
138
+
148
139
runs-on : ubuntu-latest
140
+
149
141
container : python:3-slim
142
+
150
143
steps :
151
144
- name : Finished
152
145
run : |
0 commit comments