Skip to content

Commit

Permalink
Reuse cache setup
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Nov 7, 2024
1 parent d865f52 commit 5a7981a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
7 changes: 6 additions & 1 deletion ci/docker/python-wheel-windows-vs2019.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,17 @@ RUN setx path "%path%;C:\Program Files\Git\usr\bin"
#
# Compiling vcpkg itself from a git tag doesn't work anymore since vcpkg has
# started to ship precompiled binaries for the vcpkg-tool.
ARG GITHUB_REPOSITORY_OWNER
ARG GITHUB_TOKEN
ARG vcpkg
COPY ci/vcpkg/*.patch \
ci/vcpkg/*windows*.cmake \
arrow/ci/vcpkg/
COPY ci/scripts/install_vcpkg.sh arrow/ci/scripts/
ENV VCPKG_ROOT=C:\\vcpkg
ENV GITHUB_REPOSITORY_OWNER="${GITHUB_REPOSITORY_OWNER}" \
GITHUB_TOKEN="${GITHUB_TOKEN}" \
VCPKG_BINARY_SOURCES="clear;nuget,GitHub,readwrite" \
VCPKG_ROOT=C:\\vcpkg
RUN bash arrow/ci/scripts/install_vcpkg.sh /c/vcpkg %vcpkg% && \
setx PATH "%PATH%;%VCPKG_ROOT%"

Expand Down
8 changes: 6 additions & 2 deletions ci/scripts/install_vcpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,18 @@ if [ -n "${GITHUB_TOKEN:-}" ] && [ -n "${GITHUB_REPOSITORY_OWNER:-}" ]; then
fi
PATH="${vcpkg_destination}:${PATH}"
nuget_url="https://nuget.pkg.github.com/${GITHUB_REPOSITORY_OWNER}/index.json"
mono $(vcpkg fetch nuget | tail -n 1) \
nuget="$(vcpkg fetch nuget | tail -n 1)"
if type mono 2>/dev/null; then
nuget="mono ${nuget}"
fi
${nuget} \
sources add \
-source "${nuget_url}" \
-storepasswordincleartext \
-name "GitHub" \
-username "${GITHUB_REPOSITORY_OWNER}" \
-password "${GITHUB_TOKEN}"
mono $(vcpkg fetch nuget | tail -n 1) \
${nuget} \
setapikey "${GITHUB_TOKEN}" \
-source "${nuget_url}"
fi
Expand Down
4 changes: 2 additions & 2 deletions dev/tasks/python-wheels/github.linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ jobs:

- name: Build wheel
shell: bash
env:
GITHUB_TOKEN: {{ '${{ secrets.GITHUB_TOKEN }}' }}
run: |
archery docker run \
-e SETUPTOOLS_SCM_PRETEND_VERSION={{ arrow.no_rc_version }} \
python-wheel-manylinux-{{ manylinux_version }}
env:
GITHUB_TOKEN: {{ '${{ secrets.GITHUB_TOKEN }}' }}
- uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions dev/tasks/python-wheels/github.windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:

- name: Build wheel
shell: cmd
env:
GITHUB_TOKEN: {{ '${{ secrets.GITHUB_TOKEN }}' }}
run: |
cd arrow
@rem We want to use only
Expand Down

0 comments on commit 5a7981a

Please sign in to comment.