From fc89dd4a2bc33504cd0b1c02ae74b39509df52f5 Mon Sep 17 00:00:00 2001 From: Hugo Herter Date: Wed, 5 Mar 2025 12:07:47 +0100 Subject: [PATCH 1/6] Fix: Tests were not running on Windows --- .github/workflows/pytest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index f1af47c5..5777e388 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: python-version: [ "3.9", "3.10", "3.11", "3.12" ] - os: [ubuntu-22.04, ubuntu-24.04] + os: [ubuntu-22.04, ubuntu-24.04, windows-2022] runs-on: ${{ matrix.os }} steps: From 87aea6c03b49c33d2a4743043489a319b42ed57c Mon Sep 17 00:00:00 2001 From: Hugo Herter Date: Tue, 11 Mar 2025 15:07:53 +0100 Subject: [PATCH 2/6] Fix: apt is not on Windows --- .github/workflows/pytest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 5777e388..9ff7c808 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -29,6 +29,7 @@ jobs: - run: | sudo apt-get update sudo apt-get install -y python3-pip libsodium-dev + if: runner.os == 'Linux' - run: | python3 -m venv /tmp/venv From 5dfbab3ea09d7bb46b79b63d0b10e4554314dc1a Mon Sep 17 00:00:00 2001 From: Hugo Herter Date: Tue, 11 Mar 2025 15:11:57 +0100 Subject: [PATCH 3/6] Copilot suggestion --- .github/workflows/pytest.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 9ff7c808..506ec160 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -6,9 +6,6 @@ on: branches: - main schedule: - # Run every night at 04:00 (GitHub Actions timezone) - # in order to catch when unfrozen dependency updates - # break the use of the library. - cron: '4 0 * * *' jobs: @@ -34,13 +31,30 @@ jobs: - run: | python3 -m venv /tmp/venv /tmp/venv/bin/python -m pip install --upgrade pip hatch coverage - + if: runner.os == 'Linux' + + - run: | + python -m venv /tmp/venv + /tmp/venv/Scripts/python -m pip install --upgrade pip hatch coverage + if: runner.os == 'Windows' + - run: | /tmp/venv/bin/pip freeze /tmp/venv/bin/hatch run testing:pip freeze /tmp/venv/bin/hatch run testing:test + if: runner.os == 'Linux' + + - run: | + /tmp/venv/Scripts/pip freeze + /tmp/venv/Scripts/hatch run testing:pip freeze + /tmp/venv/Scripts/hatch run testing:test + if: runner.os == 'Windows' - run: /tmp/venv/bin/hatch run testing:cov + if: runner.os == 'Linux' + + - run: /tmp/venv/Scripts/hatch run testing:cov + if: runner.os == 'Windows' - uses: codecov/codecov-action@v4.0.1 with: From 68296e1a7df3883b219a1a7d56d2f206a258194a Mon Sep 17 00:00:00 2001 From: Hugo Herter Date: Tue, 11 Mar 2025 15:21:38 +0100 Subject: [PATCH 4/6] Try choco command --- .github/workflows/pytest.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 506ec160..b99d45cb 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -37,6 +37,9 @@ jobs: python -m venv /tmp/venv /tmp/venv/Scripts/python -m pip install --upgrade pip hatch coverage if: runner.os == 'Windows' + + - run: choco install pkgconfiglite + if: runner.os == 'Windows' - run: | /tmp/venv/bin/pip freeze From e41fd7bf9a06efbb91d573fecd7dd628dcbd53ae Mon Sep 17 00:00:00 2001 From: Hugo Herter Date: Tue, 11 Mar 2025 15:32:26 +0100 Subject: [PATCH 5/6] fixup! Try choco command --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 42156baf..b26ef252 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ dependencies = [ "aiohttp>=3.8.3", "aioresponses>=0.7.6", "aleph-message>=0.6", - "aleph-superfluid>=0.2.1", + "aleph-superfluid>=0.2.2", "base58==2.1.1", # Needed now as default with _load_account changement "coincurve; python_version<'3.11'", "coincurve>=19; python_version>='3.11'", From 2aec4b11c2de1402faf85b1bb4dbf2aa7dcb6e8f Mon Sep 17 00:00:00 2001 From: Hugo Herter Date: Tue, 11 Mar 2025 15:40:00 +0100 Subject: [PATCH 6/6] LLM suggestion --- .github/workflows/pytest.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index b99d45cb..610bddfd 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -40,6 +40,20 @@ jobs: - run: choco install pkgconfiglite if: runner.os == 'Windows' + + - name: Set up vcpkg + uses: lukka/get-vcpkg@v12 + with: + vcpkgGitCommitId: 'latest' + if: runner.os == 'Windows' + + - name: Install GMP + run: vcpkg install gmp + if: runner.os == 'Windows' + + - name: Build project + run: cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake + if: runner.os == 'Windows' - run: | /tmp/venv/bin/pip freeze