add xgboost library #1
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
name: xgboost artifact | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: [ main ] | ||
permissions: | ||
pull-requests: write | ||
contents: write | ||
repository-projects: write | ||
jobs: | ||
publich_bcc_deb: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
- name: Build xgboost | ||
run: | | ||
set -x | ||
export XGBOOST_TAG=$(cat xgboost_tag) | ||
sudo apt-get update -y | ||
# ubuntu 20.04 ships with cmake 3.16, but xgboost needs 3.18+. Install cmake from pip | ||
sudo apt-get install git make g++ python3-pip -y | ||
sudo pip install cmake --upgrade | ||
git clone --recursive https://github.com/dmlc/xgboost.git | ||
cd xgboost && git checkout tags/v$(XGBOOST_TAG) && mkdir -p build && cd build && cmake .. && make -j4; make package; cp build/xgboost-${XGBOOST_TAG}-Linux.sh /tmp/xgboost.sh | ||
- if: startsWith(github.event.ref, 'refs/tags/') | ||
name: Release | ||
uses: softprops/action-gh-release@master | ||
with: | ||
files: | | ||
xgboost.sh | ||
/tmp/xgboost.sh |