From fb2fe5a9d4302d24b61feab46ea49fc1646a2542 Mon Sep 17 00:00:00 2001 From: Huamin Chen Date: Wed, 15 Nov 2023 13:53:21 -0500 Subject: [PATCH] add xgboost library Signed-off-by: Huamin Chen --- .github/workflows/publish_xgboost.yml | 38 +++++++++++++++++++++++++++ xgboost_tag | 1 + 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/publish_xgboost.yml create mode 100644 xgboost_tag diff --git a/.github/workflows/publish_xgboost.yml b/.github/workflows/publish_xgboost.yml new file mode 100644 index 0000000..7d22879 --- /dev/null +++ b/.github/workflows/publish_xgboost.yml @@ -0,0 +1,38 @@ +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 diff --git a/xgboost_tag b/xgboost_tag new file mode 100644 index 0000000..10bf840 --- /dev/null +++ b/xgboost_tag @@ -0,0 +1 @@ +2.0.1 \ No newline at end of file