|
10 | 10 | env:
|
11 | 11 | cache-path: |
|
12 | 12 | .git/modules
|
13 |
| - binutils |
14 |
| - gdb |
15 |
| - gcc |
16 |
| - llvm |
17 |
| - newlib |
18 |
| - glibc |
19 |
| - musl |
20 |
| - uclib-ng |
21 |
| - dejagnu |
22 |
| - pk |
23 |
| - qemu |
24 |
| - spike |
| 13 | + binutils/.git |
| 14 | + gdb/.git |
| 15 | + gcc/.git |
| 16 | + llvm/.git |
| 17 | + newlib/.git |
| 18 | + glibc/.git |
| 19 | + musl/.git |
| 20 | + uclib-ng/.git |
| 21 | + dejagnu/.git |
| 22 | + pk/.git |
| 23 | + qemu/.git |
| 24 | + spike/.git |
25 | 25 | jobs:
|
26 | 26 | cache:
|
27 | 27 | name: Update Submodule Cache
|
@@ -87,44 +87,39 @@ jobs:
|
87 | 87 | echo "-- After --"
|
88 | 88 | df -h
|
89 | 89 |
|
| 90 | + - uses: actions/checkout@v4 |
| 91 | + |
| 92 | + - name: Load Cache |
| 93 | + uses: actions/cache/restore@v4 |
| 94 | + with: |
| 95 | + path: ${{ env.cache-path }} |
| 96 | + key: ${{ env.cache-key }} |
| 97 | + |
90 | 98 | - name: Generate Submodules List
|
91 | 99 | id: cache-path
|
92 |
| - if: false |
93 | 100 | run: |
|
94 |
| - submodules="gdb:binutils" |
| 101 | + submodules="gdb binutils" |
95 | 102 | case "${{ matrix.mode }}" in
|
96 | 103 | "linux")
|
97 |
| - submodules="$submodules:glibc";; |
| 104 | + submodules="$submodules glibc";; |
98 | 105 | "musl")
|
99 |
| - submodules="$submodules:musl";; |
| 106 | + submodules="$submodules musl";; |
100 | 107 | "uclibc")
|
101 |
| - submodules="$submodules:uclibc-ng";; |
| 108 | + submodules="$submodules uclibc-ng";; |
102 | 109 | "newlib")
|
103 |
| - submodules="$submodules:newlib";; |
| 110 | + submodules="$submodules newlib";; |
104 | 111 | *)
|
105 | 112 | echo "Invalid Mode"; exit 1;;
|
106 | 113 | esac
|
107 | 114 | case "${{ matrix.compiler }}" in
|
108 | 115 | "gcc")
|
109 |
| - submodules="$submodules:gcc";; |
| 116 | + submodules="$submodules gcc";; |
110 | 117 | "llvm")
|
111 |
| - submodules="$submodules:llvm";; |
| 118 | + submodules="$submodules llvm";; |
112 | 119 | *)
|
113 | 120 | echo "Invalid Compiler"; exit 1;;
|
114 | 121 | esac
|
115 |
| - submodules=$(echo $submodules | sed 's/:/\n/g') |
116 |
| - submodules=$submodules$'\n'$(echo "$submodules" | sed -e 's/^/.git\/modules\//') |
117 |
| - echo 'submodules<<EOF' >> $GITHUB_OUTPUT |
118 |
| - echo "$submodules" >> $GITHUB_OUTPUT |
119 |
| - echo 'EOF' >> $GITHUB_OUTPUT |
120 |
| -
|
121 |
| - - uses: actions/checkout@v4 |
122 |
| - |
123 |
| - - name: Load Cache |
124 |
| - uses: actions/cache/restore@v4 |
125 |
| - with: |
126 |
| - path: ${{ env.cache-path }} |
127 |
| - key: ${{ env.cache-key }} |
| 122 | + for submodule in $submodules; do git submodule update --init $submodule && (cd $submodule && git reset --hard); done |
128 | 123 |
|
129 | 124 | - name: Install Dependencies
|
130 | 125 | run: sudo ./.github/setup-apt.sh
|
|
0 commit comments