Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-41124: [CI][C++] Don't use CMake 3.29.1 with vcpkg #41151

Merged
merged 14 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions ci/scripts/install_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ set -e

declare -A archs
archs=([amd64]=x86_64
[arm64v8]=aarch64)
[arch64]=aarch64
[arm64]=aarch64
[arm64v8]=aarch64
[x86_64]=x86_64)

declare -A platforms
platforms=([linux]=linux
Expand All @@ -38,5 +41,25 @@ platform=${platforms[$2]}
version=$3
prefix=$4

url="https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-${platform}-${arch}.tar.gz"
wget -q ${url} -O - | tar -xzf - --directory ${prefix} --strip-components=1
mkdir -p ${prefix}
url="https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-${platform}-"
case ${platform} in
macos)
url+="universal.tar.gz"
curl -L ${url} | tar -xzf - --directory ${prefix} --strip-components=1
ln -s CMake.app/Contents/bin ${prefix}/bin
;;
windows)
url+="${arch}.zip"
archive_name=$(basename ${url})
curl -L -o ${archive_name} ${url}
unzip ${archive_name}
base_name=$(basename ${archive_name} .zip)
mv ${base_name}/* ${prefix}
rm -rf ${base_name} ${archive_name}
;;
*)
url+="${arch}.tar.gz"
curl -L ${url} | tar -xzf - --directory ${prefix} --strip-components=1
;;
esac
6 changes: 4 additions & 2 deletions dev/tasks/macros.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ env:

{%- macro github_install_archery() -%}
- name: Set up Python by actions/setup-python
if: runner.arch == 'X64'
if: |
!(runner.os == 'Linux' && runner.arch != 'X64')
uses: actions/setup-python@v4
with:
cache: 'pip'
Expand All @@ -86,7 +87,8 @@ env:

{%- macro github_upload_releases(pattern) -%}
- name: Set up Python by actions/setup-python
if: runner.arch == 'X64'
if: |
!(runner.os == 'Linux' && runner.arch != 'X64')
uses: actions/setup-python@v4
with:
python-version: 3.12
Expand Down
8 changes: 8 additions & 0 deletions dev/tasks/python-wheels/github.osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ jobs:
run: |
brew list

# CMake 3.29.1 that is pre-installed on the macOS image has a problem.
# See also: https://github.com/microsoft/vcpkg/issues/37968
- name: Install CMake 3.29.0
shell: bash
run: |
arrow/ci/scripts/install_cmake.sh $(arch) macos 3.29.0 ${PWD}/local
echo "${PWD}/local/bin" >> $GITHUB_PATH

- name: Retrieve VCPKG version from arrow/.env
run: |
vcpkg_version=$(cat "arrow/.env" | grep "VCPKG" | cut -d "=" -f2 | tr -d '"')
Expand Down
3 changes: 2 additions & 1 deletion dev/tasks/vcpkg-tests/cpp-build-vcpkg.bat
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ cmake --build . --target INSTALL --config Release || exit /B 1

@rem Test Arrow C++ library

ctest --output-on-failure ^
ctest --build-config Release ^
--output-on-failure ^
--parallel %NUMBER_OF_PROCESSORS% ^
--timeout 300 || exit /B 1

Expand Down
23 changes: 10 additions & 13 deletions dev/tasks/vcpkg-tests/github.windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@
# specific language governing permissions and limitations
# under the License.

# NOTE: must set "Crossbow" as name to have the badge links working in the
# github comment reports!
name: Crossbow
{% import 'macros.jinja' as macros with context %}

on:
push:
branches:
- "*-github-*"
{{ macros.github_header() }}

jobs:
test-vcpkg-win:
Expand All @@ -31,12 +26,14 @@ jobs:
env:
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
steps:
- name: Checkout Arrow
{{ macros.github_checkout_arrow()|indent }}
# CMake 3.29.1 that is pre-installed on the Windows image has a problem.
# See also: https://github.com/microsoft/vcpkg/issues/37968
- name: Install CMake 3.29.0
shell: bash
run: |
git clone --no-checkout {{ arrow.remote }} arrow
git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
git -C arrow checkout FETCH_HEAD
git -C arrow submodule update --init --recursive
arrow/ci/scripts/install_cmake.sh amd64 windows 3.29.0 /c/cmake
echo "c:\\cmake\\bin" >> $GITHUB_PATH
- name: Download Timezone Database
shell: bash
run: arrow/ci/scripts/download_tz_database.sh
Expand All @@ -59,7 +56,7 @@ jobs:
CALL setx PATH "%PATH%;C:\vcpkg"
- name: Setup NuGet Credentials
shell: bash
env:
env:
GITHUB_TOKEN: {{ '${{ secrets.GITHUB_TOKEN }}' }}
run: |
`vcpkg fetch nuget | tail -n 1` \
Expand Down
Loading