Skip to content

Commit

Permalink
[CI] Checkout main repo before any shell command
Browse files Browse the repository at this point in the history
  • Loading branch information
Azure-stars committed Oct 18, 2024
1 parent 2a2e8b2 commit 76c51dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ jobs:
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
- uses: actions/checkout@v4
if: inputs.CallerPackage != ''
with:
Expand All @@ -124,6 +122,8 @@ jobs:
-n ${{ inputs.CallerPackage }} \
-t git --git-repo ${{ github.repository }} \
--commit ${{ github.sha }}
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- name: Build helloworld
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make ARCH=${{ matrix.arch }} A=examples/helloworld
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@ jobs:
with:
toolchain: ${{ env.rust-toolchain }}
components: rust-src
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- uses: ./.github/workflows/actions/setup-qemu
with:
qemu-version: ${{ env.qemu-version }}
- uses: ./.github/workflows/actions/setup-musl
with:
arch: ${{ matrix.arch }}
- uses: actions/checkout@v4
if: inputs.CallerPackage != ''
with:
Expand All @@ -102,6 +94,14 @@ jobs:
-n ${{ inputs.CallerPackage }} \
-t git --git-repo ${{ github.repository }} \
--commit ${{ github.sha }}
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-binutils
- 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: |
Expand Down

0 comments on commit 76c51dc

Please sign in to comment.