From ecbba0c45b05b53563b23b84191a0acccdfcc291 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 6 Jul 2023 15:43:44 -0400 Subject: CI: gracefully handle jsonschema update requiring rust to build This has issues on Windows with msys2/cygwin, where we need to build it ourselves since binary wheels aren't supported on PyPI. And we don't have a rust compiler available for either one -- we may not be *able* to do so for cygwin? For msys2, the solution is pretty easy, just rely on the official msys2 packages for jsonschema, which handle both it and its dependencies for us and don't require us to compile anything. Currently they still have an older jsonschema that doesn't use rust deps at all, but that's because the new jsonschema was released today. We'll automatically catch up at some point. For cygwin, there is no rust compiler in the cygwin repository, and jsonschema there is old as the hills. I do not know if there's a good answer here, but an adequate answer is to cap jsonschema at the version we were testing with yesterday. --- .github/workflows/cygwin.yml | 3 ++- .github/workflows/msys2.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 9a77cad..e62c745 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -76,7 +76,8 @@ jobs: - name: Run pip run: | export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32 - python3 -m pip --disable-pip-version-check install gcovr jsonschema pefile pytest pytest-subtests pytest-xdist coverage + # jsonschema is max capped because the new version depends on rust dependencies which are... hard to get on cygwin + python3 -m pip --disable-pip-version-check install gcovr 'jsonschema<4.18' pefile pytest pytest-subtests pytest-xdist coverage shell: C:\cygwin\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}' - uses: actions/cache/save@v3 diff --git a/.github/workflows/msys2.yml b/.github/workflows/msys2.yml index 7f6d39e..8f1823d 100644 --- a/.github/workflows/msys2.yml +++ b/.github/workflows/msys2.yml @@ -83,11 +83,12 @@ jobs: mingw-w64-${{ matrix.MSYS2_ARCH }}-python-lxml mingw-w64-${{ matrix.MSYS2_ARCH }}-python-setuptools mingw-w64-${{ matrix.MSYS2_ARCH }}-python-pip + mingw-w64-${{ matrix.MSYS2_ARCH }}-python-jsonschema mingw-w64-${{ matrix.MSYS2_ARCH }}-${{ matrix.TOOLCHAIN }} - name: Install dependencies run: | - python3 -m pip --disable-pip-version-check install gcovr jsonschema pefile pytest pytest-subtests pytest-xdist coverage + python3 -m pip --disable-pip-version-check install gcovr pefile pytest pytest-subtests pytest-xdist coverage - name: Install pypy3 on x86_64 run: | -- cgit v1.1