From c1294be2883856e67fa06f4feb94739da9465ef2 Mon Sep 17 00:00:00 2001 From: yufeng <321353225@qq.com> Date: Sat, 4 May 2024 03:30:24 +0800 Subject: [PATCH] ci: add example ci --- .github/workflows/example.yaml | 21 +++++++++++++++++++++ example/Makefile | 6 ++++++ 2 files changed, 27 insertions(+) create mode 100644 .github/workflows/example.yaml diff --git a/.github/workflows/example.yaml b/.github/workflows/example.yaml new file mode 100644 index 0000000..db98c36 --- /dev/null +++ b/.github/workflows/example.yaml @@ -0,0 +1,21 @@ +name: Run Example CI + +on: + workflow_dispatch: + push: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + - name: Go to example dir + run: cd example + - name: Test riscv64 + run: make ARCH=riscv64 run + - name: Test aarch64 + run: make ARCH=aarch64 run + - name: Test x86_64 + run: make ARCH=x86_64 run + diff --git a/example/Makefile b/example/Makefile index 0f47e23..3cec0a3 100644 --- a/example/Makefile +++ b/example/Makefile @@ -59,4 +59,10 @@ QEMU_EXEC += -nographic -smp 1 run-inner: build $(QEMU_EXEC) +test: + make ARCH=aarch64 run + make ARCH=riscv64 run + make ARCH=x86_64 run +# make ARCH=loongarch64 run + .PHONY: build env kernel clean run-inner