-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI] Set up CI for Mac M1 #9699
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
75f64f3
[CI] Set up CI for Mac M1
hcho3 6b6560f
Fix
hcho3 574e083
Fix build with Clang 11
hcho3 48b66d6
Show system information
hcho3 15fbd73
Fix build
hcho3 641f266
Fix conda set up
hcho3 66162a5
Make Conda available in current shell
hcho3 444c852
py-ubjson is unavailable for Mac M1 on Conda
hcho3 73e33a7
Reduce verbosity
hcho3 386814c
Reduce verbosity further
hcho3 c3800c3
Add -y flag
hcho3 bc9b6c5
More finish
hcho3 3986934
Remove datatable
hcho3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
steps: | ||
- block: ":rocket: Run this test job" | ||
if: build.pull_request.id != null || build.branch =~ /^dependabot\// | ||
- label: ":macos: Build and Test XGBoost for MacOS M1 with Clang 11" | ||
command: "tests/buildkite/test-macos-m1-clang11.sh" | ||
key: mac-m1-appleclang11 | ||
agents: | ||
queue: mac-mini-m1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
source tests/buildkite/conftest.sh | ||
|
||
# Display system info | ||
echo "--- Display system information" | ||
set -x | ||
system_profiler SPSoftwareDataType | ||
sysctl -n machdep.cpu.brand_string | ||
uname -m | ||
set +x | ||
|
||
# Create new Conda env | ||
echo "--- Set up Conda env" | ||
. $HOME/mambaforge/etc/profile.d/conda.sh | ||
. $HOME/mambaforge/etc/profile.d/mamba.sh | ||
conda_env=xgboost_dev_$(uuidgen | tr '[:upper:]' '[:lower:]' | tr -d '-') | ||
mamba create -y -n ${conda_env} python=3.8 | ||
conda activate ${conda_env} | ||
mamba env update -n ${conda_env} --file tests/ci_build/conda_env/macos_cpu_test.yml | ||
|
||
# Ensure that XGBoost can be built with Clang 11 | ||
echo "--- Build and Test XGBoost with MacOS M1, Clang 11" | ||
set -x | ||
LLVM11_PATH=$(brew --prefix llvm\@11) | ||
mkdir build | ||
pushd build | ||
cmake .. -GNinja -DCMAKE_C_COMPILER=${LLVM11_PATH}/bin/clang \ | ||
-DCMAKE_CXX_COMPILER=${LLVM11_PATH}/bin/clang++ -DGOOGLE_TEST=ON \ | ||
-DUSE_DMLC_GTEST=ON | ||
ninja -v |
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any difficulty installing it from conda-forge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, Conda-forge doesn't yet offer py-ujson for Apple M1.