Skip to content

Commit

Permalink
Update rust-toolchain to nightly-2024-05-02 and add new complie target
Browse files Browse the repository at this point in the history
  • Loading branch information
Azure-stars committed May 13, 2024
1 parent 9bea5b8 commit 65a4f58
Show file tree
Hide file tree
Showing 11 changed files with 443 additions and 136 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

[env]
AX_WORK_DIR = { value = ".", relative = true }
AX_LIBC_DIR = { value = "crates/axlibc", relative = true }
AX_LIBC_DIR = { value = "tools/axlibc", relative = true }
119 changes: 62 additions & 57 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@ jobs:
strategy:
fail-fast: false
matrix:
rust-toolchain: [nightly, nightly-2024-01-19]
rust-toolchain: [nightly, nightly-2024-05-02]
env:
RUSTUP_TOOLCHAIN: ${{ matrix.rust-toolchain }}
steps:
- uses: actions/checkout@v3
- name: Setup C++ environment
run: sudo apt-get update && sudo apt-get install -y build-essential
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
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
- name: Setup C++ environment
run: sudo apt-get update && sudo apt-get install -y build-essential
- uses: ./.github/workflows/actions/setup-musl
with:
arch: x86_64
Expand All @@ -31,14 +33,16 @@ jobs:
- uses: ./.github/workflows/actions/setup-musl
with:
arch: aarch64
- name: Check rust version
run: rustc --version --verbose
- name: Clippy for the default target
run: make pre_libc && make clippy
run: make clippy
- name: Clippy for x86_64
run: make pre_libc && make clippy ARCH=x86_64
run: make clippy ARCH=x86_64
- name: Clippy for riscv64
run: make pre_libc && make clippy ARCH=riscv64
run: make clippy ARCH=riscv64
- name: Clippy for aarch64
run: make pre_libc && make clippy ARCH=aarch64
run: make clippy ARCH=aarch64
- name: Check code format
run: cargo fmt --all -- --check

Expand All @@ -49,19 +53,18 @@ jobs:
matrix:
os: [ubuntu-latest]
arch: [x86_64, riscv64, aarch64]
rust-toolchain: [nightly, nightly-2024-01-19]
rust-toolchain: [nightly, nightly-2024-05-02]
env:
RUSTUP_TOOLCHAIN: ${{ matrix.rust-toolchain }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ matrix.rust-toolchain }}
components: rust-src
- uses: actions-rs/[email protected]
with:
crate: cargo-binutils
version: latest
use-tool-cache: true
components: rust-src, llvm-tools
targets: x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none, aarch64-unknown-none-softfloat
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- name: Build helloworld
run: make ARCH=${{ matrix.arch }} A=apps/helloworld
- name: Build memtest
Expand Down Expand Up @@ -95,41 +98,40 @@ jobs:
with:
arch: ${{ matrix.arch }}
- name: Build c/helloworld
run: make pre_libc && make ARCH=${{ matrix.arch }} A=apps/c/helloworld
run: make ARCH=${{ matrix.arch }} A=apps/c/helloworld
- name: Build c/memtest
run: make pre_libc && make ARCH=${{ matrix.arch }} A=apps/c/memtest
run: make ARCH=${{ matrix.arch }} A=apps/c/memtest
- name: Build c/sqlite3
run: make pre_libc && make ARCH=${{ matrix.arch }} A=apps/c/sqlite3
run: make ARCH=${{ matrix.arch }} A=apps/c/sqlite3
- name: Build c/httpclient
run: make pre_libc && make ARCH=${{ matrix.arch }} A=apps/c/httpclient
run: make ARCH=${{ matrix.arch }} A=apps/c/httpclient
- name: Build c/httpserver
run: make pre_libc && make ARCH=${{ matrix.arch }} A=apps/c/httpserver
run: make ARCH=${{ matrix.arch }} A=apps/c/httpserver
- name: Build c/udpserver
run: make pre_libc && make ARCH=${{ matrix.arch }} A=apps/c/udpserver
run: make ARCH=${{ matrix.arch }} A=apps/c/udpserver
- name: Build c/iperf
run: make pre_libc && make ARCH=${{ matrix.arch }} A=apps/c/iperf
run: make ARCH=${{ matrix.arch }} A=apps/c/iperf
- name: Build c/redis
run: make pre_libc && make ARCH=${{ matrix.arch }} A=apps/c/redis SMP=4
run: make ARCH=${{ matrix.arch }} A=apps/c/redis SMP=4

build-apps-for-other-platforms:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
rust-toolchain: [nightly, nightly-2024-01-19]
rust-toolchain: [nightly, nightly-2024-05-02]
env:
RUSTUP_TOOLCHAIN: ${{ matrix.rust-toolchain }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ matrix.rust-toolchain }}
components: rust-src
- uses: actions-rs/[email protected]
with:
crate: cargo-binutils
version: latest
use-tool-cache: true
components: rust-src, llvm-tools
targets: x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none, aarch64-unknown-none-softfloat
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- uses: ./.github/workflows/actions/setup-musl
with:
arch: x86_64
Expand All @@ -139,9 +141,9 @@ jobs:
- name: Build net/httpserver for x86_64-pc-oslab
run: make PLATFORM=x86_64-pc-oslab A=apps/net/httpserver FEATURES=driver-ixgbe
- name: Build c/iperf for x86_64-pc-oslab
run: make pre_libc && make PLATFORM=x86_64-pc-oslab A=apps/c/iperf FEATURES=driver-ixgbe,driver-ramdisk
run: make PLATFORM=x86_64-pc-oslab A=apps/c/iperf FEATURES=driver-ixgbe,driver-ramdisk
- name: Build c/redis for x86_64-pc-oslab
run: make pre_libc && make PLATFORM=x86_64-pc-oslab A=apps/c/redis FEATURES=driver-ixgbe,driver-ramdisk SMP=4
run: make PLATFORM=x86_64-pc-oslab A=apps/c/redis FEATURES=driver-ixgbe,driver-ramdisk SMP=4

- name: Build helloworld for aarch64-raspi4
run: make PLATFORM=aarch64-raspi4 A=apps/helloworld
Expand All @@ -158,12 +160,13 @@ jobs:
matrix:
os: [ubuntu-latest]
arch: [x86_64]
rust-toolchain: [nightly, nightly-2024-01-19]
rust-toolchain: [nightly, nightly-2024-05-02]
env:
RUSTUP_TOOLCHAIN: ${{ matrix.rust-toolchain }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ matrix.rust-toolchain }}
- name: Build helloworld
run: cargo build -p arceos-helloworld
Expand Down Expand Up @@ -199,17 +202,19 @@ jobs:
matrix:
os: [ubuntu-latest]
arch: [x86_64, riscv64, aarch64]
rust-toolchain: [nightly, nightly-2024-05-02]
env:
RUSTUP_TOOLCHAIN: ${{ matrix.rust-toolchain }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.rust-toolchain }}
components: rust-src
- uses: actions-rs/[email protected]
with:
crate: cargo-binutils
version: latest
use-tool-cache: true
- name: Bulld monolithic-userboot
run: ./build_img.sh -m ${{ matrix.arch }} & make ARCH=${{ matrix.arch }} A=apps/monolithic_userboot
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust-toolchain }}
components: rust-src, llvm-tools
targets: x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none, aarch64-unknown-none-softfloat
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- name: Bulld monolithic-userboot
run: |
sh ./build_img.sh -m ${{ matrix.arch }}
make ARCH=${{ matrix.arch }} A=apps/monolithic_userboot
10 changes: 4 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: Build & Deploy docs

on: [push, pull_request]


env:
rust-toolchain: nightly-2024-01-19
rust-toolchain: nightly-2024-05-02

jobs:
doc:
Expand All @@ -16,10 +15,9 @@ jobs:
env:
default-branch: ${{ format('refs/heads/{0}', github.event.repository.default_branch) }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ env.rust-toolchain }}
- uses: ./.github/workflows/actions/setup-musl
with:
Expand All @@ -32,7 +30,7 @@ jobs:
arch: aarch64
- name: Build docs
continue-on-error: ${{ github.ref != env.default-branch && github.event_name != 'pull_request' }}
run: make pre_libc && make doc_check_missing
run: make doc_check_missing
- name: Deploy to Github Pages
if: ${{ github.ref == env.default-branch }}
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
40 changes: 13 additions & 27 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]

env:
qemu-version: 8.2.0
rust-toolchain: nightly-2024-01-19
rust-toolchain: nightly-2024-05-02

jobs:
app-test-for-unikernel:
Expand All @@ -16,17 +16,13 @@ jobs:
os: [ubuntu-latest]
arch: [x86_64, riscv64, aarch64]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ env.rust-toolchain }}
components: rust-src
- uses: actions-rs/[email protected]
with:
crate: cargo-binutils
version: latest
use-tool-cache: true
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- uses: ./.github/workflows/actions/setup-qemu
with:
qemu-version: ${{ env.qemu-version }}
Expand All @@ -36,7 +32,6 @@ jobs:
- name: Run app tests
run: |
make disk_img
make pre_libc
make test ARCH=${{ matrix.arch }}
app-test-for-monolithic:
Expand All @@ -47,17 +42,13 @@ jobs:
os: [ubuntu-latest]
arch: [x86_64, riscv64, aarch64]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ env.rust-toolchain }}
components: rust-src
- uses: actions-rs/[email protected]
with:
crate: cargo-binutils
version: latest
use-tool-cache: true
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- uses: ./.github/workflows/actions/setup-qemu
with:
qemu-version: ${{ env.qemu-version }}
Expand All @@ -76,17 +67,13 @@ jobs:
os: [ubuntu-latest]
arch: [x86_64, riscv64, aarch64]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ env.rust-toolchain }}
components: rust-src
- uses: actions-rs/[email protected]
with:
crate: cargo-binutils
version: latest
use-tool-cache: true
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- uses: ./.github/workflows/actions/setup-qemu
with:
qemu-version: ${{ env.qemu-version }}
Expand All @@ -96,6 +83,5 @@ jobs:
- name: Run app tests
run: |
sh ./build_img.sh -m ${{ matrix.arch }} -fs ext4
make pre_libc
export MONOLITHIC_TESTCASE=other
make ARCH=${{ matrix.arch }} A=apps/monolithic_userboot APP_FEATURES=batch FEATURES="ext4fs" LOG=off run
Loading

0 comments on commit 65a4f58

Please sign in to comment.