Skip to content

Commit

Permalink
copy musl to sub-repo root path
Browse files Browse the repository at this point in the history
  • Loading branch information
Azure-stars committed May 15, 2024
1 parent c2f546e commit 36f3ab8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 68 deletions.
50 changes: 11 additions & 39 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,6 @@ 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
- name: Setup C++ environment
run: sudo apt-get update && sudo apt-get install -y build-essential
- uses: Starry-OS/Starry/.github/workflows/actions/setup-musl@main
if: github.repository != 'Starry-OS/Starry'
with:
arch: x86_64
- uses: Starry-OS/Starry/.github/workflows/actions/setup-musl@main
if: github.repository != 'Starry-OS/Starry'
with:
arch: riscv64
- uses: Starry-OS/Starry/.github/workflows/actions/setup-musl@main
if: github.repository != 'Starry-OS/Starry'
with:
arch: aarch64
- uses: ./.github/workflows/actions/setup-musl
if: github.repository == 'Starry-OS/Starry'
with:
arch: x86_64
- uses: ./.github/workflows/actions/setup-musl
if: github.repository == 'Starry-OS/Starry'
with:
arch: riscv64
- uses: ./.github/workflows/actions/setup-musl
if: github.repository == 'Starry-OS/Starry'
with:
arch: aarch64
- name: Clone Top Repository
if: github.repository != 'Starry-OS/Starry'
run: git clone https://github.com/Starry-OS/Starry.git ${{ env.WORKING_DIRECTORY }}
Expand Down Expand Up @@ -113,7 +87,10 @@ jobs:
- 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 }}
run: |
git clone https://github.com/Starry-OS/Starry.git ${{ env.WORKING_DIRECTORY }}
mkdir .github/workflows/actions
mv ${{ env.WORKING_DIRECTORY }}/.github/workflows/actions/setup-musl .github/workflows/actions/setup-musl
- name: Build helloworld
working-directory: ${{ env.WORKING_DIRECTORY }}
run: make ARCH=${{ matrix.arch }} A=apps/helloworld
Expand Down Expand Up @@ -158,11 +135,6 @@ jobs:
run: make ARCH=${{ matrix.arch }} A=apps/net/udpserver

- uses: ./.github/workflows/actions/setup-musl
if: github.repository == 'Starry-OS/Starry'
with:
arch: ${{ matrix.arch }}
- uses: Starry-OS/Starry/.github/workflows/actions/setup-musl@main
if: github.repository != 'Starry-OS/Starry'
with:
arch: ${{ matrix.arch }}
- name: Build c/helloworld
Expand Down Expand Up @@ -210,17 +182,17 @@ jobs:
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: Clone Top Repository
if: github.repository != 'Starry-OS/Starry'
run: |
git clone https://github.com/Starry-OS/Starry.git ${{ env.WORKING_DIRECTORY }}
mkdir .github/workflows/actions
mv ${{ env.WORKING_DIRECTORY }}/.github/workflows/actions/setup-musl .github/workflows/actions/setup-musl
- uses: ./.github/workflows/actions/setup-musl
if: github.repository == 'Starry-OS/Starry'
with:
arch: x86_64
- uses: Starry-OS/Starry/.github/workflows/actions/setup-musl@main
if: github.repository != 'Starry-OS/Starry'
with:
arch: x86_64
- name: Clone Top Repository
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
55 changes: 26 additions & 29 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
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 @@ -45,24 +47,21 @@ jobs:
components: rust-src
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- uses: Starry-OS/Starry/.github/workflows/actions/setup-qemu@main
- name: Clone Top Repository
if: github.repository != 'Starry-OS/Starry'
with:
qemu-version: ${{ env.qemu-version }}
- uses: Starry-OS/Starry/.github/workflows/actions/setup-musl@main
if: github.repository != 'Starry-OS/Starry'
with:
arch: ${{ matrix.arch }}
run: |
git clone https://github.com/Starry-OS/Starry.git ${{ env.WORKING_DIRECTORY }}
mkdir .github/workflows/actions
mv ${{ env.WORKING_DIRECTORY }}/.github/workflows/actions/setup-musl .github/workflows/actions/setup-musl
mv ${{ env.WORKING_DIRECTORY }}/.github/workflows/actions/setup-qemu .github/workflows/actions/setup-qemu
- uses: ./.github/workflows/actions/setup-qemu
if: github.repository == 'Starry-OS/Starry'
with:
qemu-version: ${{ env.qemu-version }}
- uses: ./.github/workflows/actions/setup-musl
if: github.repository == 'Starry-OS/Starry'
with:
arch: ${{ matrix.arch }}
- name: Run app tests
working-directory: ${{ needs.prepare_for_external_test.outputs.TopTestDirectory }}
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
make disk_img
make test ARCH=${{ matrix.arch }}
Expand All @@ -75,6 +74,8 @@ jobs:
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 @@ -83,24 +84,21 @@ jobs:
components: rust-src
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- uses: Starry-OS/Starry/.github/workflows/actions/setup-qemu@main
if: github.repository != 'Starry-OS/Starry'
with:
qemu-version: ${{ env.qemu-version }}
- uses: Starry-OS/Starry/.github/workflows/actions/setup-musl@main
- name: Clone Top Repository
if: github.repository != 'Starry-OS/Starry'
with:
arch: ${{ matrix.arch }}
run: |
git clone https://github.com/Starry-OS/Starry.git ${{ env.WORKING_DIRECTORY }}
mkdir .github/workflows/actions
mv ${{ env.WORKING_DIRECTORY }}/.github/workflows/actions/setup-musl .github/workflows/actions/setup-musl
mv ${{ env.WORKING_DIRECTORY }}/.github/workflows/actions/setup-qemu .github/workflows/actions/setup-qemu
- uses: ./.github/workflows/actions/setup-qemu
if: github.repository == 'Starry-OS/Starry'
with:
qemu-version: ${{ env.qemu-version }}
- uses: ./.github/workflows/actions/setup-musl
if: github.repository == 'Starry-OS/Starry'
with:
arch: ${{ matrix.arch }}
- name: Run app tests
working-directory: ${{ needs.prepare_for_external_test.outputs.TopTestDirectory }}
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
make disk_img
make test_monolithic ARCH=${{ matrix.arch }}
Expand All @@ -112,6 +110,8 @@ jobs:
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 @@ -120,20 +120,17 @@ jobs:
components: rust-src
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- uses: Starry-OS/Starry/.github/workflows/actions/setup-qemu@main
if: github.repository != 'Starry-OS/Starry'
with:
qemu-version: ${{ env.qemu-version }}
- uses: Starry-OS/Starry/.github/workflows/actions/setup-musl@main
- name: Clone Top Repository
if: github.repository != 'Starry-OS/Starry'
with:
arch: ${{ matrix.arch }}
run: |
git clone https://github.com/Starry-OS/Starry.git ${{ env.WORKING_DIRECTORY }}
mkdir .github/workflows/actions
mv ${{ env.WORKING_DIRECTORY }}/.github/workflows/actions/setup-musl .github/workflows/actions/setup-musl
mv ${{ env.WORKING_DIRECTORY }}/.github/workflows/actions/setup-qemu .github/workflows/actions/setup-qemu
- uses: ./.github/workflows/actions/setup-qemu
if: github.repository == 'Starry-OS/Starry'
with:
qemu-version: ${{ env.qemu-version }}
- uses: ./.github/workflows/actions/setup-musl
if: github.repository == 'Starry-OS/Starry'
with:
arch: ${{ matrix.arch }}
- name: Run app tests
Expand Down

0 comments on commit 36f3ab8

Please sign in to comment.