Skip to content

Commit ab0cafc

Browse files
committed
doing another way
1 parent 51d0ed9 commit ab0cafc

File tree

1 file changed

+16
-159
lines changed

1 file changed

+16
-159
lines changed

.github/workflows/wheels.yml

Lines changed: 16 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,6 @@
1-
# Workflow to build wheels for upload to PyPI.
2-
# Inspired by numpy's cibuildwheel config https://github.com/numpy/numpy/blob/main/.github/workflows/wheels.yml
3-
#
4-
# In an attempt to save CI resources, wheel builds do
5-
# not run on each push but only weekly and for releases.
6-
# Wheel builds can be triggered from the Actions page
7-
# (if you have the permissions) on a commit to main.
8-
#
9-
# Alternatively, you can add labels to the pull request in order to trigger wheel
10-
# builds.
11-
# The label(s) that trigger builds are:
12-
# - Build
13-
name: Wheel builder
1+
name: Test win_arm64 Wheel builder
142

153
on:
16-
schedule:
17-
# 3:27 UTC every day
18-
- cron: "27 3 * * *"
19-
push:
20-
pull_request:
21-
types: [labeled, opened, synchronize, reopened]
22-
paths-ignore:
23-
- "doc/**"
24-
- "web/**"
254
workflow_dispatch:
265

276
concurrency:
@@ -32,145 +11,39 @@ permissions:
3211
contents: read
3312

