Unverified Commit 92a8741b authored by Oliver Borchert's avatar Oliver Borchert Committed by GitHub
Browse files

[ci] Skip Arrow tests on AppVeyor, use Intel macOS runners, upgrade to XCode...

[ci] Skip Arrow tests on AppVeyor, use Intel macOS runners, upgrade to XCode 14.3 on macOS jobs, disable MacOS MPI jobs (#6425)
parent 14435485
...@@ -17,7 +17,9 @@ if [[ $OS_NAME == "macos" ]]; then ...@@ -17,7 +17,9 @@ if [[ $OS_NAME == "macos" ]]; then
sudo xcode-select -s /Applications/Xcode_11.7.app/Contents/Developer || exit 1 sudo xcode-select -s /Applications/Xcode_11.7.app/Contents/Developer || exit 1
fi fi
else # gcc 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 if [[ $TASK != "mpi" ]]; then
brew install gcc brew install gcc
fi fi
......
...@@ -9,6 +9,7 @@ function Check-Output { ...@@ -9,6 +9,7 @@ function Check-Output {
# unify environment variable for Azure DevOps and AppVeyor # unify environment variable for Azure DevOps and AppVeyor
if (Test-Path env:APPVEYOR) { if (Test-Path env:APPVEYOR) {
$env:APPVEYOR = "true" $env:APPVEYOR = "true"
$env:ALLOW_SKIP_ARROW_TESTS = "1"
} }
if ($env:TASK -eq "r-package") { if ($env:TASK -eq "r-package") {
......
...@@ -27,30 +27,32 @@ jobs: ...@@ -27,30 +27,32 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- os: macOS-latest - os: macos-13
task: regular task: regular
python_version: '3.9' python_version: '3.9'
- os: macOS-latest - os: macos-13
task: sdist task: sdist
python_version: '3.10' python_version: '3.10'
- os: macOS-latest - os: macos-13
task: bdist task: bdist
python_version: '3.7' python_version: '3.7'
- os: macOS-latest - os: macos-13
task: if-else task: if-else
python_version: '3.9' python_version: '3.9'
- os: macOS-latest # We're currently skipping MPI jobs on macOS, see https://github.com/microsoft/LightGBM/pull/6425
task: mpi # for further details.
method: source # - os: macos-13
python_version: '3.10' # task: mpi
- os: macOS-latest # method: source
task: mpi # python_version: '3.10'
method: pip # - os: macos-13
python_version: '3.11' # task: mpi
- os: macOS-latest # method: pip
task: mpi # python_version: '3.11'
method: wheel # - os: macos-13
python_version: '3.8' # task: mpi
# method: wheel
# python_version: '3.8'
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
...@@ -63,7 +65,7 @@ jobs: ...@@ -63,7 +65,7 @@ jobs:
export TASK="${{ matrix.task }}" export TASK="${{ matrix.task }}"
export METHOD="${{ matrix.method }}" export METHOD="${{ matrix.method }}"
export PYTHON_VERSION="${{ matrix.python_version }}" export PYTHON_VERSION="${{ matrix.python_version }}"
if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then if [[ "${{ matrix.os }}" == "macos-13" ]]; then
export COMPILER="gcc" export COMPILER="gcc"
export OS_NAME="macos" export OS_NAME="macos"
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
......
...@@ -63,13 +63,13 @@ jobs: ...@@ -63,13 +63,13 @@ jobs:
r_version: 4.3 r_version: 4.3
build_type: cmake build_type: cmake
container: 'ubuntu:22.04' container: 'ubuntu:22.04'
- os: macOS-latest - os: macos-13
task: r-package task: r-package
compiler: gcc compiler: gcc
r_version: 4.3 r_version: 4.3
build_type: cmake build_type: cmake
container: null container: null
- os: macOS-latest - os: macos-13
task: r-package task: r-package
compiler: clang compiler: clang
r_version: 4.3 r_version: 4.3
...@@ -128,7 +128,7 @@ jobs: ...@@ -128,7 +128,7 @@ jobs:
r_version: 4.3 r_version: 4.3
build_type: cran build_type: cran
container: 'ubuntu:22.04' container: 'ubuntu:22.04'
- os: macOS-latest - os: macos-13
task: r-package task: r-package
compiler: clang compiler: clang
r_version: 4.3 r_version: 4.3
...@@ -184,13 +184,13 @@ jobs: ...@@ -184,13 +184,13 @@ jobs:
CTAN_MIRROR: https://ctan.math.illinois.edu/systems/win32/miktex CTAN_MIRROR: https://ctan.math.illinois.edu/systems/win32/miktex
TINYTEX_INSTALLER: TinyTeX TINYTEX_INSTALLER: TinyTeX
- name: Setup and run tests on Linux and macOS - 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 shell: bash
run: | run: |
export TASK="${{ matrix.task }}" export TASK="${{ matrix.task }}"
export COMPILER="${{ matrix.compiler }}" export COMPILER="${{ matrix.compiler }}"
export GITHUB_ACTIONS="true" export GITHUB_ACTIONS="true"
if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then if [[ "${{ matrix.os }}" == "macos-13" ]]; then
export OS_NAME="macos" export OS_NAME="macos"
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
export OS_NAME="linux" export OS_NAME="linux"
......
# coding: utf-8 # coding: utf-8
import filecmp import filecmp
import os
from pathlib import Path from pathlib import Path
from typing import Any, Dict, Optional from typing import Any, Dict, Optional
import numpy as np import numpy as np
import pyarrow as pa
import pytest import pytest
import lightgbm as lgb import lightgbm as lgb
from .utils import np_assert_array_equal 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 # # UTILITIES #
# ----------------------------------------------------------------------------------------------- # # ----------------------------------------------------------------------------------------------- #
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment