@@ -20,25 +20,20 @@ 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'
42
37
run : |
43
38
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
44
39
cat GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
47
42
sudo apt update
48
43
49
44
- name : Install latest Intel OneAPI
50
- if : env.INSTALL_ONE_API == 'yes'
51
45
run : |
52
46
sudo apt install hwloc \
53
47
intel-oneapi-mkl \
60
54
- name : Install Lcov
61
55
run : |
62
56
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 }}
63
73
64
74
- name : Setup miniconda
65
75
id : setup_miniconda
68
78
with :
69
79
miniforge-version : latest
70
80
use-mamba : ' true'
71
- channels : conda-forge
72
81
conda-remove-defaults : ' true'
73
- python-version : ${{ env.python-ver }}
82
+ environment-file : ' ${{ env.environment-file }}'
74
83
activate-environment : ' coverage'
75
84
76
85
- name : ReSetup miniconda
@@ -79,27 +88,10 @@ jobs:
79
88
with :
80
89
miniforge-version : latest
81
90
use-mamba : ' true'
82
- channels : conda-forge
83
91
conda-remove-defaults : ' true'
84
- python-version : ${{ env.python-ver }}
92
+ environment-file : ' ${{ env.environment-file }}'
85
93
activate-environment : ' coverage'
86
94
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
95
- name : Conda info
104
96
run : |
105
97
mamba info
@@ -122,12 +114,7 @@ jobs:
122
114
123
115
- name : Total number of coverage attempts
124
116
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 }}"
131
118
132
119
- name : Upload coverage data to coveralls.io
133
120
run : |
@@ -144,9 +131,13 @@ jobs:
144
131
145
132
coveralls :
146
133
name : Indicate completion to coveralls.io
134
+
147
135
needs : generate-coverage
136
+
148
137
runs-on : ubuntu-latest
138
+
149
139
container : python:3-slim
140
+
150
141
steps :
151
142
- name : Finished
152
143
run : |
0 commit comments