Skip to content

Commit

Permalink
feat
Browse files Browse the repository at this point in the history
  • Loading branch information
Azure-stars committed May 14, 2024
1 parent eb216ef commit 592a2a0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,17 @@ on:
type: string


env:
repository: Starry-OS/Starry

jobs:
prepare_for_external_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: step1
if: github.repository != ${{ env.repository }}
if: github.repository != 'Starry-OS/Starry'
# 输出的值可以在后续的job中使用
run: echo "TopTestDirectory=${{ inputs.TopTestDirectory }}" >> $GITHUB_OUTPUT
- id: step2
if: github.repository == ${{ env.repository }}
if: github.repository == 'Starry-OS/Starry'
run: echo "ToptTestDirectory=./" >> $GITHUB_OUTPUT
outputs:
TopTestDirectory: ${{ steps.step1.outputs.ToptTestDirectory || steps.step2.outputs.ToptTestDirectory }}
Expand Down Expand Up @@ -57,8 +54,8 @@ jobs:
with:
arch: aarch64
- name: Clone Top Repository
if: github.repository != ${{ env.repository }}
run: git clone https://github.com/${{ env.repository }}.git ${{ env.WORKING_DIRECTORY }}
if: github.repository != 'Starry-OS/Starry'
run: git clone https://github.com/Starry-OS/Starry.git ${{ env.WORKING_DIRECTORY }}
- name: Check rust version
working-directory: ${{ env.WORKING_DIRECTORY }}
run: rustc --version --verbose
Expand Down Expand Up @@ -100,8 +97,8 @@ jobs:
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- name: Clone Top Repository
if: github.repository != ${{ env.repository }}
run: git clone https://github.com/${{ env.repository }}.git ${{ env.WORKING_DIRECTORY }}
if: github.repository != 'Starry-OS/Starry'
run: git clone https://github.com/Starry-OS/Starry.git ${{ env.WORKING_DIRECTORY }}
- name: Build helloworld
working-directory: ${{ env.WORKING_DIRECTORY }}
run: make ARCH=${{ matrix.arch }} A=apps/helloworld
Expand Down Expand Up @@ -197,8 +194,8 @@ jobs:
with:
arch: x86_64
- name: Clone Top Repository
if: github.repository != ${{ env.repository }}
run: git clone https://github.com/${{ env.repository }}.git ${{ env.WORKING_DIRECTORY }}
if: github.repository != 'Starry-OS/Starry'
run: git clone https://github.com/Starry-OS/Starry.git ${{ env.WORKING_DIRECTORY }}
- name: Build helloworld for x86_64-pc-oslab
working-directory: ${{ env.WORKING_DIRECTORY }}
run: make PLATFORM=x86_64-pc-oslab A=apps/helloworld
Expand Down Expand Up @@ -241,8 +238,8 @@ jobs:
with:
toolchain: ${{ matrix.rust-toolchain }}
- name: Clone Top Repository
if: github.repository != ${{ env.repository }}
run: git clone https://github.com/${{ env.repository }}.git ${{ env.WORKING_DIRECTORY }}
if: github.repository != 'Starry-OS/Starry'
run: git clone https://github.com/Starry-OS/Starry.git ${{ env.WORKING_DIRECTORY }}
- name: Build helloworld
working-directory: ${{ env.WORKING_DIRECTORY }}
run: cargo build -p arceos-helloworld
Expand Down Expand Up @@ -305,8 +302,8 @@ jobs:
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- name: Clone Top Repository
if: github.repository != ${{ env.repository }}
run: git clone https://github.com/${{ env.repository }}.git ${{ env.WORKING_DIRECTORY }}
if: github.repository != 'Starry-OS/Starry'
run: git clone https://github.com/Starry-OS/Starry.git ${{ env.WORKING_DIRECTORY }}
- name: Bulld monolithic-userboot
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,18 @@ on:

env:
rust-toolchain: nightly-2024-05-02
repository: Starry-OS/Starry

jobs:
prepare_for_external_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: step1
if: github.repository != ${{ env.repository }}
if: github.repository != 'Starry-OS/Starry'
# 输出的值可以在后续的job中使用
run: echo "TopTestDirectory=${{ inputs.ToptestDirectory }}" >> $GITHUB_OUTPUT
- id: step2
if: github.repository == ${{ env.repository }}
if: github.repository == 'Starry-OS/Starry'
run: echo "ToptTestDirectory=./" >> $GITHUB_OUTPUT
outputs:
TopTestDirectory: ${{ steps.step1.outputs.ToptTestDirectory || steps.step2.outputs.ToptTestDirectory }}
Expand Down Expand Up @@ -53,14 +52,14 @@ jobs:
with:
arch: aarch64
- name: Clone Top Repository
if: github.repository != ${{ env.repository }}
run: git clone https://github.com/${{ env.repository }}.git ${{ env.WORKING_DIRECTORY }}
if: github.repository != 'Starry-OS/Starry'
run: git clone https://github.com/Starry-OS/Starry.git ${{ env.WORKING_DIRECTORY }}
- name: Build docs
working-directory: ${{ env.WORKING_DIRECTORY }}
continue-on-error: ${{ github.ref != env.default-branch && github.event_name != 'pull_request' }}
run: make doc_check_missing
- name: Deploy to Github Pages
if: ${{ github.ref == env.default-branch }} && ${{ github.repository == env.repository }}
if: ${{ github.ref == env.default-branch }} && github.repository == 'Starry-OS/Starry'
uses: JamesIves/github-pages-deploy-action@v4
with:
single-commit: true
Expand Down

0 comments on commit 592a2a0

Please sign in to comment.