Skip to content

Commit

Permalink
[platforms] export platform operations in axplat-x86-pc using axhal_plat
Browse files Browse the repository at this point in the history
  • Loading branch information
equation314 committed Jan 25, 2025
1 parent bb4fe0c commit d204668
Show file tree
Hide file tree
Showing 18 changed files with 631 additions and 237 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on: [push, pull_request]

jobs:
ci:
crates:
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -22,12 +22,13 @@ jobs:
- name: Check code format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --target ${{ matrix.targets }} --all-features --workspace --exclude axplat-cli
run: |
cargo clippy --target ${{ matrix.targets }} --all-features -p axhal_cpu -p axhal_plat
- name: Build
run: cargo build --target ${{ matrix.targets }} --all-features --workspace --exclude axplat-cli
run: cargo build --target ${{ matrix.targets }} --all-features -p axhal_cpu -p axhal_plat
- name: Unit test
if: ${{ matrix.targets == 'x86_64-unknown-linux-gnu' }}
run: cargo test --target ${{ matrix.targets }} -- --nocapture
run: cargo test --target ${{ matrix.targets }} --all-features -p axhal_cpu -p axhal_plat -- --nocapture

cli:
runs-on: ubuntu-latest
Expand All @@ -43,6 +44,21 @@ jobs:
- name: Build
run: cargo build -p axplat-cli

platforms:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rust-src, clippy
targets: x86_64-unknown-none
- name: axplat-x86-pc
run: |
cargo clippy --target x86_64-unknown-none --all-features -p axplat-x86-pc
cargo build --target x86_64-unknown-none --all-features -p axplat-x86-pc
doc:
runs-on: ubuntu-latest
strategy:
Expand All @@ -57,7 +73,7 @@ jobs:
- uses: dtolnay/rust-toolchain@nightly
- name: Build docs
continue-on-error: ${{ github.ref != env.default-branch && github.event_name != 'pull_request' }}
run: cargo doc --no-deps --all-features --workspace --exclude axplat-cli
run: cargo doc --no-deps --all-features --workspace --exclude axplat-*
- name: Deploy to Github Pages
if: ${{ github.ref == env.default-branch }}
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
209 changes: 200 additions & 9 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ members = [
"axhal_plat",
"axhal_plat_macros",
"axplat-cli",
"platforms/axplat-x86-pc",
]

[workspace.package]
Expand Down
4 changes: 2 additions & 2 deletions axhal_cpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ x86 = "0.52"
x86_64 = "0.15.2"

[target.'cfg(target_arch = "aarch64")'.dependencies]
aarch64-cpu = "9.4"
tock-registers = "0.8"
aarch64-cpu = "10.0"
tock-registers = "0.9"

[target.'cfg(any(target_arch = "riscv32", target_arch = "riscv64"))'.dependencies]
riscv = "0.12"
Expand Down
Loading

0 comments on commit d204668

Please sign in to comment.