3413
jobs:
35-
build_sdist:
36-
name: Build sdist
37-
if: >-
38-
(github.event_name == 'schedule') ||
39-
github.event_name == 'workflow_dispatch' ||
40-
(github.event_name == 'pull_request' &&
41-
contains(github.event.pull_request.labels.*.name, 'Build')) ||
42-
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0')))
43-
runs-on: ubuntu-22.04
44-
env:
45-
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
46-
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
47-
outputs:
48-
sdist_file: ${{ steps.save-path.outputs.sdist_name }}
49-
steps:
50-
- name: Checkout pandas
51-
uses: actions/checkout@v4
52-
with:
53-
fetch-depth: 0
54-
55-
- name: Set up Python
56-
uses: actions/setup-python@v5
57-
with:
58-
python-version: '3.11'
59-
60-
- name: Build sdist
61-
run: |
62-
python -m pip install build
63-
python -m build --sdist
64-
65-
- uses: actions/upload-artifact@v4
66-
with:
67-
name: sdist
68-
path: ./dist/*
69-
70-
- name: Sanity check sdist files
71-
run: |
72-
ls ./dist
73-
74-
- name: Output sdist name
75-
id: save-path
76-
shell: bash -el {0}
77-
run: echo "sdist_name=$(ls ./dist)" >> "$GITHUB_OUTPUT"
78-
7914
build_wheels:
80-
needs: build_sdist
81-
name: Build wheel for ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
82-
if: >-
83-
(github.event_name == 'schedule') ||
84-
github.event_name == 'workflow_dispatch' ||
85-
(github.event_name == 'pull_request' &&
86-
contains(github.event.pull_request.labels.*.name, 'Build')) ||
87-
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0')))
88-
runs-on: ${{ matrix.buildplat[0] }}
15+
name: Build wheel for cp312-win_arm64
16+
runs-on: windows-11-arm
8917
strategy:
9018
fail-fast: false
9119
matrix:
92-
# GitHub Actions doesn't support pairing matrix values together, let's improvise
93-
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
9420
buildplat:
95-
- [ubuntu-22.04, manylinux_x86_64]
96-
- [ubuntu-22.04, musllinux_x86_64]
97-
- [ubuntu-24.04-arm, manylinux_aarch64]
98-
- [macos-13, macosx_x86_64]
99-
# Note: M1 images on Github Actions start from macOS 14
100-
- [macos-14, macosx_arm64]
101-
- [windows-2022, win_amd64]
10221
- [windows-11-arm, win_arm64]
103-
# TODO: support PyPy?
104-
python: [["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"], ["cp313t", "3.13"]]
105-
include:
106-
# TODO: Remove this plus installing build deps in cibw_before_build.sh
107-
# after pandas can be built with a released NumPy/Cython
108-
- python: ["cp313t", "3.13"]
109-
cibw_build_frontend: 'pip; args: --no-build-isolation'
110-
# Build Pyodide wheels and upload them to Anaconda.org
111-
# NOTE: this job is similar to the one in unit-tests.yml except for the fact
112-
# that it uses cibuildwheel instead of a standard Pyodide xbuildenv setup.
113-
- buildplat: [ubuntu-22.04, pyodide_wasm32]
114-
python: ["cp312", "3.12"]
115-
cibw_build_frontend: 'build'
22+
python: [["cp312", "3.12"]]
11623

117-
env:
118-
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
119-
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
12024
steps:
12125
- name: Checkout pandas
12226
uses: actions/checkout@v4
12327
with:
12428
fetch-depth: 0
12529

126-
# TODO: Build wheels from sdist again
127-
# There's some sort of weird race condition?
128-
# within Github that makes the sdist be missing files
129-
130-
# We need to build wheels from the sdist since the sdist
131-
# removes unnecessary files from the release
132-
- name: Download sdist (not macOS)
133-
#if: ${{ matrix.buildplat[1] != 'macosx_*' }}
134-
uses: actions/download-artifact@v4
135-
with:
136-
name: sdist
137-
path: ./dist
138-
139-
- name: Output sdist name (macOS)
140-
id: save-path
141-
shell: bash -el {0}
142-
run: echo "sdist_name=$(ls ./dist)" >> "$GITHUB_ENV"
143-
144-
# Python version used to build sdist doesn't matter
145-
# wheel will be built from sdist with the correct version
146-
- name: Unzip sdist (macOS)
147-
if: ${{ startsWith(matrix.buildplat[1], 'macosx') }}
148-
run: |
149-
tar -xzf ./dist/${{ env.sdist_name }} -C ./dist
150-
151-
- name: Output sdist name (macOS)
152-
id: save-path2
153-
shell: bash -el {0}
154-
run: echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV"
155-
15630
- name: Build wheels
15731
uses: pypa/[email protected]
15832
with:
159-
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
33+
package-dir: ./ # Build from source checkout
16034
env:
16135
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
162-
CIBW_BUILD_FRONTEND: ${{ matrix.cibw_build_frontend || 'pip' }}
163-
CIBW_PLATFORM: ${{ matrix.buildplat[1] == 'pyodide_wasm32' && 'pyodide' || 'auto' }}
36+
CIBW_BUILD_FRONTEND: 'pip'
37+
CIBW_PLATFORM: 'auto'
38+
# Add any necessary build environment variables here if needed
39+
# e.g. CIBW_BEFORE_BUILD_WINDOWS: bash scripts/cibw_before_build_windows.sh
16440

165-
- name: Set up Python
41+
- name: Set up Python for validation
16642
uses: mamba-org/setup-micromamba@v2
16743
with:
16844
environment-name: wheel-env
169-
# Use a fixed Python, since we might have an unreleased Python not
170-
# yet present on conda-forge
17145
create-args: >-
172-
python=3.11
173-
anaconda-client
46+
python=3.12
17447
wheel
17548
cache-downloads: true
17649
cache-environment: true
@@ -179,24 +52,8 @@ jobs:
17952
shell: bash -el {0}
18053
run: for whl in $(ls wheelhouse); do wheel unpack wheelhouse/$whl -d /tmp; done
18154

182-
- uses: actions/upload-artifact@v4
183-
with:
184-
name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
185-
path: ./wheelhouse/*.whl
186-
187-
- name: Upload wheels & sdist
188-
if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
189-
shell: bash -el {0}
190-
env:
191-
PANDAS_STAGING_UPLOAD_TOKEN: ${{ secrets.PANDAS_STAGING_UPLOAD_TOKEN }}
192-
PANDAS_NIGHTLY_UPLOAD_TOKEN: ${{ secrets.PANDAS_NIGHTLY_UPLOAD_TOKEN }}
193-
# trigger an upload to
194-
# https://anaconda.org/scientific-python-nightly-wheels/pandas
195-
# for cron jobs or "Run workflow" (restricted to main branch).
196-
# Tags will upload to
197-
# https://anaconda.org/multibuild-wheels-staging/pandas
198-
# The tokens were originally generated at anaconda.org
199-
run: |
200-
source ci/upload_wheels.sh
201-
set_upload_vars
202-
upload_wheels
55+
# Artifact upload is removed as per requirements
56+
# - uses: actions/upload-artifact@v4
57+
# with:
58+
# name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
59+
# path: ./wheelhouse/*.whl

0 commit comments

Comments
 (0)