diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ddfff339795..280964b8d7c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,18 +10,18 @@ on: env: cache-path: | .git/modules - binutils - gdb - gcc - llvm - newlib - glibc - musl - uclib-ng - dejagnu - pk - qemu - spike + binutils/.git + gdb/.git + gcc/.git + llvm/.git + newlib/.git + glibc/.git + musl/.git + uclib-ng/.git + dejagnu/.git + pk/.git + qemu/.git + spike/.git jobs: cache: name: Update Submodule Cache @@ -87,44 +87,39 @@ jobs: echo "-- After --" df -h + - uses: actions/checkout@v4 + + - name: Load Cache + uses: actions/cache/restore@v4 + with: + path: ${{ env.cache-path }} + key: ${{ env.cache-key }} + - name: Generate Submodules List id: cache-path - if: false run: | - submodules="gdb:binutils" + submodules="gdb binutils" case "${{ matrix.mode }}" in "linux") - submodules="$submodules:glibc";; + submodules="$submodules glibc";; "musl") - submodules="$submodules:musl";; + submodules="$submodules musl";; "uclibc") - submodules="$submodules:uclibc-ng";; + submodules="$submodules uclibc-ng";; "newlib") - submodules="$submodules:newlib";; + submodules="$submodules newlib";; *) echo "Invalid Mode"; exit 1;; esac case "${{ matrix.compiler }}" in "gcc") - submodules="$submodules:gcc";; + submodules="$submodules gcc";; "llvm") - submodules="$submodules:llvm";; + submodules="$submodules llvm";; *) echo "Invalid Compiler"; exit 1;; esac - submodules=$(echo $submodules | sed 's/:/\n/g') - submodules=$submodules$'\n'$(echo "$submodules" | sed -e 's/^/.git\/modules\//') - echo 'submodules<> $GITHUB_OUTPUT - echo "$submodules" >> $GITHUB_OUTPUT - echo 'EOF' >> $GITHUB_OUTPUT - - - uses: actions/checkout@v4 - - - name: Load Cache - uses: actions/cache/restore@v4 - with: - path: ${{ env.cache-path }} - key: ${{ env.cache-key }} + for submodule in $submodules; do git submodule update $submodule; done - name: Install Dependencies run: sudo ./.github/setup-apt.sh