Skip to content

Commit

Permalink
Move test kernels to a separate workspace
Browse files Browse the repository at this point in the history
The test kernels need to be built for a different target and we don't want to unify dependency features with the main packages (as this can lead to enabled `std` features).
  • Loading branch information
phil-opp committed Jan 21, 2025
1 parent 8165441 commit 80e1905
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 19 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
- uses: r7kamura/[email protected]
- name: "Run `cargo check`"
run: cargo check --all-targets --all
- name: "Check test kernels"
run: cargo check --all
working-directory: tests/test_kernels
- name: "Check docs.rs build"
run: cargo check
env:
Expand Down Expand Up @@ -89,6 +92,8 @@ jobs:
- uses: actions/checkout@v3
- uses: r7kamura/[email protected]
- run: cargo fmt --all -- --check
- run: cargo fmt --all -- --check
working-directory: tests/test_kernels

clippy:
name: Clippy
Expand All @@ -99,6 +104,8 @@ jobs:
- uses: Swatinem/rust-cache@v2
- uses: r7kamura/[email protected]
- run: cargo clippy --all --all-targets
- run: cargo clippy --all
working-directory: tests/test_kernels

semver-checks:
name: Semver Checks
Expand Down
9 changes: 0 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 1 addition & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,8 @@ members = [
"bios/stage-*",
"bios/common",
"tests/runner",
"tests/test_kernels/default_settings",
"tests/test_kernels/map_phys_mem",
"tests/test_kernels/higher_half",
"tests/test_kernels/pie",
"tests/test_kernels/lto",
"tests/test_kernels/ramdisk",
"tests/test_kernels/min_stack",
"tests/test_kernels/lower_memory_free",
"tests/test_kernels/write_usable_memory",
]
exclude = ["examples/basic", "examples/test_framework"]
exclude = ["examples/basic", "examples/test_framework", "tests/test_kernels"]

[workspace.package]
# don't forget to update `workspace.dependencies` below
Expand Down
1 change: 1 addition & 0 deletions tests/test_kernels/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[build]
target-dir = "../../target"
target = "x86_64-unknown-none"
141 changes: 141 additions & 0 deletions tests/test_kernels/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions tests/test_kernels/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[workspace]
resolver = "2"
members = [
"default_settings",
"map_phys_mem",
"higher_half",
"pie",
"lto",
"ramdisk",
"min_stack",
"lower_memory_free",
"write_usable_memory",
]

0 comments on commit 80e1905

Please sign in to comment.