mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 08:06:32 +00:00
build: Remove DragonOS_GCC And make CI use docker image (#954)
* build: 不再需要x86_64-elf-gcc的支持 * ci: 添加ci用的docker镜像 * 切换workflow到构建用的容器上 --------- Signed-off-by: longjin <longjin@DragonOS.org>
This commit is contained in:
@ -1,6 +1,13 @@
|
||||
echo "正在为rust换源"
|
||||
echo "bash change_rust_src.sh --sparse以使用稀疏索引"
|
||||
|
||||
sparse="false"
|
||||
|
||||
CONFIG_FILE=~/.cargo/config.toml
|
||||
# 创建父目录
|
||||
if [ ! -d ~/.cargo ]; then
|
||||
mkdir -p ~/.cargo
|
||||
fi
|
||||
|
||||
while true; do
|
||||
if [ -z "$1" ]; then
|
||||
break;
|
||||
@ -13,21 +20,32 @@ while true; do
|
||||
esac
|
||||
shift 1
|
||||
done
|
||||
if [ -z ${sparse} ]; then
|
||||
echo -e "[source.crates-io] \n \
|
||||
registry = \"https://github.com/rust-lang/crates.io-index\" \n \
|
||||
\n \
|
||||
replace-with = 'tuna' \n \
|
||||
[source.tuna] \n \
|
||||
registry = \"sparse+https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/\" \n \
|
||||
" > ~/.cargo/config.toml
|
||||
else
|
||||
echo -e "[source.crates-io] \n \
|
||||
registry = \"https://github.com/rust-lang/crates.io-index\" \n \
|
||||
\n \
|
||||
replace-with = 'tuna' \n \
|
||||
[source.tuna] \n \
|
||||
registry = \"https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git\" \n \
|
||||
" > ~/.cargo/config.toml
|
||||
|
||||
|
||||
if [ -z ${sparse} ]; then
|
||||
echo -e "[source.crates-io] \n \
|
||||
replace-with = 'rsproxy-sparse' \n \
|
||||
[source.rsproxy] \n \
|
||||
registry = \"https://rsproxy.cn/crates.io-index\" \n \
|
||||
[source.rsproxy-sparse] \n \
|
||||
registry = \"sparse+https://rsproxy.cn/index/\" \n \
|
||||
[registries.rsproxy] \n \
|
||||
index = \"https://rsproxy.cn/crates.io-index\" \n \
|
||||
[net] \n \
|
||||
git-fetch-with-cli = true \n \
|
||||
" > $CONFIG_FILE
|
||||
else
|
||||
echo "TIPS: bash change_rust_src.sh --sparse以使用稀疏索引"
|
||||
|
||||
echo -e "[source.crates-io] \n \
|
||||
replace-with = 'rsproxy' \n \
|
||||
[source.rsproxy] \n \
|
||||
registry = \"https://rsproxy.cn/crates.io-index\" \n \
|
||||
[source.rsproxy-sparse] \n \
|
||||
registry = \"sparse+https://rsproxy.cn/index/\" \n \
|
||||
[registries.rsproxy] \n \
|
||||
index = \"https://rsproxy.cn/crates.io-index\" \n \
|
||||
[net] \n \
|
||||
git-fetch-with-cli = true \n \
|
||||
" > $CONFIG_FILE
|
||||
fi
|
||||
|
Reference in New Issue
Block a user