Skip to content

Commit 3454636

Browse files
author
unknown
committed
1 parent 5f12f47 commit 3454636

File tree

3,069 files changed

+209
-221712
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,069 files changed

+209
-221712
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
version: 2
23

34
jobs:

.github/workflows/cache_vcpkg.yml

Lines changed: 0 additions & 109 deletions
This file was deleted.

.github/workflows/crossbow.yml

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
19+
# NOTE: must set "Crossbow" as name to have the badge links working in the
20+
# github comment reports!
21+
name: Crossbow
22+
on:
23+
push:
24+
branches:
25+
- "*-github-*"
26+
27+
env:
28+
ARCHERY_DEBUG: 1
29+
30+
31+
jobs:
32+
build:
33+
name: "Build wheel for Windows"
34+
runs-on: windows-2022
35+
env:
36+
# archery uses this environment variable
37+
PYTHON: "3.10"
38+
PYTHON_ABI_TAG: "cp310"
39+
# this is a private repository at the moment (mostly because of licensing
40+
# consideration of windows images with visual studio), but anyone can
41+
# recreate the image by manually building it via:
42+
# `archery build python-wheel-windows-vs2022`
43+
# note that we don't run docker build since there wouldn't be a cache hit
44+
# and rebuilding the dependencies takes a fair amount of time
45+
REPO: ghcr.io/ursacomputing/arrow
46+
# BuildKit isn't really supported on Windows for now.
47+
# NuGet + GitHub Packages based vcpkg cache is also disabled for now.
48+
# Because secret mount requires BuildKit.
49+
DOCKER_BUILDKIT: 0
50+
51+
steps:
52+
- name: Checkout Arrow
53+
uses: actions/checkout@v4
54+
with:
55+
fetch-depth: 1
56+
path: arrow
57+
repository: apache/arrow
58+
ref: c753740f93254c4baa6dc9437956ed60f7ca5bdb
59+
submodules: recursive
60+
61+
- name: Login to GitHub Container Registry
62+
uses: docker/login-action@v2
63+
with:
64+
registry: ghcr.io
65+
username: ${{ github.actor }}
66+
password: ${{ secrets.GITHUB_TOKEN }}
67+
68+
- name: Set up Python
69+
uses: actions/setup-python@v4
70+
with:
71+
cache: 'pip'
72+
python-version: 3.12
73+
- name: Install Archery
74+
shell: bash
75+
run: pip install -e arrow/dev/archery[all]
76+
77+
78+
- name: Prepare
79+
shell: bash
80+
run: |
81+
case "${PYTHON_ABI_TAG}" in
82+
*t)
83+
test_image_prefix=python-free-threaded
84+
;;
85+
*)
86+
test_image_prefix=python
87+
;;
88+
esac
89+
echo "TEST_IMAGE_PREFIX=${test_image_prefix}" >> ${GITHUB_ENV}
90+
91+
- name: Build wheel
92+
shell: cmd
93+
run: |
94+
cd arrow
95+
@rem We want to use only
96+
@rem archery docker run -e SETUPTOOLS_SCM_PRETEND_VERSION=20.0.0.dev230 python-wheel-windows-vs2022
97+
@rem but it doesn't use pulled caches.
98+
@rem It always build an image from scratch.
99+
@rem We can remove this workaround once we find a way to use
100+
@rem pulled caches when build an image.
101+
echo on
102+
archery docker pull --no-ignore-pull-failures %TEST_IMAGE_PREFIX%-wheel-windows-vs2022
103+
if errorlevel 1 (
104+
archery docker build --no-pull %TEST_IMAGE_PREFIX%-wheel-windows-vs2022 || exit /B 1
105+
)
106+
archery docker run --no-build -e SETUPTOOLS_SCM_PRETEND_VERSION=20.0.0.dev230 %TEST_IMAGE_PREFIX%-wheel-windows-vs2022
107+
108+
- uses: actions/upload-artifact@v4
109+
with:
110+
name: wheel
111+
path: arrow/python/repaired_wheels/*.whl
112+
113+
- name: Test wheel
114+
shell: cmd
115+
run: |
116+
cd arrow
117+
archery docker pull --no-ignore-pull-failures %TEST_IMAGE_PREFIX%-wheel-windows-test
118+
if errorlevel 1 (
119+
archery docker build --no-pull %TEST_IMAGE_PREFIX%-wheel-windows-test || exit /B 1
120+
)
121+
archery docker run %TEST_IMAGE_PREFIX%-wheel-windows-test
122+
123+
- name: Set up Python
124+
uses: actions/setup-python@v4
125+
with:
126+
python-version: 3.12
127+
- name: Checkout Crossbow
128+
uses: actions/checkout@v4
129+
with:
130+
path: crossbow
131+
ref: nightly-packaging-2025-03-26-0
132+
- name: Setup Crossbow
133+
shell: bash
134+
run: |
135+
python3 -m pip install -e arrow/dev/archery[crossbow]
136+
echo "$HOME/.local/bin" >> $GITHUB_PATH
137+
- name: Upload artifacts
138+
shell: bash
139+
run: |
140+
archery crossbow \
141+
--queue-path $(pwd)/crossbow \
142+
--queue-remote https://github.com/ursacomputing/crossbow \
143+
upload-artifacts \
144+
--sha nightly-packaging-2025-03-26-0-github-wheel-windows-cp310-cp310-amd64 \
145+
--tag nightly-packaging-2025-03-26-0-github-wheel-windows-cp310-cp310-amd64 \
146+
"arrow/python/repaired_wheels/*.whl"
147+
env:
148+
CROSSBOW_GITHUB_TOKEN: ${{ secrets.CROSSBOW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
149+
- name: Verify uploaded artifacts
150+
shell: bash
151+
run: |
152+
archery crossbow \
153+
--queue-path $(pwd)/crossbow \
154+
--queue-remote https://github.com/ursacomputing/crossbow \
155+
status \
156+
--task-filter 'wheel-windows-cp310-cp310-amd64' \
157+
--no-fetch \
158+
--validate \
159+
nightly-packaging-2025-03-26-0
160+
env:
161+
CROSSBOW_GITHUB_TOKEN: ${{ secrets.CROSSBOW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
162+
163+
- name: Set up Ruby
164+
uses: ruby/setup-ruby@v1
165+
with:
166+
ruby-version: "ruby"
167+
- name: Install gemfury client
168+
run: |
169+
gem install gemfury
170+
- name: Upload package to Gemfury
171+
shell: bash
172+
run: |
173+
if $(fury versions --as=${CROSSBOW_GEMFURY_ORG} --api-token=${CROSSBOW_GEMFURY_TOKEN} pyarrow | grep --fixed-strings -q "20.0.0.dev230"); then
174+
echo "Version 20.0.0.dev230 already exists. Avoid pushing version."
175+
else
176+
fury push \
177+
--api-token=${CROSSBOW_GEMFURY_TOKEN} \
178+
--as=${CROSSBOW_GEMFURY_ORG} \
179+
arrow/python/repaired_wheels/*.whl
180+
fi
181+
env:
182+
CROSSBOW_GEMFURY_TOKEN: ${{ secrets.CROSSBOW_GEMFURY_TOKEN }}
183+
CROSSBOW_GEMFURY_ORG: ${{ secrets.CROSSBOW_GEMFURY_ORG }}
184+
185+
- name: Upload wheel to Anaconda scientific-python
186+
shell: bash
187+
run: |
188+
# check if completion actually expands to wheel files
189+
# to prevent empty dirs from failing silently
190+
if ! compgen -G "arrow/python/repaired_wheels/*.whl" > /dev/null; then
191+
echo "No wheel files found!"
192+
exit 1
193+
fi
194+
python3 -m pip install git+https://github.com/Anaconda-Platform/[email protected]
195+
anaconda -t ${CROSSBOW_SCIENTIFIC_PYTHON_UPLOAD_TOKEN} upload --force -u scientific-python-nightly-wheels --label main arrow/python/repaired_wheels/*.whl
196+
env:
197+
CROSSBOW_SCIENTIFIC_PYTHON_UPLOAD_TOKEN: ${{ secrets.CROSSBOW_SCIENTIFIC_PYTHON_UPLOAD_TOKEN }}
198+
199+
200+
- name: Push Docker image
201+
shell: cmd
202+
run: |
203+
cd arrow
204+
archery docker push %TEST_IMAGE_PREFIX%-wheel-windows-vs2022
205+
archery docker push %TEST_IMAGE_PREFIX%-wheel-windows-test

0 commit comments

Comments
 (0)