@@ -30,11 +30,35 @@ check_format() {
3030 echo " "
3131}
3232
33- # Clippy lint check
33+ # Clippy lint check by architecture
3434check_clippy () {
3535 echo " [3/7] Running clippy lint checks..."
36- cargo clippy -- -D warnings
37- echo " ✓ Clippy check passed"
36+
37+ local archs=(" riscv64" " x86_64" " aarch64" " loongarch64" )
38+ local targets=(" riscv64gc-unknown-none-elf" " x86_64-unknown-none" " aarch64-unknown-none-softfloat" " loongarch64-unknown-none" )
39+
40+ for i in " ${! archs[@]} " ; do
41+ local arch=" ${archs[$i]} "
42+ local target=" ${targets[$i]} "
43+
44+ echo " "
45+ echo " Running clippy for architecture: $arch "
46+
47+ # Install config file for the architecture
48+ cp " configs/${arch} .toml" " .axconfig.toml"
49+
50+ if cargo clippy --target=" $target " -- -D warnings; then
51+ echo " ✓ $arch clippy check passed"
52+ else
53+ echo " Error: $arch clippy check failed"
54+ rm -f .axconfig.toml
55+ exit 1
56+ fi
57+ done
58+
59+ rm -f .axconfig.toml
60+ echo " "
61+ echo " ✓ All architecture clippy checks passed"
3862 echo " "
3963}
4064
@@ -81,11 +105,35 @@ run_arch_tests() {
81105 echo " "
82106}
83107
84- # Publish dry-run check
108+ # Publish dry-run check by architecture
85109check_publish () {
86110 echo " [6/7] Checking publish readiness..."
87- cargo publish --dry-run --allow-dirty
88- echo " ✓ Publish check passed"
111+
112+ local archs=(" riscv64" " x86_64" " aarch64" " loongarch64" )
113+ local targets=(" riscv64gc-unknown-none-elf" " x86_64-unknown-none" " aarch64-unknown-none-softfloat" " loongarch64-unknown-none" )
114+
115+ for i in " ${! archs[@]} " ; do
116+ local arch=" ${archs[$i]} "
117+ local target=" ${targets[$i]} "
118+
119+ echo " "
120+ echo " Checking publish for architecture: $arch "
121+
122+ # Install config file for the architecture
123+ cp " configs/${arch} .toml" " .axconfig.toml"
124+
125+ if cargo publish --dry-run --allow-dirty --target=" $target " ; then
126+ echo " ✓ $arch publish check passed"
127+ else
128+ echo " Error: $arch publish check failed"
129+ rm -f .axconfig.toml
130+ exit 1
131+ fi
132+ done
133+
134+ rm -f .axconfig.toml
135+ echo " "
136+ echo " ✓ All architecture publish checks passed"
89137 echo " "
90138}
91139
0 commit comments