Skip to content

Commit ea97111

Browse files
committed
Update FatFS Test
1. Update caching the download of the FatFS source archive to the pattern other tests are using to cache items. It was downloading the FatFS source archive every time, despite it being in the cache. 2. Update building wolfSSL to follow the pattern of the other tests.
1 parent d32dd2b commit ea97111

File tree

1 file changed

+28
-35
lines changed

1 file changed

+28
-35
lines changed

.github/workflows/test-fatfs.yml

Lines changed: 28 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test FATFS Support
1+
name: Test FatFS Support
22

33
on:
44
push:
@@ -9,31 +9,31 @@ on:
99

1010
jobs:
1111
get-fatfs:
12+
name: Get FatFS
1213
runs-on: ubuntu-latest
14+
timeout-minutes: 4
1315
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
16+
- name: Checking cache for FatFS
2417
uses: actions/cache@v4
18+
id: cache-fatfs
2519
with:
2620
path: ./ff15a.zip
27-
key: ${{ env.CACHE_KEY }}
28-
restore-keys: |
29-
${{ env.CACHE_KEY }}
21+
key: ff15a-cache
22+
lookup-only: true
23+
24+
- name: Download FatFS
25+
if: steps.cache-fatfs.outputs.cache-hit != 'true'
26+
run: |
27+
wget http://elm-chan.org/fsw/ff/arc/ff15a.zip -O ff15a.zip
3028
3129
test-fatfs:
30+
name: Test wolfSSH with FatFS
3231
needs: get-fatfs
3332
runs-on: ubuntu-latest
33+
timeout-minutes: 4
3434
steps:
3535
- name: Checkout code
36-
uses: actions/checkout@v3
36+
uses: actions/checkout@v4
3737

3838
- name: Checking cache for FATFS
3939
uses: actions/cache@v4
@@ -47,37 +47,30 @@ jobs:
4747
sudo apt-get update
4848
sudo apt-get install -y build-essential autoconf automake libtool pkg-config openssh-server dosfstools
4949
50-
- name: Clone wolfSSL
51-
run: |
52-
cd ..
53-
git clone https://github.com/wolfSSL/wolfssl.git
54-
cd wolfssl
55-
./autogen.sh
56-
57-
- name: Configure and build wolfSSL
58-
run: |
59-
cd ../wolfssl
60-
./configure --enable-wolfssh --enable-intelasm --disable-crl --disable-examples --disable-filesystem CFLAGS="-DNO_WOLFSSL_DIR"
61-
make
62-
sudo make install
63-
sudo ldconfig
64-
65-
- name: Compile FATFS library
50+
- name: Build wolfSSL
51+
uses: wolfSSL/actions-build-autotools-project@v1
52+
with:
53+
repository: wolfSSL/wolfssl
54+
ref: master
55+
path: wolfssl
56+
configure: --enable-wolfssh --enable-intelasm --disable-crl --disable-examples --disable-filesystem CFLAGS="-DNO_WOLFSSL_DIR"
57+
check: false
58+
install: true
59+
60+
- name: Compile FatFS library
6661
run: |
6762
cd ide/Linux-FATFS
6863
unzip ../../ff15a.zip
6964
cp ffconf.h source/
7065
make
7166
72-
- name: Configure and build wolfSSH with FATFS
67+
- name: Configure and build wolfSSH with FatFS
7368
run: |
7469
./autogen.sh
7570
export LD_LIBRARY_PATH=$(pwd)/ide/Linux-FATFS
76-
./configure --enable-sftp CFLAGS="-DWOLFSSH_FATFS -Iide/Linux-FATFS/source -DSTDIN_FILENO=0 -DPRINTF=printf" LDFLAGS="-Lide/Linux-FATFS -lfatfs"
71+
./configure --with-wolfssl=wolfssl --enable-sftp CFLAGS="-DWOLFSSH_FATFS -Iide/Linux-FATFS/source -DSTDIN_FILENO=0 -DPRINTF=printf" LDFLAGS="-Lide/Linux-FATFS -lfatfs"
7772
make
7873
79-
80-
8174
- name: Create test file
8275
run: |
8376
dd if=/dev/urandom of=test_file.bin bs=1M count=1

0 commit comments

Comments
 (0)