mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-08 18:26:48 +00:00
* 实现写日志和读取日志,并且能够在用户态下执行dmesg命令查看日志 * 通过klogctl实现dmesg * 改用ConstGenericRingBuffer作内核缓冲区 * 更改缓冲区容量 * 将能够输出到控制台的日志级别改为日志级别枚举类,使用SpinLock控制KMSG,使用枚举类定义SYSLOG_ACTION,将do_syslog系统调用接口放在syscall.rs * fix warning * 完善do_syslog注释 * 将KMSG接入kinfo、kdebug等 * fix warning * 修复显示的秒数不正确,·以及无法通过CI的问题
101 lines
2.1 KiB
YAML
101 lines
2.1 KiB
YAML
name: Build Check
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
pull_request:
|
|
branches: [ "master" ]
|
|
|
|
jobs:
|
|
# ensure the toolchain is cached
|
|
ensure-toolchain:
|
|
uses: ./.github/workflows/cache-toolchain.yml
|
|
|
|
format-check:
|
|
name: Format check ${{ matrix.arch }}
|
|
runs-on: ubuntu-latest
|
|
needs: [ensure-toolchain]
|
|
continue-on-error: true
|
|
|
|
strategy:
|
|
matrix:
|
|
arch: [x86_64, riscv64]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: ./.github/actions/import-toolchain
|
|
|
|
- name: Format check
|
|
env:
|
|
ARCH: ${{ matrix.arch }}
|
|
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
|
|
|
|
kernel-static-test:
|
|
name: Kernel static test ${{ matrix.arch }}
|
|
runs-on: ubuntu-latest
|
|
needs: [ensure-toolchain]
|
|
continue-on-error: true
|
|
|
|
strategy:
|
|
matrix:
|
|
arch: [x86_64, riscv64]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: ./.github/actions/import-toolchain
|
|
|
|
- name: Run kernel static test
|
|
shell: bash -ileo pipefail {0}
|
|
env:
|
|
ARCH: ${{ matrix.arch }}
|
|
run: bash -c "source ~/.cargo/env && cd kernel && make test"
|
|
|
|
build-x86_64:
|
|
|
|
runs-on: ubuntu-latest
|
|
needs: [ensure-toolchain]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: ./.github/actions/import-toolchain
|
|
|
|
|
|
- name: build the DragonOS
|
|
env:
|
|
ARCH: x86_64
|
|
shell: bash -ileo pipefail {0}
|
|
|
|
run: |
|
|
source ~/.bashrc
|
|
source ~/.cargo/env
|
|
export DragonOS_GCC=$HOME/opt/dragonos-gcc/gcc-x86_64-unknown-none/bin
|
|
|
|
make -j $(nproc)
|
|
|
|
|
|
build-riscv64:
|
|
|
|
runs-on: ubuntu-latest
|
|
needs: [ensure-toolchain]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: 'recursive'
|
|
|
|
- uses: ./.github/actions/import-toolchain
|
|
|
|
- name: build the DragonOS
|
|
shell: bash -ileo pipefail {0}
|
|
env:
|
|
ARCH: riscv64
|
|
|
|
run: source ~/.bashrc && source ~/.cargo/env && make kernel -j $(nproc)
|
|
|