浏览代码

pipeline: add test build pipeline

Signed-off-by: greatbridf <greatbridf@icloud.com>
greatbridf 6 月之前
父节点
当前提交
c8b721d605
共有 1 个文件被更改,包括 41 次插入0 次删除
  1. 41 0
      .github/workflows/test-build.yaml

+ 41 - 0
.github/workflows/test-build.yaml

@@ -0,0 +1,41 @@
+name: Test Build
+
+on:
+  push:
+    branches-ignore:
+      - comp-and-judge
+  pull_request:
+    branches-ignore:
+      - comp-and-judge
+  workflow_dispatch:
+
+jobs:
+  run-build:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v4
+      
+      - name: Setup rust nightly
+        run: rustup component add rust-src llvm-tools
+
+      - name: Configure
+        run: ./configure
+
+      - name: Build for riscv64 targets
+        run: make build ARCH=riscv64 MODE=release
+
+      - name: Upload riscv64 build artifacts
+        uses: actions/upload-artifact@v4
+        with:
+          name: kernel-riscv64
+          path: build/riscv64gc-unknown-none-elf/release/eonix_kernel
+
+      - name: Build for loongarch64 targets
+        run: make build ARCH=loongarch64 MODE=release
+
+      - name: Upload loongarch64 build artifacts
+        uses: actions/upload-artifact@v4
+        with:
+          name: kernel-loongarch64
+          path: build/loongarch64gc-unknown-none-elf/release/eonix_kernel