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] build aarch64 wheel builds on a real aarch64 machine #6843

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
try docker run
  • Loading branch information
jameslamb committed Feb 28, 2025
commit a2565501d5353afcde1fd104b8ab2adbd59b6a97
58 changes: 33 additions & 25 deletions .github/workflows/python_package.yml
Original file line number Diff line number Diff line change
@@ -25,38 +25,46 @@ jobs:
timeout-minutes: 60
steps:
- name: Checkout repository
shell: bash
run: |
echo "--- hey ---"
echo $(pwd)
git clone \
--depth 5 \
--recursive \
${{ github.repositoryUrl }} \
.
git checkout ${{ github.ref }}
git status
git branch -v
git log -n 5
uses: actions/checkout@v4
with:
fetch-depth: 5
submodules: true
- name: Setup and run tests
shell: bash
# this uses 'docker run' instead of just setting 'container:'
# because actions/checkout requires GLIBC 2.28 and that is too
# new for manylinux2014
env:
BUILD_DIRECTORY: /LightGBM
run: |
export BUILD_DIRECTORY="$GITHUB_WORKSPACE"
export COMPILER=gcc
export CONDA=${HOME}/miniforge
export METHOD=wheel
export OS_NAME="linux"
export PATH=${CONDA}/bin:${PATH}
export PRODUCES_ARTIFACTS=true
export PYTHON_VERSION="3.13"
export TASK=bdist
$GITHUB_WORKSPACE/.ci/setup.sh || exit 1
$GITHUB_WORKSPACE/.ci/test.sh || exit 1
cat > ./docker-script.sh <<EOF
export CONDA=\$HOME/miniforge
export PATH=\$CONDA/bin:\$PATH
${{ env.BUILD_DIRECTORY }}/.ci/setup.sh || exit 1
${{ env.BUILD_DIRECTORY }}/.ci/test.sh || exit 1
EOF
IMAGE_URI="lightgbm/vsts-agent:manylinux2014_aarch64"
docker pull "${IMAGE_URI}" || exit 1
docker run \
--platform "${PLATFORM}" \
--rm \
--env AZURE=true \
--env BUILD_ARTIFACTSTAGINGDIRECTORY=${{ env.BUILD_DIRECTORY }}/artifacts/ \
--env COMPILER=gcc \
--env METHOD=wheel \
--env OS_NAME=linux \
--env PRODUCES_ARTIFACTS=true \
--env PYTHON_VERSION="3.13" \
--env TASK=bdist \
-v "${PWD}":"${{ env.BUILD_DIRECTORY }}" \
-w ${{ env.BUILD_DIRECTORY }} \
-it lightgbm/vsts-agent:manylinux2014_aarch64 \
/bin/bash ./docker-script.sh
- name: upload wheels
uses: actions/upload-artifact@v4
with:
name: linux-aarch64-wheel
path: dist/*.whl
path: artifacts/*.whl
# test-macos:
# name: ${{ matrix.task }} ${{ matrix.method }} (${{ matrix.os }}, Python ${{ matrix.python_version }})
# runs-on: ${{ matrix.os }}
Loading
Oops, something went wrong.