mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 08:06:32 +00:00
实现unified-init库,支持收集初始化函数到一个数组,并统一初始化 (#474)
* 添加“统一初始化”的过程宏,并把SystemError独立成crate * 使用unified-init来初始化fbmem * 更新workflow,增加内核自动化静态测试
This commit is contained in:
10
.github/workflows/makefile.yml
vendored
10
.github/workflows/makefile.yml
vendored
@ -42,6 +42,14 @@ jobs:
|
||||
~/.bashrc
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.dadk_version }}-${{ hashFiles('.github/workflows/cache-toolchain.yml') }}
|
||||
|
||||
|
||||
- name: Format check
|
||||
run: |
|
||||
printf "\n" >> kernel/src/include/bindings/bindings.rs
|
||||
printf "\n" >> user/libs/libc/src/include/internal/bindings/bindings.rs
|
||||
FMT_CHECK=1 make fmt
|
||||
|
||||
- name: build the DragonOS
|
||||
run: bash -c "source ~/.cargo/env && export DragonOS_GCC=$HOME/opt/dragonos-gcc/gcc-x86_64-unknown-none/bin && make -j $(nproc) "
|
||||
|
||||
- name: Run kernel static test
|
||||
run: bash -c "source ~/.cargo/env && cd kernel && make test"
|
||||
|
38
.github/workflows/rustfmt.yml
vendored
38
.github/workflows/rustfmt.yml
vendored
@ -1,38 +0,0 @@
|
||||
name: Rust format check
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
# ensure the toolchain is cached
|
||||
ensure-toolchain:
|
||||
uses: ./.github/workflows/cache-toolchain.yml
|
||||
|
||||
fmt:
|
||||
name: check
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ensure-toolchain]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Cache build tools
|
||||
id: cache-build-tools
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: cache-build-tools
|
||||
dadk_version: 0.1.2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo
|
||||
~/.rustup
|
||||
~/.bashrc
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.dadk_version }}-${{ hashFiles('.github/workflows/cache-toolchain.yml') }}
|
||||
|
||||
# 准备 bindings.rs
|
||||
# 由于 bindings.rs 是在 build.rs 中生成的,而这里为了方便,直接 touch 一个空文件
|
||||
- name: prepare bindings
|
||||
run: |
|
||||
printf "\n" >> kernel/src/include/bindings/bindings.rs
|
||||
printf "\n" >> user/libs/libc/src/include/internal/bindings/bindings.rs
|
||||
|
||||
- name: Check format
|
||||
run: |
|
||||
FMT_CHECK=1 make fmt
|
Reference in New Issue
Block a user