mirror of
https://github.com/hexagonal-sun/moss-kernel.git
synced 2025-12-23 22:47:55 -05:00
github: ci: new
Add CI for checking & building the kernel.
This commit is contained in:
35
.github/workflows/ci.yml
vendored
Normal file
35
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Use the toolchain from rust-toolchain.toml
|
||||
- name: Install Rust
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
|
||||
- name: Verify installed toolchain and targets
|
||||
run: |
|
||||
rustc --version
|
||||
rustup show
|
||||
rustup target list --installed
|
||||
|
||||
- name: Check formatting
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
- name: Run clippy
|
||||
run: cargo clippy -- -D warnings
|
||||
|
||||
- name: Run unit tests for libkernel
|
||||
run: cargo test -p libkernel --target x86_64-unknown-linux-gnu --all-features
|
||||
@@ -1,4 +1,4 @@
|
||||
[toolchain]
|
||||
channel = "nightly"
|
||||
components = [ "rust-src", "llvm-tools-preview" ]
|
||||
components = [ "rust-src", "llvm-tools-preview", "rustfmt", "clippy" ]
|
||||
targets = [ "aarch64-unknown-none-softfloat" ]
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
use crate::{fs::VFS, memory::uaccess::{copy_to_user_slice, cstr::UserCStr}, sched::current_task};
|
||||
use core::{ffi::c_char, str::FromStr};
|
||||
use crate::{
|
||||
fs::VFS,
|
||||
memory::uaccess::{copy_to_user_slice, cstr::UserCStr},
|
||||
sched::current_task,
|
||||
};
|
||||
use alloc::{ffi::CString, string::ToString};
|
||||
use libkernel::{error::{KernelError, Result}, fs::path::Path, memory::address::{TUA, UA}};
|
||||
use core::{ffi::c_char, str::FromStr};
|
||||
use libkernel::{
|
||||
error::{KernelError, Result},
|
||||
fs::path::Path,
|
||||
memory::address::{TUA, UA},
|
||||
};
|
||||
|
||||
pub async fn sys_getcwd(buf: UA, len: usize) -> Result<usize> {
|
||||
let task = current_task();
|
||||
|
||||
@@ -10,11 +10,14 @@ use alloc::{
|
||||
use creds::Credentials;
|
||||
use ctx::{Context, UserCtx};
|
||||
use fd_table::FileDescriptorTable;
|
||||
use libkernel::{fs::pathbuf::PathBuf, memory::{
|
||||
address::VA,
|
||||
proc_vm::{ProcessVM, vmarea::VMArea},
|
||||
}};
|
||||
use libkernel::{VirtualMemory, fs::Inode};
|
||||
use libkernel::{
|
||||
fs::pathbuf::PathBuf,
|
||||
memory::{
|
||||
address::VA,
|
||||
proc_vm::{ProcessVM, vmarea::VMArea},
|
||||
},
|
||||
};
|
||||
use thread_group::{
|
||||
Tgid, ThreadGroup,
|
||||
builder::ThreadGroupBuilder,
|
||||
|
||||
Reference in New Issue
Block a user