diff --git a/.github/actions/build_pandas/action.yml b/.github/actions/build_pandas/action.yml index e916d5bfde5fb..5e5a3bdf0f024 100644 --- a/.github/actions/build_pandas/action.yml +++ b/.github/actions/build_pandas/action.yml @@ -12,6 +12,9 @@ runs: - name: Build Pandas run: | - python setup.py build_ext -j 2 + python setup.py build_ext -j $N_JOBS python -m pip install -e . --no-build-isolation --no-use-pep517 --no-index shell: bash -el {0} + env: + # Cannot use parallel compilation on Windows, see https://github.com/pandas-dev/pandas/issues/30873 + N_JOBS: ${{ runner.os == 'Windows' && 1 || 2 }} diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index f5cbb0e88ff11..b86dcea59edb8 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -180,7 +180,6 @@ jobs: run: ci/run_tests.sh # TODO: Don't continue on error for PyPy continue-on-error: ${{ env.IS_PYPY == 'true' }} - if: always() - name: Build Version run: conda list diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000000000..6f267357554a3 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,75 @@ +name: Windows + +on: + push: + branches: + - main + - 1.4.x + pull_request: + branches: + - main + - 1.4.x + paths-ignore: + - "doc/**" + +env: + PANDAS_CI: 1 + PYTEST_TARGET: pandas + PYTEST_WORKERS: auto + PATTERN: "not slow and not db and not network and not single_cpu" + + +jobs: + pytest: + runs-on: windows-latest + defaults: + run: + shell: bash -el {0} + timeout-minutes: 90 + strategy: + matrix: + env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml] + fail-fast: false + concurrency: + # https://github.community/t/concurrecy-not-work-for-push/183068/7 + group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-windows + cancel-in-progress: true + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install Dependencies + uses: conda-incubator/setup-miniconda@v2.1.1 + with: + mamba-version: "*" + channels: conda-forge + activate-environment: pandas-dev + channel-priority: strict + environment-file: ci/deps/${{ matrix.env_file }} + use-only-tar-bz2: true + + - name: Build Pandas + uses: ./.github/actions/build_pandas + + - name: Test + run: ci/run_tests.sh + + - name: Build Version + run: conda list + + - name: Publish test results + uses: actions/upload-artifact@v3 + with: + name: Test results + path: test-data.xml + if: failure() + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2 + with: + flags: unittests + name: codecov-pandas + fail_ci_if_error: false diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f7c97f0554e0e..b2ae620019962 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,11 +27,6 @@ jobs: name: macOS vmImage: macOS-10.15 -- template: ci/azure/windows.yml - parameters: - name: Windows - vmImage: windows-2019 - - job: py38_32bit pool: vmImage: ubuntu-18.04 diff --git a/ci/azure/windows.yml b/ci/azure/windows.yml deleted file mode 100644 index 02c6564579aa2..0000000000000 --- a/ci/azure/windows.yml +++ /dev/null @@ -1,58 +0,0 @@ -parameters: - name: '' - vmImage: '' - -jobs: -- job: ${{ parameters.name }} - timeoutInMinutes: 90 - pool: - vmImage: ${{ parameters.vmImage }} - strategy: - matrix: - py38: - ENV_FILE: ci/deps/actions-38.yaml - CONDA_PY: "38" - - py39: - ENV_FILE: ci/deps/actions-39.yaml - CONDA_PY: "39" - - py310: - ENV_FILE: ci/deps/actions-310.yaml - CONDA_PY: "310" - - steps: - - powershell: | - Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" - Write-Host "##vso[task.prependpath]$HOME/miniconda3/bin" - displayName: 'Add conda to PATH' - - bash: conda install -yv -c conda-forge -n base 'mamba>=0.21.2' - displayName: 'Install mamba' - - - bash: | - # See https://github.com/mamba-org/mamba/issues/1370 - # See https://github.com/mamba-org/mamba/issues/633 - C:\\Miniconda\\condabin\\mamba.bat create -n pandas-dev - C:\\Miniconda\\condabin\\mamba.bat env update -n pandas-dev --file ci\\deps\\actions-$(CONDA_PY).yaml - # TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941 - C:\\Miniconda\\condabin\\mamba.bat install -n pandas-dev 'setuptools<60' - C:\\Miniconda\\condabin\\mamba.bat list -n pandas-dev - displayName: 'Create anaconda environment' - - bash: | - source activate pandas-dev - conda list - python setup.py build_ext -q -j 2 - python -m pip install --no-build-isolation -e . - displayName: 'Build' - - bash: | - source activate pandas-dev - wmic.exe cpu get caption, deviceid, name, numberofcores, maxclockspeed - ci/run_tests.sh - displayName: 'Test' - - task: PublishTestResults@2 - condition: succeededOrFailed() - inputs: - failTaskOnFailedTests: true - testResultsFiles: 'test-data.xml' - testRunTitle: ${{ format('{0}-$(CONDA_PY)', parameters.name) }} - displayName: 'Publish test results'