File tree Expand file tree Collapse file tree 2 files changed +35
-11
lines changed
Expand file tree Collapse file tree 2 files changed +35
-11
lines changed Original file line number Diff line number Diff line change 8686 include :
8787 - os : ubuntu-20.04
8888 arch : aarch64
89+ - os : macos-11
90+ arch : arm64
8991
9092 steps :
9193 - uses : actions/checkout@v2
@@ -111,6 +113,7 @@ jobs:
111113 CIBW_TEST_REQUIRES : pytest
112114 CIBW_ARCHS : ${{ matrix.arch }}
113115 CIBW_SKIP : pp* *-musllinux_*
116+ CIBW_TEST_SKIP : " *-macosx_arm64"
114117
115118 - name : Upload Python wheels
116119 uses : actions/upload-artifact@v2
Original file line number Diff line number Diff line change 44set -x
55
66ROOT_DIR=$PWD
7- ICU_VERSION=${ICU_VERSION:- 70.1}
8- ICU_ROOT=$ROOT_DIR /icu-$ICU_VERSION
9-
10- # Install ICU.
11- curl -L -O https://github.com/unicode-org/icu/releases/download/release-${ICU_VERSION/ ./ -} /icu4c-${ICU_VERSION/ ./ _} -src.tgz
12- tar xf icu4c-* -src.tgz
13- cd icu/source
14- CFLAGS=" -O3 -fPIC" CXXFLAGS=" -O3 -fPIC" ./configure --disable-shared --enable-static --prefix=$ICU_ROOT
15- make -j2 install
7+ ICU_ROOT=$ROOT_DIR /icu
8+ CMAKE_EXTRA_ARGS=" "
9+
10+ if [ " $CIBW_ARCHS " == " arm64" ]; then
11+
12+ # Download ICU ARM64 binaries from Homebrew.
13+ brew fetch --force --bottle-tag=arm64_big_sur icu4c \
14+ | grep " Downloaded to" \
15+ | awk ' { print $3 }' \
16+ | xargs -I{} tar xf {} -C $ROOT_DIR
17+
18+ mv icu4c/* .* $ICU_ROOT
19+
20+ # Remove dynamic libraries to force static link.
21+ rm $ICU_ROOT /lib/* .dylib
22+
23+ CMAKE_EXTRA_ARGS=" -DCMAKE_OSX_ARCHITECTURES=arm64"
24+
25+ else
26+
27+ # Download and compile ICU from sources.
28+ ICU_VERSION=${ICU_VERSION:- 70.1}
29+ curl -L -O https://github.com/unicode-org/icu/releases/download/release-${ICU_VERSION/ ./ -} /icu4c-${ICU_VERSION/ ./ _} -src.tgz
30+ tar xf icu4c-* -src.tgz
31+ cd icu/source
32+ CFLAGS=" -O3 -fPIC" CXXFLAGS=" -O3 -fPIC" ./configure --disable-shared --enable-static --prefix=$ICU_ROOT
33+ make -j2 install
34+
35+ fi
36+
1637cd $ROOT_DIR
1738
1839# Install cmake.
@@ -22,6 +43,6 @@ pip install "cmake==3.18.*"
2243rm -rf build
2344mkdir build
2445cd build
25- cmake -DLIB_ONLY=ON -DICU_ROOT=$ICU_ROOT ..
26- make -j2 install
46+ cmake -DLIB_ONLY=ON -DICU_ROOT=$ICU_ROOT $CMAKE_EXTRA_ARGS ..
47+ VERBOSE=1 make -j2 install
2748cd $ROOT_DIR
You can’t perform that action at this time.
0 commit comments