зеркало из https://github.com/microsoft/LightGBM.git
[ci] Skip Arrow tests on AppVeyor, use Intel macOS runners, upgrade to XCode 14.3 on macOS jobs, disable MacOS MPI jobs (#6425)
This commit is contained in:
Родитель
14435485bd
Коммит
92a8741b9c
|
@ -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
|
||||
sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer || exit 1
|
||||
if [[ $TASK != "mpi" ]]; then
|
||||
brew install gcc
|
||||
fi
|
||||
|
|
|
@ -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") {
|
||||
|
|
|
@ -27,30 +27,32 @@ 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
|
||||
task: mpi
|
||||
method: source
|
||||
python_version: '3.10'
|
||||
- os: macOS-latest
|
||||
task: mpi
|
||||
method: pip
|
||||
python_version: '3.11'
|
||||
- os: macOS-latest
|
||||
task: mpi
|
||||
method: wheel
|
||||
python_version: '3.8'
|
||||
# We're currently skipping MPI jobs on macOS, see https://github.com/microsoft/LightGBM/pull/6425
|
||||
# for further details.
|
||||
# - os: macos-13
|
||||
# task: mpi
|
||||
# method: source
|
||||
# python_version: '3.10'
|
||||
# - os: macos-13
|
||||
# task: mpi
|
||||
# method: pip
|
||||
# python_version: '3.11'
|
||||
# - os: macos-13
|
||||
# task: mpi
|
||||
# method: wheel
|
||||
# python_version: '3.8'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
@ -63,7 +65,7 @@ jobs:
|
|||
export TASK="${{ matrix.task }}"
|
||||
export METHOD="${{ matrix.method }}"
|
||||
export PYTHON_VERSION="${{ matrix.python_version }}"
|
||||
if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then
|
||||
if [[ "${{ matrix.os }}" == "macos-13" ]]; then
|
||||
export COMPILER="gcc"
|
||||
export OS_NAME="macos"
|
||||
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
|
||||
|
|
|
@ -63,13 +63,13 @@ jobs:
|
|||
r_version: 4.3
|
||||
build_type: cmake
|
||||
container: 'ubuntu:22.04'
|
||||
- os: macOS-latest
|
||||
- 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
|
||||
|
@ -128,7 +128,7 @@ jobs:
|
|||
r_version: 4.3
|
||||
build_type: cran
|
||||
container: 'ubuntu:22.04'
|
||||
- os: macOS-latest
|
||||
- os: macos-13
|
||||
task: r-package
|
||||
compiler: clang
|
||||
r_version: 4.3
|
||||
|
@ -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"
|
||||
|
|
|
@ -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 #
|
||||
# ----------------------------------------------------------------------------------------------- #
|
||||
|
|
Загрузка…
Ссылка в новой задаче