You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2022/07/06 23:32:45 UTC
[arrow] branch master updated: ARROW-13160: [CI][C++] Use binary caching for vcpkg builds (#13507)
This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 36211f4822 ARROW-13160: [CI][C++] Use binary caching for vcpkg builds (#13507)
36211f4822 is described below
commit 36211f4822aa68a68923b19cb1e4a8e4443b24ff
Author: Jacob Wujciak-Jens <ja...@wujciak.de>
AuthorDate: Thu Jul 7 01:32:38 2022 +0200
ARROW-13160: [CI][C++] Use binary caching for vcpkg builds (#13507)
Authored-by: Jacob Wujciak-Jens <ja...@wujciak.de>
Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
dev/tasks/python-wheels/github.osx.amd64.yml | 30 ++++++++++++++++++----------
dev/tasks/vcpkg-tests/github.windows.yml | 18 +++++++++++++++++
2 files changed, 37 insertions(+), 11 deletions(-)
diff --git a/dev/tasks/python-wheels/github.osx.amd64.yml b/dev/tasks/python-wheels/github.osx.amd64.yml
index b647c3c7f4..f83a4c1bf5 100644
--- a/dev/tasks/python-wheels/github.osx.amd64.yml
+++ b/dev/tasks/python-wheels/github.osx.amd64.yml
@@ -36,6 +36,8 @@ jobs:
build:
name: Build wheel for OS X
runs-on: macos-10.15
+ env:
+ VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
steps:
{{ macros.github_checkout_arrow()|indent }}
@@ -51,14 +53,7 @@ jobs:
vcpkg_version=$(cat "arrow/.env" | grep "VCPKG" | cut -d "=" -f2 | tr -d '"')
echo "VCPKG_VERSION=$vcpkg_version" >> $GITHUB_ENV
- - uses: actions/cache@v2
- id: vcpkg-cache
- with:
- path: vcpkg
- key: vcpkg-{{ macos_deployment_target }}-{{ "${{ env.VCPKG_VERSION }}" }}-{{ "${{ hashFiles('arrow/ci/vcpkg/vcpkg.json', 'arrow/ci/vcpkg/*.patch', 'arrow/ci/vcpkg/*osx*.cmake') }}" }}-0
-
- name: Install Vcpkg
- if: steps.vcpkg-cache.outputs.cache-hit != 'true'
shell: bash
env:
MACOSX_DEPLOYMENT_TARGET: "10.15"
@@ -68,10 +63,23 @@ jobs:
shell: bash
run: echo ${VCPKG_ROOT} >> $GITHUB_PATH
- # workaround for https://github.com/apache/arrow/pull/11569#issuecomment-979592053
- - name: Install OpenSSL
- run: vcpkg install openssl
-
+ - name: Setup NuGet Credentials
+ shell: bash
+ env:
+ GITHUB_TOKEN: {{ '${{ secrets.GITHUB_TOKEN }}' }}
+ run: |
+ mono `vcpkg fetch nuget | tail -n 1` \
+ sources add \
+ -source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json" \
+ -storepasswordincleartext \
+ -name "GitHub" \
+ -username "$GITHUB_REPOSITORY_OWNER" \
+ -password "$GITHUB_TOKEN" \
+
+ mono `vcpkg fetch nuget | tail -n 1` \
+ setapikey "$GITHUB_TOKEN" \
+ -source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json"
+
- name: Install Packages
run: |
if [ "${ARROW_S3}" == "ON" ]; then
diff --git a/dev/tasks/vcpkg-tests/github.windows.yml b/dev/tasks/vcpkg-tests/github.windows.yml
index 2877d20868..093ae3fc53 100644
--- a/dev/tasks/vcpkg-tests/github.windows.yml
+++ b/dev/tasks/vcpkg-tests/github.windows.yml
@@ -28,6 +28,8 @@ jobs:
test-vcpkg-win:
name: Install build deps with vcpkg and build Arrow C++
runs-on: windows-2019
+ env:
+ VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
steps:
- name: Checkout Arrow
run: |
@@ -55,6 +57,22 @@ jobs:
CALL bootstrap-vcpkg.bat -win64 -disableMetrics
CALL vcpkg integrate install
CALL setx PATH "%PATH%;C:\vcpkg"
+ - name: Setup NuGet Credentials
+ shell: bash
+ env:
+ GITHUB_TOKEN: {{ '${{ secrets.GITHUB_TOKEN }}' }}
+ run: |
+ `vcpkg fetch nuget | tail -n 1` \
+ sources add \
+ -source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json" \
+ -storepasswordincleartext \
+ -name "GitHub" \
+ -username "$GITHUB_REPOSITORY_OWNER" \
+ -password "$GITHUB_TOKEN" \
+
+ `vcpkg fetch nuget | tail -n 1` \
+ setapikey "$GITHUB_TOKEN" \
+ -source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json"
- name: Install Dependencies with vcpkg and Build Arrow C++
shell: cmd
run: |