From eec7da1c28e78c7a8d5736a6c426988b69006dbc Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sun, 29 Jun 2025 19:15:53 -0400 Subject: [PATCH] Fix Windows build with msys2 secp256k1 --- .github/workflows/python-ci.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index e0f5de1..321da26 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -17,17 +17,28 @@ jobs: - uses: actions/setup-python@v4 with: python-version: '3.11' - - name: Install build tools + - name: Install build tools (Linux/macOS) + if: runner.os != 'Windows' shell: bash run: | if [ "$RUNNER_OS" = "Linux" ]; then sudo apt-get update sudo apt-get install -y pkg-config build-essential - elif [ "$RUNNER_OS" = "macOS" ]; then - brew install pkg-config else - choco install pkgconfiglite -y + brew install pkg-config fi + - name: Install MSYS2 and libsecp256k1 + if: runner.os == 'Windows' + id: msys + uses: msys2/setup-msys2@v2 + with: + install: >- + mingw-w64-x86_64-toolchain + mingw-w64-x86_64-libsecp256k1 + - name: Set libsecp256k1 path + if: runner.os == 'Windows' + shell: bash + run: echo "SECP256K1_LIB_DIR=${{ steps.msys.outputs.msys2-location }}/mingw64" >> $GITHUB_ENV - name: Cache pip uses: actions/cache@v3 with: