Skip to content

Commit

Permalink
Merge pull request #214 from arceos-org/new-axconfig
Browse files Browse the repository at this point in the history
Refactor config system with axconfig-gen
  • Loading branch information
equation314 authored Dec 30, 2024
2 parents 26efed9 + 897d8f5 commit 0b1f95a
Show file tree
Hide file tree
Showing 67 changed files with 1,102 additions and 960 deletions.
67 changes: 33 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ jobs:
strategy:
fail-fast: false
matrix:
rust-toolchain: [nightly, nightly-2024-12-12]
arch: [x86_64, riscv64, aarch64]
rust-toolchain: [nightly, nightly-2024-12-25]
env:
RUSTUP_TOOLCHAIN: ${{ matrix.rust-toolchain }}
steps:
Expand All @@ -18,23 +19,20 @@ jobs:
toolchain: ${{ matrix.rust-toolchain }}
components: rust-src, clippy, rustfmt
targets: x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none, aarch64-unknown-none-softfloat
- uses: Swatinem/rust-cache@v2
- name: Check rust version
run: rustc --version --verbose
- name: Check code format
if: ${{ matrix.arch == 'x86_64' }}
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: cargo fmt --all -- --check
- name: Clippy for the default target
if: ${{ matrix.arch == 'x86_64' }}
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make clippy
- name: Clippy for x86_64
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make clippy ARCH=x86_64
- name: Clippy for riscv64
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make clippy ARCH=riscv64
- name: Clippy for aarch64
- name: Clippy for ${{ matrix.arch }}
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make clippy ARCH=aarch64
- name: Check code format
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: cargo fmt --all -- --check
run: make clippy ARCH=${{ matrix.arch }}

build:
runs-on: ${{ matrix.os }}
Expand All @@ -43,7 +41,7 @@ jobs:
matrix:
os: [ubuntu-latest]
arch: [x86_64, riscv64, aarch64]
rust-toolchain: [nightly, nightly-2024-12-12]
rust-toolchain: [nightly, nightly-2024-12-25]
env:
RUSTUP_TOOLCHAIN: ${{ matrix.rust-toolchain }}
steps:
Expand Down Expand Up @@ -87,7 +85,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
rust-toolchain: [nightly, nightly-2024-12-12]
rust-toolchain: [nightly, nightly-2024-12-25]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -102,42 +100,43 @@ jobs:
run: make PLATFORM=x86_64-pc-oslab A=examples/helloworld
- name: Build httpclient for x86_64-pc-oslab
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make PLATFORM=x86_64-pc-oslab A=examples/httpclient FEATURES=driver-ixgbe
run: make PLATFORM=x86_64-pc-oslab A=examples/httpclient FEATURES=page-alloc-4g,driver-ixgbe
- name: Build httpserver for x86_64-pc-oslab
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make PLATFORM=x86_64-pc-oslab A=examples/httpserver FEATURES=driver-ixgbe
run: make PLATFORM=x86_64-pc-oslab A=examples/httpserver FEATURES=page-alloc-4g,driver-ixgbe
- name: Build shell for x86_64-pc-oslab
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make PLATFORM=x86_64-pc-oslab A=examples/shell
- name: Build helloworld for x86_64-pc-oslab
run: make PLATFORM=x86_64-pc-oslab A=examples/shell FEATURES=page-alloc-4g,driver-ramdisk

- run: make PLATFORM=aarch64-raspi4 defconfig
- name: Build helloworld for aarch64-raspi4
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make PLATFORM=x86_64-pc-oslab A=examples/helloworld
- name: Build httpclient for x86_64-pc-oslab
run: make PLATFORM=aarch64-raspi4 SMP=4 A=examples/helloworld
- name: Build shell for aarch64-raspi4
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make PLATFORM=x86_64-pc-oslab A=examples/httpclient FEATURES=driver-ixgbe
- name: Build httpserver for x86_64-pc-oslab
run: make PLATFORM=aarch64-raspi4 SMP=4 A=examples/shell FEATURES=page-alloc-4g,driver-bcm2835-sdhci BUS=mmio

