Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hcho3 committed Nov 19, 2024
1 parent dce4f7b commit dfd5624
Show file tree
Hide file tree
Showing 11 changed files with 487 additions and 484 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/freebsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ jobs:
timeout-minutes: 20
name: A job to run test in FreeBSD
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Test in FreeBSD
id: test
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y cmake git ninja googletest
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Test in FreeBSD
id: test
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y cmake git ninja googletest
run: |
mkdir build
cd build
cmake .. -GNinja -DGOOGLE_TEST=ON
ninja -v
./testxgboost
run: |
mkdir build
cd build
cmake .. -GNinja -DGOOGLE_TEST=ON
ninja -v
./testxgboost
44 changes: 22 additions & 22 deletions .github/workflows/i386.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@ jobs:
ports:
- 5000:5000
steps:
- uses: actions/[email protected]
with:
submodules: 'true'
- name: Set up Docker Buildx
uses: docker/[email protected]
with:
driver-opts: network=host
- name: Build and push container
uses: docker/build-push-action@v6
with:
context: .
file: ops/docker/dockerfile/Dockerfile.i386
push: true
tags: localhost:5000/xgboost/build-32bit:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build XGBoost
run: |
docker run --rm -v $PWD:/workspace -w /workspace \
-e CXXFLAGS='-Wno-error=overloaded-virtual -Wno-error=maybe-uninitialized -Wno-error=redundant-move' \
localhost:5000/xgboost/build-32bit:latest \
bash ops/script/build_via_cmake.sh
- uses: actions/[email protected]
with:
submodules: 'true'
- name: Set up Docker Buildx
uses: docker/[email protected]
with:
driver-opts: network=host
- name: Build and push container
uses: docker/build-push-action@v6
with:
context: .
file: ops/docker/dockerfile/Dockerfile.i386
push: true
tags: localhost:5000/xgboost/build-32bit:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build XGBoost
run: |
docker run --rm -v $PWD:/workspace -w /workspace \
-e CXXFLAGS='-Wno-error=overloaded-virtual -Wno-error=maybe-uninitialized -Wno-error=redundant-move' \
localhost:5000/xgboost/build-32bit:latest \
bash ops/script/build_via_cmake.sh
91 changes: 47 additions & 44 deletions .github/workflows/jvm_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ jobs:
with:
submodules: "true"
- run: bash ${{ matrix.script }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_IAM_S3_UPLOADER }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_IAM_S3_UPLOADER }}

build-jvm-docs:
name: Build docs for JVM packages
Expand Down Expand Up @@ -169,50 +172,50 @@ jobs:
os: [windows-latest, macos-13]

steps:
- uses: actions/[email protected]
with:
submodules: 'true'

- uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: '8'

- uses: conda-incubator/[email protected]
with:
miniforge-variant: Miniforge3
miniforge-version: latest
activate-environment: jvm_tests
environment-file: ops/conda_env/jvm_tests.yml
use-mamba: true

