@@ -69,19 +69,16 @@ jobs:
69
69
uses : actions/checkout@v4
70
70
with :
71
71
fetch-tags : true
72
- path : main
73
72
74
73
- name : Switch to release build of Lightning
75
74
if : inputs.lightning-version == 'release'
76
75
run : |
77
- cd main
78
76
git fetch --all
79
77
git checkout $(git branch -a --list "origin/v0.*rc*" | sort | tail -1)
80
78
81
79
- name : Switch to stable build of Lightning
82
80
if : inputs.lightning-version == 'stable'
83
81
run : |
84
- cd main
85
82
git fetch --tags --force
86
83
git checkout latest_release
87
84
git log -1 --format='%H'
@@ -114,17 +111,25 @@ jobs:
114
111
115
112
- name : Get required Python packages
116
113
run : |
117
- cd main
118
114
python -m pip install -r requirements-dev.txt
119
115
120
- - name : Configure and build device wheel
121
- env :
122
- PL_BACKEND : ${{ matrix.pl_backend }}
116
+ # TODO: Update after Release 0.37
117
+ - name : Create device wheel ${{ inputs.lightning-version }}
118
+ if : inputs.lightning-version == 'stable'
119
+ run : |
120
+ PL_BACKEND=${{ matrix.pl_backend }} CMAKE_ARGS="-DCMAKE_PREFIX_PATH=${{ github.workspace }}/Kokkos" \
121
+ python setup.py bdist_wheel
122
+ cd dist
123
+ WHEEL_NAME=$(ls *.whl)
124
+ cp $WHEEL_NAME ${{ github.workspace }}/wheel_${{ matrix.pl_backend }}-${{ matrix.exec_model }}.whl
125
+ echo $WHEEL_NAME > ${{ github.workspace }}/${{ matrix.pl_backend }}-${{ matrix.exec_model }}_name.txt
126
+
127
+ # TODO: Remove after Release 0.37
128
+ - name : Create device wheel ${{ inputs.lightning-version }}
129
+ if : inputs.lightning-version != 'stable'
123
130
run : |
124
- cd main
125
- python scripts/configure_pyproject_toml.py
126
- CMAKE_ARGS="-DCMAKE_PREFIX_PATH=${{ github.workspace }}/Kokkos -DENABLE_PYTHON=ON -DCMAKE_CXX_COMPILER=$(which g++-$GCC_VERSION)" \
127
- python -m build
131
+ PL_BACKEND=${{ matrix.pl_backend }} python scripts/configure_pyproject_toml.py
132
+ CMAKE_ARGS="-DCMAKE_PREFIX_PATH=${{ github.workspace }}/Kokkos" python -m build
128
133
cd dist
129
134
WHEEL_NAME=$(ls *.whl)
130
135
cp $WHEEL_NAME ${{ github.workspace }}/wheel_${{ matrix.pl_backend }}-${{ matrix.exec_model }}.whl
@@ -170,12 +175,10 @@ jobs:
170
175
uses : actions/checkout@v4
171
176
with :
172
177
fetch-tags : true
173
- path : main
174
178
175
179
- name : Switch to release tag of Lightning
176
180
if : inputs.lightning-version == 'release'
177
181
run : |
178
- cd main
179
182
git fetch --all
180
183
git checkout $(git branch -a --list "origin/v0.*rc*" | sort | tail -1)
181
184
@@ -187,7 +190,6 @@ jobs:
187
190
- name : Switch to stable tag of Lightning
188
191
if : inputs.lightning-version == 'stable'
189
192
run : |
190
- cd main
191
193
git fetch --tags --force
192
194
git checkout latest_release
193
195
git log -1 --format='%H'
@@ -208,7 +210,6 @@ jobs:
208
210
run : |
209
211
WHEEL_NAME=$(cat ${{ github.workspace }}/${{ matrix.pl_backend }}-${{ matrix.exec_model }}_name.txt)
210
212
mv ${{ github.workspace }}/wheel_${{ matrix.pl_backend }}-${{ matrix.exec_model }}.whl ${{ github.workspace }}/$WHEEL_NAME
211
- cd main
212
213
python -m pip install -r requirements-dev.txt
213
214
python -m pip install openfermionpyscf
214
215
if [ '${{ inputs.lightning-version }}' != 'stable' ]; then
@@ -235,7 +236,6 @@ jobs:
235
236
- name : Install Stable PennyLane
236
237
if : inputs.pennylane-version == 'stable'
237
238
run : |
238
- cd main
239
239
python -m pip uninstall -y pennylane && python -m pip install -U pennylane
240
240
241
241
- name : Install ML libraries for interfaces
@@ -246,7 +246,6 @@ jobs:
246
246
247
247
- name : Run PennyLane-Lightning unit tests
248
248
run : |
249
- cd main/
250
249
DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"`
251
250
# Remove `python -m` to avoid running tests with relative modules
252
251
PL_DEVICE=${DEVICENAME} pytest tests/ $COVERAGE_FLAGS --splits 7 --group ${{ matrix.group }} \
@@ -268,7 +267,7 @@ jobs:
268
267
uses : actions/upload-artifact@v3
269
268
with :
270
269
name : ubuntu-codecov-results-python
271
- path : ./main/ .coverage-${{ github.job }}-${{ matrix.pl_backend }}-${{ matrix.group }}
270
+ path : ./.coverage-${{ github.job }}-${{ matrix.pl_backend }}-${{ matrix.group }}
272
271
if-no-files-found : error
273
272
274
273
upload-to-codecov-linux-python :
@@ -280,7 +279,6 @@ jobs:
280
279
uses : actions/checkout@v4
281
280
with :
282
281
fetch-tags : true
283
- path : main
284
282
285
283
- name : Download coverage reports
286
284
uses : actions/download-artifact@v3
0 commit comments