From 75c14af7b49832c045bd116235bb1cf53b018367 Mon Sep 17 00:00:00 2001 From: AmintorDusko Date: Mon, 22 Apr 2024 14:19:35 -0400 Subject: [PATCH] move tests after patching wheels --- .github/workflows/wheel_win_x86_64.yml | 37 ++++++++++++++++++++------ 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/.github/workflows/wheel_win_x86_64.yml b/.github/workflows/wheel_win_x86_64.yml index fc01eb32da..97cc439ae8 100644 --- a/.github/workflows/wheel_win_x86_64.yml +++ b/.github/workflows/wheel_win_x86_64.yml @@ -127,13 +127,6 @@ jobs: CIBW_BEFORE_BUILD: | python -m pip install pybind11 cmake~=3.24.0 build - #Temporarily commenting while solving problems to find binaries in CIBW tests. - # CIBW_BEFORE_TEST: | - # python -m pip install -r requirements-tests.txt - - # CIBW_TEST_COMMAND: | - # pl-device-test --device=lightning.qubit --skip-ops -x --tb=short --no-flaky-report - CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_BUILD_VERBOSITY: 3 @@ -160,6 +153,34 @@ jobs: } cd .. + - name: Determine Python version + id: pyvs + shell: bash + run: | + echo "version=$(echo ${{ matrix.cibw_build }} | tr -cd '[:digit:].' | sed 's/./&./1')" >> $GITHUB_OUTPUT + + - uses: actions/setup-python@v5 + name: Install Python + with: + python-version: ${{ steps.pyvs.outputs.version }} + + - name: Test wheels + run: | + python -m pip install -r requirements-tests.txt + if ('${{ matrix.pl_backend }}' -eq 'lightning_kokkos'){ + $SKIP_COMPILATION=true + $PL_BACKEND="lightning_qubit" + python -m pip install -e . -vv + } + cd wheelhouse + $wheels = Get-ChildItem "./" -Filter *.whl + foreach ($i in $wheels){ + python -m pip install $i.Name + } + cd .. + $DEVICENAME=(echo ${{ matrix.pl_backend }} | %{$_ -replace "_","."}) + pl-device-test --device=$DEVICENAME --skip-ops -x --tb=short --no-flaky-report + - name: Validate wheels run: | python -m pip install twine @@ -197,4 +218,4 @@ jobs: with: user: __token__ password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository-url: https://test.pypi.org/legacy/ + repository-url: https://test.pypi.org/legacy/ \ No newline at end of file