Skip to content

Add FATFS build test workflow #1

Add FATFS build test workflow

Add FATFS build test workflow #1

Workflow file for this run

name: FATFS Build Test
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
WOLFSSL_REF: v5.7.0-stable
jobs:
build_wolfssl:
name: Build wolfssl
runs-on: ubuntu-latest
timeout-minutes: 4
steps:
- name: Checking cache for wolfssl
uses: actions/cache@v4
id: cache-wolfssl
with:
path: build-dir/
key: wolfssh-fatfs-check-wolfssl-${{ env.WOLFSSL_REF }}
lookup-only: true
- name: Checkout, build, and install wolfssl
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: wolfssl/wolfssl
ref: ${{ env.WOLFSSL_REF }}
path: wolfssl
configure: --enable-wolfssh --enable-cryptonly
check: false
install: true
build_wolfssh:
name: Build wolfssh with FATFS
runs-on: ubuntu-latest
timeout-minutes: 4
needs: build_wolfssl
steps:
- name: Checking cache for wolfssl
uses: actions/cache@v4
with:
path: build-dir/
key: wolfssh-fatfs-check-wolfssl-${{ env.WOLFSSL_REF }}
fail-on-cache-miss: true
- name: Apply FATFS patch
run: |
cat > fatfs.patch << 'EOL'
diff --git a/wolfssh/port.h b/wolfssh/port.h
index dbd0de9..883903b 100644
--- a/wolfssh/port.h
+++ b/wolfssh/port.h
@@ -1192,7 +1192,7 @@ extern "C" {
#define WSTAT(fs,p,b) f_stat(p,b)
#define WLSTAT(fs,p,b) f_stat(p,b)
#define WREMOVE(fs,d) f_unlink((d))
- #define WRENAME(fs,fd,o,n) f_rename((o),(n))
+ #define WRENAME(fs,o,n) f_rename((o),(n))
#define WMKDIR(fs, p, m) f_mkdir(p)
#define WFD int
EOL
git apply fatfs.patch
- name: Checkout, build, and test wolfssh
uses: wolfSSL/actions-build-autotools-project@v1
with:
repository: wolfssl/wolfssh
path: wolfssh
configure: --enable-sftp CPPFLAGS="-DWOLFSSH_FATFS -I${{ github.workspace }}/build-dir/include" LDFLAGS="-L${{ github.workspace }}/build-dir/lib"
check: true