- run: make PLATFORM=aarch64-bsta1000b defconfig
- name: Build helloworld for aarch64-bsta1000b
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make PLATFORM=x86_64-pc-oslab A=examples/httpserver FEATURES=driver-ixgbe
- name: Build shell for x86_64-pc-oslab
run: make PLATFORM=aarch64-bsta1000b A=examples/helloworld SMP=8

- run: make PLATFORM=aarch64-phytium-pi defconfig
- name: Build helloworld for aarch64-phytium-pi
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make PLATFORM=x86_64-pc-oslab A=examples/shell
- name: Build helloworld for aarch64-raspi4
run: make PLATFORM=aarch64-raspi4 A=examples/helloworld
- name: Build shell for aarch64-raspi4
run: make PLATFORM=aarch64-raspi4 A=examples/shell FEATURES=driver-bcm2835-sdhci
- name: Build helloworld for aarch64-bsta1000b
run: make PLATFORM=aarch64-bsta1000b A=examples/helloworld

run: make PLATFORM=aarch64-phytium-pi A=examples/helloworld SMP=4

- uses: ./.github/workflows/actions/setup-musl
with:
arch: x86_64
- run: make PLATFORM=x86_64-pc-oslab defconfig
- name: Build helloworld-c for x86_64-pc-oslab
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make PLATFORM=x86_64-pc-oslab A=examples/helloworld-c
- name: Build httpclient-c for x86_64-pc-oslab
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make PLATFORM=x86_64-pc-oslab A=examples/httpclient-c
run: make PLATFORM=x86_64-pc-oslab A=examples/httpclient-c FEATURES=page-alloc-4g,driver-ixgbe
- name: Build httpserver-c for x86_64-pc-oslab
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make PLATFORM=x86_64-pc-oslab A=examples/httpserver-c
run: make PLATFORM=x86_64-pc-oslab A=examples/httpserver-c FEATURES=page-alloc-4g,driver-ixgbe

3 changes: 2 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build & Deploy docs
on: [push, pull_request]

env:
rust-toolchain: nightly-2024-12-12
rust-toolchain: nightly-2024-12-25

jobs:
doc:
Expand All @@ -19,6 +19,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.rust-toolchain }}
- uses: Swatinem/rust-cache@v2
- name: Build docs
continue-on-error: ${{ github.ref != env.default-branch && github.event_name != 'pull_request' }}
run: make doc_check_missing
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on: [push, pull_request]

env:
qemu-version: 8.2.0
rust-toolchain: nightly-2024-12-12
arceos-apps: '57c8074'
rust-toolchain: nightly-2024-12-25
arceos-apps: '53914e4'

jobs:
unit-test:
Expand All @@ -16,6 +16,7 @@ jobs:
with:
toolchain: ${{ env.rust-toolchain }}
components: rust-src
- uses: Swatinem/rust-cache@v2
- name: Run unit tests
run: make unittest_no_fail_fast

Expand Down Expand Up @@ -44,5 +45,6 @@ jobs:
run: |
make disk_img
git clone https://github.com/arceos-org/arceos-apps.git
cd arceos-apps && cp ../Cargo.lock . && git reset --hard ${{ env.arceos-apps }} && cd ..
make -C arceos-apps test AX_ROOT=$(pwd) ARCH=${{ matrix.arch }}
cd arceos-apps && git reset --hard ${{ env.arceos-apps }} && cd ..
make -C arceos-apps chaxroot AX_ROOT=$(pwd)
make -C arceos-apps test ARCH=${{ matrix.arch }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
qemu.log
rusty-tags.vi
/.project*
/.axconfig.*
Loading

0 comments on commit 0b1f95a

Please sign in to comment.