diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c45ceaa63..f70432267 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,15 +27,6 @@ jobs: steps: - # Get vcpython27 on Windows + Python 2.7, to build netifaces - # extension. See https://chocolatey.org/packages/vcpython27 and - # https://github.com/crazy-max/ghaction-chocolatey - - name: Install MSVC 9.0 for Python 2.7 [Windows] - if: matrix.os == 'windows-latest' && matrix.python-version == '2.7' - uses: crazy-max/ghaction-chocolatey@v1 - with: - args: install vcpython27 - # See https://github.com/actions/checkout. A fetch-depth of 0 # fetches all tags and branches. - name: Check out Tahoe-LAFS sources @@ -44,10 +35,35 @@ jobs: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} + if: ${{ matrix.os != 'windows-latest' }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} + # See note below about need for using 32-bit Python 2.7 on + # Windows. The extra handling here for Python 3.6 on Windows is + # because I could not figure out the right GitHub Actions + # expression to do this in a better way. + - name: Set up Python ${{ matrix.python-version }} [Windows x64] + if: ${{ ( matrix.os == 'windows-latest' ) && ( matrix.python-version == '3.6' ) }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + architecture: 'x64' + + # We use netifaces, which does not ship a 64-bit wheel for the + # Python 2.7 + Windows combination, but it ships a 32-bit wheel. + # Since MS has removed vcpython27 compiler downloads from their + # usual download site, building a netifaces wheel locally is not + # an option anymore. So let us just test with 32-bit Python on + # Windows. + - name: Set up Python ${{ matrix.python-version }} [Windows x86] + if: ${{ ( matrix.os == 'windows-latest' ) && ( matrix.python-version == '2.7' ) }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + architecture: 'x86' + # To use pip caching with GitHub Actions in an OS-independent # manner, we need `pip cache dir` command, which became # available since pip v20.1+. At the time of writing this, @@ -164,15 +180,6 @@ jobs: steps: - # Get vcpython27 for Windows + Python 2.7, to build netifaces - # extension. See https://chocolatey.org/packages/vcpython27 and - # https://github.com/crazy-max/ghaction-chocolatey - - name: Install MSVC 9.0 for Python 2.7 [Windows] - if: matrix.os == 'windows-latest' && matrix.python-version == '2.7' - uses: crazy-max/ghaction-chocolatey@v1 - with: - args: install vcpython27 - - name: Install Tor [Ubuntu] if: matrix.os == 'ubuntu-latest' run: sudo apt install tor @@ -193,10 +200,19 @@ jobs: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} + if: ${{ matrix.os != 'windows-latest' }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} + # See this step under coverage job. + - name: Set up Python ${{ matrix.python-version }} [Windows x86] + if: ${{ matrix.os == 'windows-latest' }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + architecture: 'x86' + - name: Get pip cache directory id: pip-cache run: | @@ -242,25 +258,25 @@ jobs: steps: - # Get vcpython27 for Windows + Python 2.7, to build netifaces - # extension. See https://chocolatey.org/packages/vcpython27 and - # https://github.com/crazy-max/ghaction-chocolatey - - name: Install MSVC 9.0 for Python 2.7 [Windows] - if: matrix.os == 'windows-latest' && matrix.python-version == '2.7' - uses: crazy-max/ghaction-chocolatey@v1 - with: - args: install vcpython27 - - name: Check out Tahoe-LAFS sources uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} + if: ${{ matrix.os != 'windows-latest' }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} + # See this step under coverage job. + - name: Set up Python ${{ matrix.python-version }} [Windows x86] + if: ${{ matrix.os == 'windows-latest' }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + architecture: 'x86' + - name: Get pip cache directory id: pip-cache run: | diff --git a/newsfragments/3681.installation b/newsfragments/3681.installation new file mode 100644 index 000000000..a697e6c60 --- /dev/null +++ b/newsfragments/3681.installation @@ -0,0 +1,3 @@ +Tahoe-LAFS CI now runs tests only on 32-bit Windows. Microsoft has +removed vcpython27 compiler downloads from their site, and Tahoe-LAFS +needs vcpython27 to build and install netifaces on 64-bit Windows.