Skip to content

Commit

Permalink
[chore] reunit the Starry
Browse files Browse the repository at this point in the history
  • Loading branch information
Azure-stars committed Dec 2, 2024
1 parent d2f7956 commit db66d46
Show file tree
Hide file tree
Showing 452 changed files with 37,771 additions and 462 deletions.
4 changes: 0 additions & 4 deletions .cargo/config.toml

This file was deleted.

193 changes: 9 additions & 184 deletions .github/workflows/build.yml

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ jobs:
with:
profile: minimal
toolchain: ${{ env.rust-toolchain }}
- name: Update Top Repository
run: make pre_update
- uses: ./.github/workflows/actions/setup-musl
with:
arch: x86_64
- name: Build docs
continue-on-error: ${{ github.ref != env.default-branch && github.event_name != 'pull_request' }}
run: make doc_check_missing
Expand Down
77 changes: 2 additions & 75 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,19 @@ name: Test CI
on:
push:
pull_request:
workflow_call:
inputs:
TopTestDirectory:
description: 'The directory where the main repository will be placed'
required: true
type: string
CallerPackage:
description: 'The package to call the workflow'
required: true
type: string
CallerRepository:
description: 'The repository to call the workflow'
required: true
type: string
CallerCommit:
description: 'The commit of the repository to call the workflow'
required: true
type: string
TopBranch:
description: 'The branch of the main repository'
required: false
type: string
default: 'main'

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

jobs:
prepare_for_external_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: step1
if: github.repository != 'Starry-OS/Starry'
# 输出的值可以在后续的job中使用
run: echo "TopTestDirectory=${{ inputs.TopTestDirectory }}" >> $GITHUB_OUTPUT
- id: step2
if: github.repository == 'Starry-OS/Starry'
run: echo "TopTestDirectory=./" >> $GITHUB_OUTPUT
outputs:
TopTestDirectory: ${{ steps.step1.outputs.TopTestDirectory || steps.step2.outputs.TopTestDirectory }}


app-test-for-unikernel:
needs: prepare_for_external_test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
arch: [x86_64, riscv64, aarch64]
env:
WORKING_DIRECTORY: ${{ needs.prepare_for_external_test.outputs.TopTestDirectory }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -64,36 +24,24 @@ jobs:
components: rust-src
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- name: Clone Top Repository
if: github.repository != 'Starry-OS/Starry'
run: |
git clone https://github.com/Starry-OS/Starry.git ${{ env.WORKING_DIRECTORY }} && cd ${{ env.WORKING_DIRECTORY }} && git checkout ${{ inputs.TopBranch }} && cd ..
sh ${{ env.WORKING_DIRECTORY }}/scripts/test/external_test.sh ${{ env.WORKING_DIRECTORY }} ${{ inputs.CallerPackage }} ${{ inputs.CallerRepository }} ${{ inputs.CallerCommit }}
- name: Update Top Repository
working-directory: ${{ env.WORKING_DIRECTORY }}
run: make pre_update
- uses: ./.github/workflows/actions/setup-qemu
with:
qemu-version: ${{ env.qemu-version }}
- uses: ./.github/workflows/actions/setup-musl
with:
arch: ${{ matrix.arch }}
- name: Run app tests
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
make disk_img
make test ARCH=${{ matrix.arch }}
app-test-for-monolithic:
needs: prepare_for_external_test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
arch: [x86_64, riscv64, aarch64]
env:
WORKING_DIRECTORY: ${{ needs.prepare_for_external_test.outputs.TopTestDirectory }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -102,35 +50,23 @@ jobs:
components: rust-src
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- name: Clone Top Repository
if: github.repository != 'Starry-OS/Starry'
run: |
git clone https://github.com/Starry-OS/Starry.git ${{ env.WORKING_DIRECTORY }} && cd ${{ env.WORKING_DIRECTORY }} && git checkout ${{ inputs.TopBranch }} && cd ..
sh ${{ env.WORKING_DIRECTORY }}/scripts/test/external_test.sh ${{ env.WORKING_DIRECTORY }} ${{ inputs.CallerPackage }} ${{ inputs.CallerRepository }} ${{ inputs.CallerCommit }}
- name: Update Top Repository
working-directory: ${{ env.WORKING_DIRECTORY }}
run: make pre_update
- uses: ./.github/workflows/actions/setup-qemu
with:
qemu-version: ${{ env.qemu-version }}
- uses: ./.github/workflows/actions/setup-musl
with:
arch: ${{ matrix.arch }}
- name: Run app tests
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
make disk_img
make test_monolithic ARCH=${{ matrix.arch }}
app-test-for-ext4fs:
needs: prepare_for_external_test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
arch: [x86_64, riscv64, aarch64]
env:
WORKING_DIRECTORY: ${{ needs.prepare_for_external_test.outputs.TopTestDirectory }}
arch: [x86_64, riscv64, aarch64]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -139,22 +75,13 @@ jobs:
components: rust-src
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- name: Clone Top Repository
if: github.repository != 'Starry-OS/Starry'
run: |
git clone https://github.com/Starry-OS/Starry.git ${{ env.WORKING_DIRECTORY }} && cd ${{ env.WORKING_DIRECTORY }} && git checkout ${{ inputs.TopBranch }} && cd ..
sh ${{ env.WORKING_DIRECTORY }}/scripts/test/external_test.sh ${{ env.WORKING_DIRECTORY }} ${{ inputs.CallerPackage }} ${{ inputs.CallerRepository }} ${{ inputs.CallerCommit }}
- name: Update Top Repository
working-directory: ${{ env.WORKING_DIRECTORY }}
run: make pre_update
- uses: ./.github/workflows/actions/setup-qemu
with:
qemu-version: ${{ env.qemu-version }}
- uses: ./.github/workflows/actions/setup-musl
with:
arch: ${{ matrix.arch }}
- name: Run app tests
working-directory: ${{ needs.prepare_for_external_test.outputs.TopTestDirectory }}
run: |
sh ./build_img.sh -a ${{ matrix.arch }} -fs ext4
export MONOLITHIC_TESTCASE=other
Expand Down
Loading

0 comments on commit db66d46

Please sign in to comment.