From e105092d82546fbe07327adb980d6434d8e759bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E5=8F=8B=E6=8D=B7?= Date: Thu, 2 May 2024 17:30:31 +0800 Subject: [PATCH] chore: fix the CI --- .github/workflows/build.yml | 28 ++++++++++++++-------------- .github/workflows/docs.yml | 2 +- .github/workflows/test.yml | 2 +- .gitignore | 1 + Cargo.lock | 6 ++++++ scripts/make/cargo.mk | 2 +- 6 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4d30b00..34a9dfc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,13 +32,13 @@ jobs: with: arch: aarch64 - name: Clippy for the default target - run: make clippy + run: make pre_c && make clippy - name: Clippy for x86_64 - run: make clippy ARCH=x86_64 + run: make pre_c && make clippy ARCH=x86_64 - name: Clippy for riscv64 - run: make clippy ARCH=riscv64 + run: make pre_c && make clippy ARCH=riscv64 - name: Clippy for aarch64 - run: make clippy ARCH=aarch64 + run: make pre_c && make clippy ARCH=aarch64 - name: Check code format run: cargo fmt --all -- --check @@ -95,21 +95,21 @@ jobs: with: arch: ${{ matrix.arch }} - name: Build c/helloworld - run: make ARCH=${{ matrix.arch }} A=apps/c/helloworld + run: make pre_c && make ARCH=${{ matrix.arch }} A=apps/c/helloworld - name: Build c/memtest - run: make ARCH=${{ matrix.arch }} A=apps/c/memtest + run: make pre_c && make ARCH=${{ matrix.arch }} A=apps/c/memtest - name: Build c/sqlite3 - run: make ARCH=${{ matrix.arch }} A=apps/c/sqlite3 + run: make pre_c && make ARCH=${{ matrix.arch }} A=apps/c/sqlite3 - name: Build c/httpclient - run: make ARCH=${{ matrix.arch }} A=apps/c/httpclient + run: make pre_c && make ARCH=${{ matrix.arch }} A=apps/c/httpclient - name: Build c/httpserver - run: make ARCH=${{ matrix.arch }} A=apps/c/httpserver + run: make pre_c && make ARCH=${{ matrix.arch }} A=apps/c/httpserver - name: Build c/udpserver - run: make ARCH=${{ matrix.arch }} A=apps/c/udpserver + run: make pre_c && make ARCH=${{ matrix.arch }} A=apps/c/udpserver - name: Build c/iperf - run: make ARCH=${{ matrix.arch }} A=apps/c/iperf + run: make pre_c && make ARCH=${{ matrix.arch }} A=apps/c/iperf - name: Build c/redis - run: make ARCH=${{ matrix.arch }} A=apps/c/redis SMP=4 + run: make pre_c && make ARCH=${{ matrix.arch }} A=apps/c/redis SMP=4 build-apps-for-other-platforms: runs-on: ${{ matrix.os }} @@ -139,9 +139,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 PLATFORM=x86_64-pc-oslab A=apps/c/iperf FEATURES=driver-ixgbe,driver-ramdisk + run: make pre_c && 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 PLATFORM=x86_64-pc-oslab A=apps/c/redis FEATURES=driver-ixgbe,driver-ramdisk SMP=4 + run: make pre_c && 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 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 252a53b..0ddaa02 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -32,7 +32,7 @@ jobs: arch: aarch64 - name: Build docs continue-on-error: ${{ github.ref != env.default-branch && github.event_name != 'pull_request' }} - run: make doc_check_missing + run: make pre_c && make doc_check_missing - name: Deploy to Github Pages if: ${{ github.ref == env.default-branch }} uses: JamesIves/github-pages-deploy-action@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ba46a58..8df6503 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,7 @@ jobs: - name: Run app tests run: | make disk_img - make test ARCH=${{ matrix.arch }} + make pre_c && make test ARCH=${{ matrix.arch }} app-test-for-monolithic: runs-on: ${{ matrix.os }} diff --git a/.gitignore b/.gitignore index 43b1e8d..39a1fbb 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ arceos-fada.itb .tmp_its !tools/rk3588/ramdisk.img linker_* +crates/axlibc/* \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 574dcd8..00eae8e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -166,14 +166,18 @@ name = "arceos_posix_api" version = "0.1.0" source = "git+https://github.com/Starry-OS/arceos_posix_api.git#0949faae5bc4e892035f8c327678c49bfa59f0b5" dependencies = [ + "axalloc", "axconfig", "axerrno", "axfeat", + "axfs", "axhal", "axio", "axlog", + "axnet", "axruntime", "axsync", + "axtask", "bindgen", "flatten_objects", "lazy_static", @@ -313,6 +317,8 @@ dependencies = [ "axruntime", "axsync", "axtask", + "spinlock", + "taskctx", ] [[package]] diff --git a/scripts/make/cargo.mk b/scripts/make/cargo.mk index 9d6ace6..1fb6352 100644 --- a/scripts/make/cargo.mk +++ b/scripts/make/cargo.mk @@ -36,7 +36,7 @@ define cargo_clippy $(call run_cmd,cargo clippy,-p axlog -p percpu -p percpu_macros $(1) $(verbose)) endef -all_packages := $(wildcard $(CURDIR)/crates/*) +all_packages := $(shell ls $(CURDIR)/crates) define cargo_doc $(call run_cmd,cargo doc,--no-deps --all-features --workspace --exclude "arceos-*" $(verbose))