From 16a07300aaae825abfe1fad1d0935e9791967476 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Fri, 6 May 2022 20:53:29 -0700 Subject: [PATCH 1/4] CI: Move Windows build from Azure to GHA --- .github/workflows/posix.yml | 3 +- .github/workflows/windows.yml | 76 +++++++++++++++++++++++++++++++++++ azure-pipelines.yml | 5 --- ci/azure/windows.yml | 58 -------------------------- 4 files changed, 77 insertions(+), 65 deletions(-) create mode 100644 .github/workflows/windows.yml delete mode 100644 ci/azure/windows.yml diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index f5cbb0e88ff11..c26ad2d1f3e4e 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -152,7 +152,7 @@ jobs: mamba-version: "*" channels: conda-forge activate-environment: pandas-dev - channel-priority: flexible + channel-priority: strict environment-file: ${{ env.ENV_FILE }} use-only-tar-bz2: true if: ${{ env.IS_PYPY == 'false' }} # No pypy3.8 support @@ -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..4c70ed0972c7f --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,76 @@ +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 + name: ${{ format('Windows {0}', matrix.env_file) }} + 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: ${{ 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' From 885d93890def121112e22fe9985d7f154fc5b834 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Fri, 6 May 2022 22:45:44 -0700 Subject: [PATCH 2/4] Fix env path --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 4c70ed0972c7f..ab28900c2e850 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -49,7 +49,7 @@ jobs: channels: conda-forge activate-environment: pandas-dev channel-priority: strict - environment-file: ${{ matrix.env_file }} + environment-file: ci/deps/${{ matrix.env_file }} use-only-tar-bz2: true - name: Build Pandas From e606db42217c75dc6e1ff4149968e82b23d09f2c Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Fri, 6 May 2022 23:41:09 -0700 Subject: [PATCH 3/4] No parallel for windows --- .github/actions/build_pandas/action.yml | 5 ++++- .github/workflows/windows.yml | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) 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/windows.yml b/.github/workflows/windows.yml index ab28900c2e850..6f267357554a3 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -30,7 +30,6 @@ jobs: matrix: env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml] fail-fast: false - name: ${{ format('Windows {0}', matrix.env_file) }} 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 From 04812ebdd9a1e1f29dc47a124a1bc27f0527889a Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Sat, 7 May 2022 11:33:09 -0700 Subject: [PATCH 4/4] Move back to flexible channel --- .github/workflows/posix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index c26ad2d1f3e4e..b86dcea59edb8 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -152,7 +152,7 @@ jobs: mamba-version: "*" channels: conda-forge activate-environment: pandas-dev - channel-priority: strict + channel-priority: flexible environment-file: ${{ env.ENV_FILE }} use-only-tar-bz2: true if: ${{ env.IS_PYPY == 'false' }} # No pypy3.8 support