Skip to content

Commit 8cb18d8

Browse files
committed
build: update ci-test
1 parent 2643951 commit 8cb18d8

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

.github/workflows/test-template.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ jobs:
5959
name: starry-${{ inputs.arch }}
6060

6161
- name: Prepare rootfs
62-
run: |
63-
make ARCH=${{ inputs.arch }} img
62+
run: make ARCH=${{ inputs.arch }} rootfs
6463

6564
- name: Test
66-
run: scripts/ci-test.py ${{ inputs.arch }}
65+
run: make ARCH=${{ inputs.arch }} ci-test

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ defconfig justrun clean:
4444
build run debug disasm: defconfig
4545
@$(MAKE) -C make $@
4646

47+
ci-test:
48+
./scripts/ci-test.py $(ARCH)
49+
4750
# Aliases
4851
rv:
4952
$(MAKE) ARCH=riscv64 run

scripts/test.sh

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ step3_arch_tests() {
8383

8484
# Rootfs download (skipped by Makefile if image already exists)
8585
echo " [${arch}] Downloading rootfs..."
86-
cargo xtask rootfs --arch="${arch}"
86+
make ARCH="${arch}" rootfs
8787

8888
# Kernel build
8989
echo " [${arch}] Building kernel..."
90-
cargo xtask build --arch="${arch}"
90+
make ARCH="${arch}" build
9191

9292
# QEMU boot test
9393
if [ "$skip_qemu" = "true" ]; then
@@ -101,7 +101,7 @@ step3_arch_tests() {
101101
fi
102102

103103
echo " [${arch}] Running QEMU boot test..."
104-
if cargo xtask test --arch="${arch}"; then
104+
if make ARCH="${arch}" ci-test; then
105105
echo " [${arch}] OK: boot test passed"
106106
else
107107
echo " [${arch}] ERROR: boot test FAILED"
@@ -127,22 +127,20 @@ step4_publish() {
127127

128128
local all_passed=true
129129

130-
for arch in "${ARCHS[@]}"; do
131-
echo ""
132-
echo " --- Publish check: ${arch} ---"
133-
if cargo xtask publish --arch="${arch}"; then
134-
echo " [${arch}] OK: publish check passed"
135-
else
136-
echo " [${arch}] ERROR: publish check FAILED"
137-
all_passed=false
138-
fi
139-
done
130+
echo ""
131+
echo " --- Publish check ---"
132+
if cargo publish --workspace --dry-run --allow-dirty; then
133+
echo " [${arch}] OK: publish check passed"
134+
else
135+
echo " [${arch}] ERROR: publish check FAILED"
136+
all_passed=false
137+
fi
140138

141139
echo ""
142140
if [ "$all_passed" = "true" ]; then
143-
echo " OK: all architecture publish checks passed"
141+
echo " OK: publish check passed"
144142
else
145-
echo "ERROR: one or more publish checks failed"
143+
echo "ERROR: publish check failed"
146144
exit 1
147145
fi
148146
echo ""

0 commit comments

Comments
 (0)