File tree Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 2
2
3
3
set -e -E -o pipefail
4
4
5
+ ARCH=$( uname -m)
6
+
7
+
5
8
if [[ $OS_NAME == " macos" ]]; then
6
9
if [[ $COMPILER == " clang" ]]; then
7
10
brew install libomp
@@ -23,7 +26,7 @@ if [[ $OS_NAME == "macos" ]]; then
23
26
curl \
24
27
-sL \
25
28
-o miniforge.sh \
26
- https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64 .sh
29
+ https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-${ARCH} .sh
27
30
else # Linux
28
31
if [[ $IN_UBUNTU_BASE_CONTAINER == " true" ]]; then
29
32
# fixes error "unable to initialize frontend: Dialog"
@@ -135,7 +138,6 @@ else # Linux
135
138
cmake
136
139
fi
137
140
if [[ $SETUP_CONDA != " false" ]]; then
138
- ARCH=$( uname -m)
139
141
curl \
140
142
-sL \
141
143
-o miniforge.sh \
Original file line number Diff line number Diff line change 2
2
3
3
set -e -E -o pipefail
4
4
5
+ ARCH=$( uname -m)
6
+
5
7
if [[ $OS_NAME == " macos" ]] && [[ $COMPILER == " gcc" ]]; then
6
8
export CXX=g++-11
7
9
export CC=gcc-11
@@ -171,14 +173,19 @@ elif [[ $TASK == "bdist" ]]; then
171
173
mv \
172
174
./dist/* .whl \
173
175
./dist/tmp.whl || exit 1
176
+ if [[ $ARCH == " x86_64" ]]; then
177
+ PLATFORM=" macosx_10_15_x86_64.macosx_11_6_x86_64.macosx_12_5_x86_64"
178
+ else
179
+ echo " ERROR: macos wheels not supported yet on architecture '${ARCH} '"
180
+ exit 1
181
+ fi
174
182
mv \
175
183
./dist/tmp.whl \
176
- dist/lightgbm-$LGB_VER -py3-none-macosx_10_15_x86_64.macosx_11_6_x86_64.macosx_12_5_x86_64 .whl || exit 1
184
+ dist/lightgbm-$LGB_VER -py3-none-$PLATFORM .whl || exit 1
177
185
if [[ $PRODUCES_ARTIFACTS == " true" ]]; then
178
186
cp dist/lightgbm-$LGB_VER -py3-none-macosx* .whl $BUILD_ARTIFACTSTAGINGDIRECTORY || exit 1
179
187
fi
180
188
else
181
- ARCH=$( uname -m)
182
189
if [[ $ARCH == " x86_64" ]]; then
183
190
PLATFORM=" manylinux_2_28_x86_64"
184
191
else
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ ARCH=$( uname -m)
4
+
3
5
# set up R environment
4
6
CRAN_MIRROR=" https://cran.rstudio.com"
5
7
R_LIB_PATH=~ /Rlib
@@ -22,7 +24,7 @@ if [[ "${R_MAJOR_VERSION}" == "3" ]]; then
22
24
export R_APT_REPO=" bionic-cran35/"
23
25
elif [[ " ${R_MAJOR_VERSION} " == " 4" ]]; then
24
26
export R_MAC_VERSION=4.3.1
25
- export R_MAC_PKG_URL=${CRAN_MIRROR} /bin/macosx/big-sur-x86_64 /base/R-${R_MAC_VERSION} -x86_64 .pkg
27
+ export R_MAC_PKG_URL=${CRAN_MIRROR} /bin/macosx/big-sur-${ARCH} /base/R-${R_MAC_VERSION} -${ARCH} .pkg
26
28
export R_LINUX_VERSION=" 4.3.1-1.2204.0"
27
29
export R_APT_REPO=" jammy-cran40/"
28
30
else
@@ -70,11 +72,11 @@ if [[ $OS_NAME == "linux" ]]; then
70
72
fi
71
73
if [[ $INSTALL_CMAKE_FROM_RELEASES == " true" ]]; then
72
74
curl -O -L \
73
- https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1-linux-x86_64 .sh \
75
+ https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1-linux-${ARCH} .sh \
74
76
|| exit 1
75
77
76
78
sudo mkdir /opt/cmake || exit 1
77
- sudo sh cmake-3.25.1-linux-x86_64 .sh --skip-license --prefix=/opt/cmake || exit 1
79
+ sudo sh cmake-3.25.1-linux-${ARCH} .sh --skip-license --prefix=/opt/cmake || exit 1
78
80
sudo ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake || exit 1
79
81
fi
80
82
fi
You can’t perform that action at this time.
0 commit comments