[CI] Retire Jenkins server (#8243)

This commit is contained in:
Philip Hyunsu Cho
2022-09-14 08:46:23 -07:00
committed by GitHub
parent 2e63af6117
commit 70df36c99c
9 changed files with 7 additions and 835 deletions

View File

@@ -1,26 +0,0 @@
import boto3
import json
lambda_client = boto3.client('lambda', region_name='us-west-2')
# Source code for the Lambda function is available at https://github.com/hcho3/xgboost-devops
r = lambda_client.invoke(
FunctionName='XGBoostCICostWatcher',
InvocationType='RequestResponse',
Payload='{}'.encode('utf-8')
)
payload = r['Payload'].read().decode('utf-8')
if 'FunctionError' in r:
msg = 'Error when invoking the Lambda function. Stack trace:\n'
error = json.loads(payload)
msg += f" {error['errorType']}: {error['errorMessage']}\n"
for trace in error['stackTrace']:
for line in trace.split('\n'):
msg += f' {line}\n'
raise RuntimeError(msg)
response = json.loads(payload)
if response['approved']:
print(f"Testing approved. Reason: {response['reason']}")
else:
raise RuntimeError(f"Testing rejected. Reason: {response['reason']}")

View File

@@ -1,107 +0,0 @@
#!/bin/bash
source $HOME/miniconda/bin/activate
if [ ${TASK} == "python_sdist_test" ]; then
set -e
conda activate python3
python --version
cmake --version
make pippack
python -m pip install xgboost-*.tar.gz -v --user
python -c 'import xgboost' || exit -1
fi
if [ ${TASK} == "python_test" ]; then
if grep -n -R '<<<.*>>>\(.*\)' src include | grep --invert "NOLINT"; then
echo 'Do not use raw CUDA execution configuration syntax with <<<blocks, threads>>>.' \
'try `dh::LaunchKernel`'
exit -1
fi
set -e
# Build binary wheel
if [ ${TRAVIS_CPU_ARCH} == "arm64" ]; then
# Build manylinux2014 wheel on ARM64
tests/ci_build/ci_build.sh aarch64 docker tests/ci_build/build_via_cmake.sh --conda-env=aarch64_test
tests/ci_build/ci_build.sh aarch64 docker bash -c "cd build && ctest --extra-verbose"
tests/ci_build/ci_build.sh aarch64 docker bash -c "cd python-package && rm -rf dist/* && python setup.py bdist_wheel --universal"
TAG=manylinux2014_aarch64
tests/ci_build/ci_build.sh aarch64 docker python tests/ci_build/rename_whl.py python-package/dist/*.whl ${TRAVIS_COMMIT} ${TAG}
tests/ci_build/ci_build.sh aarch64 docker auditwheel repair --plat ${TAG} python-package/dist/*.whl
mv -v wheelhouse/*.whl python-package/dist/
# Make sure that libgomp.so is vendored in the wheel
unzip -l python-package/dist/*.whl | grep libgomp || exit -1
else
rm -rf build
mkdir build && cd build
conda activate python3
cmake --version
cmake .. -DUSE_OPENMP=ON -DCMAKE_VERBOSE_MAKEFILE=ON
make -j$(nproc)
cd ../python-package
python setup.py bdist_wheel
cd ..
TAG=macosx_10_14_x86_64.macosx_10_15_x86_64.macosx_11_0_x86_64
python tests/ci_build/rename_whl.py python-package/dist/*.whl ${TRAVIS_COMMIT} ${TAG}
fi
# Run unit tests
echo "------------------------------"
if [ ${TRAVIS_CPU_ARCH} == "arm64" ]; then
tests/ci_build/ci_build.sh aarch64 docker \
bash -c "source activate aarch64_test && python -m pip install ./python-package/dist/xgboost-*-py3-none-${TAG}.whl && python -m pytest -v -s -rxXs --durations=0 --fulltrace tests/python/test_basic.py tests/python/test_basic_models.py tests/python/test_model_compatibility.py --cov=python-package/xgboost"
else
conda env create -n cpu_test --file=tests/ci_build/conda_env/macos_cpu_test.yml
conda activate cpu_test
python -m pip install ./python-package/dist/xgboost-*-py3-none-${TAG}.whl
conda --version
python --version
python -m pytest -v -s -rxXs --durations=0 --fulltrace tests/python --cov=python-package/xgboost || exit -1
fi
conda activate python3
codecov
# Deploy binary wheel to S3
if [ "${TRAVIS_PULL_REQUEST}" != "false" ]
then
S3_DEST="s3://xgboost-nightly-builds/PR-${TRAVIS_PULL_REQUEST}/"
else
if [ "${TRAVIS_BRANCH}" == "master" ]
then
S3_DEST="s3://xgboost-nightly-builds/"
elif [ -z "${TRAVIS_TAG}" ]
then
S3_DEST="s3://xgboost-nightly-builds/${TRAVIS_BRANCH}/"
fi
fi
python -m awscli s3 cp python-package/dist/*.whl "${S3_DEST}" --acl public-read || true
fi
if [ ${TASK} == "java_test" ]; then
export RABIT_MOCK=ON
conda activate python3
cd jvm-packages
mvn -q clean install -DskipTests -Dmaven.test.skip
mvn -q test
fi
if [ ${TASK} == "s390x_test" ]; then
set -e
python3 -m pip install --user pytest hypothesis cmake
# Build and run C++ tests
rm -rf build
mkdir build && cd build
cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DGOOGLE_TEST=ON -DUSE_OPENMP=ON -DUSE_DMLC_GTEST=ON -GNinja
time ninja -v
./testxgboost
# Run model compatibility tests
cd ..
PYTHONPATH=./python-package python3 -m pytest --fulltrace -v -rxXs tests/python/test_basic.py
fi

View File

@@ -1,27 +0,0 @@
#!/bin/bash
if [ ${TASK} == "python_test" ] || [ ${TASK} == "python_sdist_test" ]; then
if [ ${TRAVIS_OS_NAME} == "osx" ]; then
wget --no-verbose -O conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
elif [ ${TRAVIS_CPU_ARCH} == "arm64" ]; then
wget --no-verbose -O conda.sh https://github.com/conda-forge/miniforge/releases/download/4.8.2-1/Miniforge3-4.8.2-1-Linux-aarch64.sh
else
wget --no-verbose -O conda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
fi
bash conda.sh -b -p $HOME/miniconda
source $HOME/miniconda/bin/activate
hash -r
conda config --set always_yes yes --set changeps1 no
conda update -q conda
# Useful for debugging any issues with conda
conda info -a
conda create -n python3 python=3.7 cmake numpy scipy codecov
conda activate python3
python -m pip install awscli
fi
if [ ${TASK} == "s390x_test" ] && [ ${TRAVIS_CPU_ARCH} == "s390x" ]; then
sudo apt-get update
sudo apt-get install -y --no-install-recommends tar unzip wget git build-essential ninja-build \
time python3 python3-pip python3-numpy python3-scipy python3-sklearn r-base
fi

View File

@@ -1,7 +0,0 @@
#!/bin/bash
if [ ${TASK} == "r_test" ]; then
cat xgboost/xgboost.Rcheck/*.log
echo "--------------------------"
cat xgboost/xgboost.Rcheck/*.out
fi

View File

@@ -1,3 +0,0 @@
#!/bin/bash
# do nothing for now
ls -alLR ${CACHE_PREFIX}

View File

@@ -1,40 +0,0 @@
# script to be sourced in travis yml
# setup all enviroment variables
export CACHE_PREFIX=${HOME}/.cache/usr
export PATH=${HOME}/.local/bin:${PATH}
export PATH=${PATH}:${CACHE_PREFIX}/bin
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:${CACHE_PREFIX}/include
export C_INCLUDE_PATH=${C_INCLUDE_PATH}:${CACHE_PREFIX}/include
export LIBRARY_PATH=${LIBRARY_PATH}:${CACHE_PREFIX}/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CACHE_PREFIX}/lib
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${CACHE_PREFIX}/lib
alias make="make -j4"
# setup the cache prefix folder
if [ ! -d ${HOME}/.cache ]; then
mkdir ${HOME}/.cache
fi
if [ ! -d ${CACHE_PREFIX} ]; then
mkdir ${CACHE_PREFIX}
fi
if [ ! -d ${CACHE_PREFIX}/include ]; then
mkdir ${CACHE_PREFIX}/include
fi
if [ ! -d ${CACHE_PREFIX}/lib ]; then
mkdir ${CACHE_PREFIX}/lib
fi
if [ ! -d ${CACHE_PREFIX}/bin ]; then
mkdir ${CACHE_PREFIX}/bin
fi
# setup CUDA path if NVCC_PREFIX exists
if [ ! -z "$NVCC_PREFIX" ]; then
export PATH=${PATH}:${NVCC_PREFIX}/usr/local/cuda-7.5/bin
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:${NVCC_PREFIX}/usr/local/cuda-7.5/include
export C_INCLUDE_PATH=${C_INCLUDE_PATH}:${NVCC_PREFIX}/usr/local/cuda-7.5/include
export LIBRARY_PATH=${LIBRARY_PATH}:${NVCC_PREFIX}/usr/local/cuda-7.5/lib64:${NVCC_PREFIX}/usr/lib/x86_64-linux-gnu
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NVCC_PREFIX}/usr/local/cuda-7.5/lib64:${NVCC_PREFIX}/usr/lib/x86_64-linux-gnu
fi