Skip to content

Commit dfc0f72

Browse files
committed
Make the FATFS a cache step
1 parent a37591f commit dfc0f72

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

.github/workflows/test-fatfs.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,40 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11+
get-fatfs:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Set up cache key
15+
id: cache-key
16+
run: echo "CACHE_KEY=ff15a-cache" >> $GITHUB_ENV
17+
18+
- name: Download FF15a.zip
19+
id: download
20+
run: |
21+
wget http://elm-chan.org/fsw/ff/arc/ff15a.zip -O ff15a.zip
22+
23+
- name: Cache the downloaded ZIP file
24+
uses: actions/cache@v4
25+
with:
26+
path: ./ff15a.zip
27+
key: ${{ env.CACHE_KEY }}
28+
restore-keys: |
29+
${{ env.CACHE_KEY }}
30+
1131
test-fatfs:
32+
needs: get-fatfs
1233
runs-on: ubuntu-latest
1334
steps:
1435
- name: Checkout code
1536
uses: actions/checkout@v3
1637

38+
- name: Checking cache for FATFS
39+
uses: actions/cache@v4
40+
with:
41+
path: ./ff15a.zip
42+
key: ff15a-cache
43+
fail-on-cache-miss: true
44+
1745
- name: Install dependencies
1846
run: |
1947
sudo apt-get update
@@ -37,8 +65,7 @@ jobs:
3765
- name: Compile FATFS library
3866
run: |
3967
cd ide/Linux-FATFS
40-
wget http://elm-chan.org/fsw/ff/arc/ff15a.zip
41-
unzip ff15a.zip
68+
unzip ../../ff15a.zip
4269
cp ffconf.h source/
4370
make
4471

0 commit comments

Comments
 (0)