Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 28 additions & 35 deletions .github/workflows/test-fatfs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test FATFS Support
name: Test FatFS Support

on:
push:
Expand All @@ -9,31 +9,31 @@ on:

jobs:
get-fatfs:
name: Get FatFS
runs-on: ubuntu-latest
timeout-minutes: 4
steps:
- name: Set up cache key
id: cache-key
run: echo "CACHE_KEY=ff15a-cache" >> $GITHUB_ENV

- name: Download FF15a.zip
id: download
run: |
wget http://elm-chan.org/fsw/ff/arc/ff15a.zip -O ff15a.zip

- name: Cache the downloaded ZIP file
- name: Checking cache for FatFS
uses: actions/cache@v4
id: cache-fatfs
with:
path: ./ff15a.zip
key: ${{ env.CACHE_KEY }}
restore-keys: |
${{ env.CACHE_KEY }}
key: ff15a-cache
lookup-only: true

- name: Download FatFS
if: steps.cache-fatfs.outputs.cache-hit != 'true'
run: |
wget http://elm-chan.org/fsw/ff/arc/ff15a.zip -O ff15a.zip

test-fatfs:
name: Test wolfSSH with FatFS
needs: get-fatfs
runs-on: ubuntu-latest
timeout-minutes: 4
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Checking cache for FATFS
uses: actions/cache@v4
Expand All @@ -47,37 +47,30 @@ jobs:
sudo apt-get update
sudo apt-get install -y build-essential autoconf automake libtool pkg-config openssh-server dosfstools

- name: Clone wolfSSL
run: |
cd ..
git clone https://github.com/wolfSSL/wolfssl.git
cd wolfssl
./autogen.sh

- name: Configure and build wolfSSL
run: |
cd ../wolfssl
./configure --enable-wolfssh --enable-intelasm --disable-crl --disable-examples --disable-filesystem CFLAGS="-DNO_WOLFSSL_DIR"
make
sudo make install
sudo ldconfig

- name: Compile FATFS library
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: wolfSSL/wolfssl
ref: master
path: wolfssl
configure: --enable-wolfssh --enable-intelasm --disable-crl --disable-examples --disable-filesystem CFLAGS="-DNO_WOLFSSL_DIR"
check: false
install: true

- name: Compile FatFS library
run: |
cd ide/Linux-FATFS
unzip ../../ff15a.zip
cp ffconf.h source/
make

- name: Configure and build wolfSSH with FATFS
- name: Configure and build wolfSSH with FatFS
run: |
./autogen.sh
export LD_LIBRARY_PATH=$(pwd)/ide/Linux-FATFS
./configure --enable-sftp CFLAGS="-DWOLFSSH_FATFS -Iide/Linux-FATFS/source -DSTDIN_FILENO=0 -DPRINTF=printf" LDFLAGS="-Lide/Linux-FATFS -lfatfs"
./configure --with-wolfssl=build-dir --enable-sftp CFLAGS="-DWOLFSSH_FATFS -Iide/Linux-FATFS/source -DSTDIN_FILENO=0 -DPRINTF=printf" LDFLAGS="-Lide/Linux-FATFS -lfatfs"
make



- name: Create test file
run: |
dd if=/dev/urandom of=test_file.bin bs=1M count=1
Expand Down