Skip to content

Commit

Permalink
use git for compression
Browse files Browse the repository at this point in the history
  • Loading branch information
TShapinsky committed Nov 2, 2024
1 parent f067aa2 commit 9f469aa
Showing 1 changed file with 28 additions and 33 deletions.
61 changes: 28 additions & 33 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<<EOF' >> $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
Expand Down

0 comments on commit 9f469aa

Please sign in to comment.