-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] restore aarch64 linux builds (fixes #6509)
- Loading branch information
Showing
6 changed files
with
52 additions
and
577 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ env: | |
SKBUILD_STRICT_CONFIG: true | ||
|
||
jobs: | ||
# purpose: test different Python package variants (build options, compiler, Python version) | ||
test: | ||
name: ${{ matrix.task }} ${{ matrix.method }} (${{ matrix.os }}, Python ${{ matrix.python_version }}) | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -38,10 +39,6 @@ jobs: | |
- os: macos-13 | ||
task: if-else | ||
python_version: '3.9' | ||
- os: macos-14 | ||
task: bdist | ||
method: wheel | ||
python_version: '3.10' | ||
# We're currently skipping MPI jobs on macOS, see https://github.com/microsoft/LightGBM/pull/6425 | ||
# for further details. | ||
# - os: macos-13 | ||
|
@@ -68,28 +65,69 @@ jobs: | |
export TASK="${{ matrix.task }}" | ||
export METHOD="${{ matrix.method }}" | ||
export PYTHON_VERSION="${{ matrix.python_version }}" | ||
if [[ "${{ matrix.os }}" == "macos-14" ]]; then | ||
export COMPILER="gcc" | ||
export OS_NAME="macos" | ||
export BUILD_DIRECTORY="$GITHUB_WORKSPACE" | ||
export CONDA=${HOME}/miniforge | ||
export PATH=${CONDA}/bin:${PATH} | ||
$GITHUB_WORKSPACE/.ci/setup.sh || exit 1 | ||
$GITHUB_WORKSPACE/.ci/test.sh || exit 1 | ||
# purpose: build macOS wheels to release | ||
build-and-test-wheels: | ||
name: ${{ matrix.task }} (${{ matrix.artifact-name }}, Python ${{ matrix.python_version }}) | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 60 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: macos-14 | ||
task: bdist | ||
method: wheel | ||
python_version: '3.10' | ||
container: null | ||
artifact-name: macosx-arm64-wheel | ||
- os: macos-14 | ||
task: bdist | ||
method: wheel | ||
python_version: '3.10' | ||
container: "lightgbm/vsts-agent:manylinux2014_aarch64" | ||
artifact-name: linux-aarch64-wheel | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 5 | ||
submodules: true | ||
- name: Setup and run tests | ||
shell: bash | ||
run: | | ||
export TASK="${{ matrix.task }}" | ||
export METHOD="${{ matrix.method }}" | ||
export PYTHON_VERSION="${{ matrix.python_version }}" | ||
if [[ "${{ matrix.artifact-name }}" == "macosx-arm64-wheel" ]]; then | ||
# use clang when creating macOS release artifacts | ||
export COMPILER="clang" | ||
export OS_NAME="macos" | ||
elif [[ "${{ matrix.os }}" == "macos-13" ]]; then | ||
elif [[ "${{ matrix.artifact-name }}" == "linux-aarch64-wheel" ]]; then | ||
export COMPILER="gcc" | ||
export OS_NAME="macos" | ||
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then | ||
export COMPILER="clang" | ||
export OS_NAME="linux" | ||
else | ||
echo "Unrecognized artifact name: '${{ matrix.artifact-name }}'" | ||
exit 1 | ||
fi | ||
export BUILD_DIRECTORY="$GITHUB_WORKSPACE" | ||
export CONDA=${HOME}/miniforge | ||
export PATH=${CONDA}/bin:${PATH} | ||
$GITHUB_WORKSPACE/.ci/setup.sh || exit 1 | ||
$GITHUB_WORKSPACE/.ci/test.sh || exit 1 | ||
- name: upload wheels | ||
if: ${{ matrix.method == 'wheel' && matrix.os == 'macos-14' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: macosx-arm64-wheel | ||
name: ${{ matrix.artifact-name }} | ||
path: dist/*.whl | ||
# purpose: test the Python package against nightlies of its dependencies, | ||
# to catch issues before users experience them | ||
test-latest-versions: | ||
name: Python - latest versions (ubuntu-latest) | ||
runs-on: ubuntu-latest | ||
|
@@ -117,6 +155,8 @@ jobs: | |
-w /opt/lgb-build \ | ||
python:3.11 \ | ||
/bin/bash ./.ci/test-python-latest.sh | ||
# purpose: test the Python package against the oldest supported versions of its dependencies, | ||
# to prevent changes from accidentally breaking compatibility with those older versions | ||
test-oldest-versions: | ||
name: Python - oldest supported versions (ubuntu-latest) | ||
runs-on: ubuntu-latest | ||
|
@@ -147,7 +187,7 @@ jobs: | |
all-python-package-jobs-successful: | ||
if: always() | ||
runs-on: ubuntu-latest | ||
needs: [test, test-latest-versions, test-oldest-versions] | ||
needs: [test, build-and-test-wheels, test-latest-versions, test-oldest-versions] | ||
steps: | ||
- name: Note that all tests succeeded | ||
uses: re-actors/[email protected] | ||
|
Oops, something went wrong.