- name: Cache Maven packages
uses: actions/[email protected]
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('./jvm-packages/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-${{ hashFiles('./jvm-packages/pom.xml') }}

- name: Test XGBoost4J (Core)
run: |
cd jvm-packages
mvn test -B -pl :xgboost4j_2.12
- name: Publish artifact xgboost4j.dll to S3
run: |
cd lib/
Rename-Item -Path xgboost4j.dll -NewName xgboost4j_${{ github.sha }}.dll
dir
python -m awscli s3 cp xgboost4j_${{ github.sha }}.dll `
s3://xgboost-nightly-builds/${{ env.BRANCH_NAME }}/libxgboost4j/ `
--acl public-read --region us-west-2
if: matrix.os == 'windows-latest'
# if: |
# (github.ref == 'refs/heads/master' || contains(github.ref, 'refs/heads/release_')) &&
# matrix.os == 'windows-latest'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_IAM_S3_UPLOADER }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_IAM_S3_UPLOADER }}
- uses: actions/[email protected]
with:
submodules: 'true'

- uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: '8'

- uses: conda-incubator/[email protected]
with:
miniforge-variant: Miniforge3
miniforge-version: latest
activate-environment: jvm_tests
environment-file: ops/conda_env/jvm_tests.yml
use-mamba: true

- name: Cache Maven packages
uses: actions/[email protected]
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('./jvm-packages/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-${{ hashFiles('./jvm-packages/pom.xml') }}

- name: Test XGBoost4J (Core)
run: |
cd jvm-packages
mvn test -B -pl :xgboost4j_2.12
- name: Publish artifact xgboost4j.dll to S3
run: |
cd lib/
Rename-Item -Path xgboost4j.dll -NewName xgboost4j_${{ github.sha }}.dll
dir
python -m awscli s3 cp xgboost4j_${{ github.sha }}.dll `
s3://xgboost-nightly-builds/${{ env.BRANCH_NAME }}/libxgboost4j/ `
--acl public-read --region us-west-2
if: matrix.os == 'windows-latest'
# if: |
# (github.ref == 'refs/heads/master' || contains(github.ref, 'refs/heads/release_')) &&
# matrix.os == 'windows-latest'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_IAM_S3_UPLOADER }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_IAM_S3_UPLOADER }}

test-jvm-packages-gpu:
name: Test JVM packages with CUDA
Expand Down
122 changes: 61 additions & 61 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,52 +58,52 @@ jobs:
runs-on: ubuntu-latest
name: Type and format checks for the Python package
steps:
- uses: actions/[email protected]
with:
submodules: 'true'
- uses: conda-incubator/[email protected]
with:
miniforge-variant: Miniforge3
miniforge-version: latest
activate-environment: python_lint
environment-file: ops/conda_env/python_lint.yml
use-mamba: true
- name: Display Conda env
shell: bash -el {0}
run: |
conda info
conda list
- name: Run mypy
shell: bash -el {0}
run: |
python ops/script/lint_python.py --format=0 --type-check=1 --pylint=0
- name: Run formatter
shell: bash -el {0}
run: |
python ops/script/lint_python.py --format=1 --type-check=0 --pylint=0
- name: Run pylint
shell: bash -el {0}
run: |
python ops/script/lint_python.py --format=0 --type-check=0 --pylint=1
- uses: actions/[email protected]
with:
submodules: 'true'
- uses: conda-incubator/[email protected]
with:
miniforge-variant: Miniforge3
miniforge-version: latest
activate-environment: python_lint
environment-file: ops/conda_env/python_lint.yml
use-mamba: true
- name: Display Conda env
shell: bash -el {0}
run: |
conda info
conda list
- name: Run mypy
shell: bash -el {0}
run: |
python ops/script/lint_python.py --format=0 --type-check=1 --pylint=0
- name: Run formatter
shell: bash -el {0}
run: |
python ops/script/lint_python.py --format=1 --type-check=0 --pylint=0
- name: Run pylint
shell: bash -el {0}
run: |
python ops/script/lint_python.py --format=0 --type-check=0 --pylint=1
cpp-lint:
runs-on: ubuntu-latest
name: Code linting for C++
steps:
- uses: actions/[email protected]
with:
submodules: 'true'
- uses: actions/[email protected]
with:
python-version: "3.10"
architecture: 'x64'
- name: Install Python packages
run: |
python -m pip install wheel setuptools cmakelint cpplint==1.6.1 pylint
- name: Run lint
run: |
python3 ops/script/lint_cpp.py
bash ops/script/lint_cmake.sh
- uses: actions/[email protected]
with:
submodules: 'true'
- uses: actions/[email protected]
with:
python-version: "3.10"
architecture: 'x64'
- name: Install Python packages
run: |
python -m pip install wheel setuptools cmakelint cpplint==1.6.1 pylint
- name: Run lint
run: |
python3 ops/script/lint_cpp.py
bash ops/script/lint_cmake.sh
lintr:
runs-on: ${{ matrix.os }}
Expand All @@ -118,27 +118,27 @@ jobs:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true

steps:
- uses: actions/[email protected]
with:
submodules: 'true'
- uses: actions/[email protected]
with:
submodules: 'true'

- uses: r-lib/actions/[email protected]
with:
r-version: ${{ matrix.r }}
- uses: r-lib/actions/[email protected]
with:
r-version: ${{ matrix.r }}

- name: Cache R packages
uses: actions/[email protected]
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.r }}-7-${{ hashFiles('R-package/DESCRIPTION') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.r }}-7-${{ hashFiles('R-package/DESCRIPTION') }}
- name: Cache R packages
uses: actions/[email protected]
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.r }}-7-${{ hashFiles('R-package/DESCRIPTION') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.r }}-7-${{ hashFiles('R-package/DESCRIPTION') }}

- name: Install dependencies
shell: Rscript {0}
run: |
source("./R-package/tests/helper_scripts/install_deps.R")
- name: Install dependencies
shell: Rscript {0}
run: |
source("./R-package/tests/helper_scripts/install_deps.R")
- name: Run lintr
run: |
MAKEFLAGS="-j$(nproc)" R CMD INSTALL R-package/
Rscript ops/script/lint_r.R $(pwd)
- name: Run lintr
run: |
MAKEFLAGS="-j$(nproc)" R CMD INSTALL R-package/
Rscript ops/script/lint_r.R $(pwd)
Loading

0 comments on commit dfd5624

Please sign in to comment.