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

[ci] Skip Arrow tests on AppVeyor, use Intel macOS runners, upgrade to XCode 14.3 on macOS jobs, disable MacOS MPI jobs #6425

Merged
merged 19 commits into from
Apr 29, 2024
4 changes: 3 additions & 1 deletion .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ if [[ $OS_NAME == "macos" ]]; then
sudo xcode-select -s /Applications/Xcode_11.7.app/Contents/Developer || exit 1
fi
else # gcc
sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer || exit 1
# Check https://github.com/actions/runner-images/tree/main/images/macos for available
# versions of Xcode
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot to say earlier... thanks very much for adding this comment on an otherwise kind of magical hard-coded string here 😁

sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer || exit 1
if [[ $TASK != "mpi" ]]; then
brew install gcc
fi
Expand Down
1 change: 1 addition & 0 deletions .ci/test_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function Check-Output {
# unify environment variable for Azure DevOps and AppVeyor
if (Test-Path env:APPVEYOR) {
$env:APPVEYOR = "true"
$env:ALLOW_SKIP_ARROW_TESTS = "1"
}

if ($env:TASK -eq "r-package") {
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/python_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,27 @@ jobs:
fail-fast: false
matrix:
include:
- os: macOS-latest
- os: macos-13
task: regular
python_version: '3.9'
- os: macOS-latest
- os: macos-13
task: sdist
python_version: '3.10'
- os: macOS-latest
- os: macos-13
task: bdist
python_version: '3.7'
- os: macOS-latest
- os: macos-13
task: if-else
python_version: '3.9'
- os: macOS-latest
- os: macos-13
task: mpi
method: source
python_version: '3.10'
- os: macOS-latest
- os: macos-13
task: mpi
method: pip
python_version: '3.11'
- os: macOS-latest
- os: macos-13
task: mpi
method: wheel
python_version: '3.8'
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/r_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: R-package
on:
push:
branches:
- master
- master
borchero marked this conversation as resolved.
Show resolved Hide resolved
pull_request:
branches:
- master
- release/*
- master
- release/*

# automatically cancel in-progress builds if another commit is pushed
concurrency:
Expand Down Expand Up @@ -44,32 +44,32 @@ jobs:
compiler: gcc
r_version: 3.6
build_type: cmake
container: 'ubuntu:18.04'
container: "ubuntu:18.04"
- os: ubuntu-latest
task: r-package
compiler: gcc
r_version: 4.3
build_type: cmake
container: 'ubuntu:22.04'
container: "ubuntu:22.04"
- os: ubuntu-latest
task: r-package
compiler: clang
r_version: 3.6
build_type: cmake
container: 'ubuntu:18.04'
container: "ubuntu:18.04"
- os: ubuntu-latest
task: r-package
compiler: clang
r_version: 4.3
build_type: cmake
container: 'ubuntu:22.04'
- os: macOS-latest
container: "ubuntu:22.04"
- os: macos-13
task: r-package
compiler: gcc
r_version: 4.3
build_type: cmake
container: null
- os: macOS-latest
- os: macos-13
task: r-package
compiler: clang
r_version: 4.3
Expand Down Expand Up @@ -127,8 +127,8 @@ jobs:
compiler: gcc
r_version: 4.3
build_type: cran
container: 'ubuntu:22.04'
- os: macOS-latest
container: "ubuntu:22.04"
- os: macos-13
task: r-package
compiler: clang
r_version: 4.3
Expand Down Expand Up @@ -184,13 +184,13 @@ jobs:
CTAN_MIRROR: https://ctan.math.illinois.edu/systems/win32/miktex
TINYTEX_INSTALLER: TinyTeX
- name: Setup and run tests on Linux and macOS
if: matrix.os == 'macOS-latest' || matrix.os == 'ubuntu-latest'
if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-latest'
shell: bash
run: |
export TASK="${{ matrix.task }}"
export COMPILER="${{ matrix.compiler }}"
export GITHUB_ACTIONS="true"
if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then
if [[ "${{ matrix.os }}" == "macos-13" ]]; then
export OS_NAME="macos"
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
export OS_NAME="linux"
Expand Down Expand Up @@ -308,7 +308,7 @@ jobs:
runs-on: ubuntu-latest
needs: [test, test-r-sanitizers, test-r-debian-clang]
steps:
- name: Note that all tests succeeded
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}
- name: Note that all tests succeeded
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}
11 changes: 10 additions & 1 deletion tests/python_package_test/test_arrow.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
# coding: utf-8
import filecmp
import os
from pathlib import Path
from typing import Any, Dict, Optional

import numpy as np
import pyarrow as pa
import pytest

import lightgbm as lgb

from .utils import np_assert_array_equal

# NOTE: In the AppVeyor CI, importing pyarrow fails due to an old Visual Studio version. Hence,
# we conditionally import pyarrow here (and skip tests if it cannot be imported). However, we
# don't want these tests to silently be skipped, hence, we only conditionally import when a
# specific env var is set.
if os.getenv("ALLOW_SKIP_ARROW_TESTS") == "1":
pa = pytest.importorskip("pyarrow")
else:
import pyarrow as pa # type: ignore

# ----------------------------------------------------------------------------------------------- #
# UTILITIES #
# ----------------------------------------------------------------------------------------------- #
Expand Down
Loading