Skip to content

Commit

Permalink
add xgboost library
Browse files Browse the repository at this point in the history
Signed-off-by: Huamin Chen <[email protected]>
  • Loading branch information
rootfs committed Nov 15, 2023
1 parent f94ab97 commit 145208a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/publish_xgboost.yml
Original file line number Diff line number Diff line change
@@ -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_xgboost_pkg:
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 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
1 change: 1 addition & 0 deletions xgboost_tag
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.0.1

0 comments on commit 145208a

Please sign in to comment.