chore: 适配dadk 0.1.11 (#777)

* chore: 适配dadk 0.1.11
This commit is contained in:
LoGin
2024-04-28 13:39:51 +08:00
committed by GitHub
parent dd8e74ef0d
commit 182b778a3c
41 changed files with 138 additions and 50 deletions

View File

@ -23,7 +23,7 @@ runs:
uses: actions/cache@v3
env:
cache-name: cache-build-tools
dadk_version: 0.1.6
dadk_version: 0.1.11
with:
path: |
~/.cargo

View File

@ -34,7 +34,7 @@ jobs:
uses: actions/cache@v3
env:
cache-name: cache-build-tools
dadk_version: 0.1.6
dadk_version: 0.1.11
with:
path: |
~/.cargo
@ -78,18 +78,14 @@ jobs:
rustup default nightly
cargo install dadk --version 0.1.6
cargo install dadk --version 0.1.11
fork_toolchain_from="nightly-2023-08-15-x86_64-unknown-linux-gnu"
custom_toolchain="nightly-2023-08-15-x86_64-unknown-linux_dragonos-gnu"
custom_toolchain_dir="$(dirname $(rustc --print sysroot))/${custom_toolchain}"
echo "Custom toolchain does not exist, creating..."
rustup toolchain install ${fork_toolchain_from}
rustup component add --toolchain ${fork_toolchain_from} rust-src
rustup target add --toolchain ${fork_toolchain_from} x86_64-unknown-linux-musl
cp -r $(dirname $(rustc --print sysroot))/${fork_toolchain_from} ${custom_toolchain_dir}
self_contained_dir=${custom_toolchain_dir}/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained
cp -f ${self_contained_dir}/crt1.o ${self_contained_dir}/rcrt1.o
userapp_musl_toolchain="nightly-2023-08-15-x86_64-unknown-linux-gnu"
rustup toolchain install ${userapp_musl_toolchain}
rustup component add --toolchain ${userapp_musl_toolchain} rust-src
rustup target add --toolchain ${userapp_musl_toolchain} x86_64-unknown-linux-musl