File tree Expand file tree Collapse file tree 5 files changed +38
-24
lines changed
tests/python_package_test Expand file tree Collapse file tree 5 files changed +38
-24
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ if [[ $OS_NAME == "macos" ]]; then
17
17
sudo xcode-select -s /Applications/Xcode_11.7.app/Contents/Developer || exit 1
18
18
fi
19
19
else # gcc
20
- sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer || exit 1
20
+ # Check https://github.com/actions/runner-images/tree/main/images/macos for available
21
+ # versions of Xcode
22
+ sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer || exit 1
21
23
if [[ $TASK != " mpi" ]]; then
22
24
brew install gcc
23
25
fi
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ function Check-Output {
9
9
# unify environment variable for Azure DevOps and AppVeyor
10
10
if (Test-Path env:APPVEYOR) {
11
11
$env: APPVEYOR = " true"
12
+ $env: ALLOW_SKIP_ARROW_TESTS = " 1"
12
13
}
13
14
14
15
if ($env: TASK -eq " r-package" ) {
Original file line number Diff line number Diff line change @@ -27,30 +27,32 @@ jobs:
27
27
fail-fast : false
28
28
matrix :
29
29
include :
30
- - os : macOS-latest
30
+ - os : macos-13
31
31
task : regular
32
32
python_version : ' 3.9'
33
- - os : macOS-latest
33
+ - os : macos-13
34
34
task : sdist
35
35
python_version : ' 3.10'
36
- - os : macOS-latest
36
+ - os : macos-13
37
37
task : bdist
38
38
python_version : ' 3.7'
39
- - os : macOS-latest
39
+ - os : macos-13
40
40
task : if-else
41
41
python_version : ' 3.9'
42
- - os : macOS-latest
43
- task : mpi
44
- method : source
45
- python_version : ' 3.10'
46
- - os : macOS-latest
47
- task : mpi
48
- method : pip
49
- python_version : ' 3.11'
50
- - os : macOS-latest
51
- task : mpi
52
- method : wheel
53
- python_version : ' 3.8'
42
+ # We're currently skipping MPI jobs on macOS, see https://github.com/microsoft/LightGBM/pull/6425
43
+ # for further details.
44
+ # - os: macos-13
45
+ # task: mpi
46
+ # method: source
47
+ # python_version: '3.10'
48
+ # - os: macos-13
49
+ # task: mpi
50
+ # method: pip
51
+ # python_version: '3.11'
52
+ # - os: macos-13
53
+ # task: mpi
54
+ # method: wheel
55
+ # python_version: '3.8'
54
56
steps :
55
57
- name : Checkout repository
56
58
uses : actions/checkout@v3
63
65
export TASK="${{ matrix.task }}"
64
66
export METHOD="${{ matrix.method }}"
65
67
export PYTHON_VERSION="${{ matrix.python_version }}"
66
- if [[ "${{ matrix.os }}" == "macOS-latest " ]]; then
68
+ if [[ "${{ matrix.os }}" == "macos-13 " ]]; then
67
69
export COMPILER="gcc"
68
70
export OS_NAME="macos"
69
71
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
Original file line number Diff line number Diff line change @@ -63,13 +63,13 @@ jobs:
63
63
r_version : 4.3
64
64
build_type : cmake
65
65
container : ' ubuntu:22.04'
66
- - os : macOS-latest
66
+ - os : macos-13
67
67
task : r-package
68
68
compiler : gcc
69
69
r_version : 4.3
70
70
build_type : cmake
71
71
container : null
72
- - os : macOS-latest
72
+ - os : macos-13
73
73
task : r-package
74
74
compiler : clang
75
75
r_version : 4.3
@@ -128,7 +128,7 @@ jobs:
128
128
r_version : 4.3
129
129
build_type : cran
130
130
container : ' ubuntu:22.04'
131
- - os : macOS-latest
131
+ - os : macos-13
132
132
task : r-package
133
133
compiler : clang
134
134
r_version : 4.3
@@ -184,13 +184,13 @@ jobs:
184
184
CTAN_MIRROR : https://ctan.math.illinois.edu/systems/win32/miktex
185
185
TINYTEX_INSTALLER : TinyTeX
186
186
- name : Setup and run tests on Linux and macOS
187
- if : matrix.os == 'macOS-latest ' || matrix.os == 'ubuntu-latest'
187
+ if : matrix.os == 'macos-13 ' || matrix.os == 'ubuntu-latest'
188
188
shell : bash
189
189
run : |
190
190
export TASK="${{ matrix.task }}"
191
191
export COMPILER="${{ matrix.compiler }}"
192
192
export GITHUB_ACTIONS="true"
193
- if [[ "${{ matrix.os }}" == "macOS-latest " ]]; then
193
+ if [[ "${{ matrix.os }}" == "macos-13 " ]]; then
194
194
export OS_NAME="macos"
195
195
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
196
196
export OS_NAME="linux"
Original file line number Diff line number Diff line change 1
1
# coding: utf-8
2
2
import filecmp
3
+ import os
3
4
from pathlib import Path
4
5
from typing import Any , Dict , Optional
5
6
6
7
import numpy as np
7
- import pyarrow as pa
8
8
import pytest
9
9
10
10
import lightgbm as lgb
11
11
12
12
from .utils import np_assert_array_equal
13
13
14
+ # NOTE: In the AppVeyor CI, importing pyarrow fails due to an old Visual Studio version. Hence,
15
+ # we conditionally import pyarrow here (and skip tests if it cannot be imported). However, we
16
+ # don't want these tests to silently be skipped, hence, we only conditionally import when a
17
+ # specific env var is set.
18
+ if os .getenv ("ALLOW_SKIP_ARROW_TESTS" ) == "1" :
19
+ pa = pytest .importorskip ("pyarrow" )
20
+ else :
21
+ import pyarrow as pa # type: ignore
22
+
14
23
# ----------------------------------------------------------------------------------------------- #
15
24
# UTILITIES #
16
25
# ----------------------------------------------------------------------------------------------- #
You can’t perform that action at this time.
0 commit comments