Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
snnn committed Oct 11, 2024
1 parent dc6906a commit 7683b6a
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions tools/ci_build/github/linux/build_linux_python_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,32 @@ if [ "$BUILD_CONFIG" != "Debug" ]; then
fi
if [ "$ENABLE_CACHE" = true ] ; then
BUILD_ARGS+=("--use_cache")
# No release binary for ccache aarch64, so we need to build it from source.
if ! [ -x "$(command -v ccache)" ]; then
ccache_url="https://github.com/ccache/ccache/archive/refs/tags/v4.8.tar.gz"
pushd .
curl -sSL --retry 5 --retry-delay 10 --create-dirs --fail -L -o ccache_src.tar.gz $ccache_url
mkdir ccache_main
cd ccache_main
tar -zxf ../ccache_src.tar.gz --strip=1

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/build -DCMAKE_BUILD_TYPE=Release ..
make -j$(nproc)
make install
export PATH=/build/bin:$PATH
which ccache
popd
rm -f ccache_src.tar.gz
rm -rf ccache_src
fi
ccache -s;
fi

ARCH=$(uname -m)

# No release binary for ccache aarch64, so we need to build it from source.
if ! [ -x "$(command -v ccache)" ]; then
ccache_url="https://github.com/ccache/ccache/archive/refs/tags/v4.8.tar.gz"
pushd .
curl -sSL --retry 5 --retry-delay 10 --create-dirs --fail -L -o ccache_src.tar.gz $ccache_url
mkdir ccache_main
cd ccache_main
tar -zxf ../ccache_src.tar.gz --strip=1

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/build -DCMAKE_BUILD_TYPE=Release ..
make -j$(nproc)
make install
export PATH=/build/bin:$PATH
which ccache
popd
rm -f ccache_src.tar.gz
rm -rf ccache_src
fi



echo "EXTRA_ARG:"
Expand Down Expand Up @@ -94,4 +96,6 @@ do
cp /build/"$BUILD_CONFIG"/dist/*.whl /build/dist
done

which ccache && ccache -sv && ccache -z
if [ "$ENABLE_CACHE" = true ] ; then
which ccache && ccache -sv && ccache -z
fi

0 comments on commit 7683b6a

Please sign in to comment.