diff options
author | Christopher Haster <geky@geky.net> | 2023-04-20 11:54:08 +0300 |
---|---|---|
committer | Christopher Haster <geky@geky.net> | 2023-04-21 08:29:28 +0300 |
commit | ca0da3d4907df931636b8fa46aeb17d8ee799aa4 (patch) | |
tree | 6420dd020059f6ee043fc1a83178f2230d26e3e1 /.github | |
parent | 116332d3f7e33e2d4ada3b4896024b1d44567593 (diff) |
Added compatibility testing on pull-request to GitHub test action
This uses the "github.event.pull_request.base.ref" variable as the
"lfsp" target for compatibility testing.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/test.yml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ebe4a6..2cee352 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -473,6 +473,42 @@ jobs: path: status retention-days: 1 + # run compatibility tests using the current master as the previous version + test-compat: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 + if: ${{github.event_name == 'pull_request'}} + # checkout the current pr target into lfsp + - uses: actions/checkout@v2 + if: ${{github.event_name == 'pull_request'}} + with: + ref: ${{github.event.pull_request.base.ref}} + path: lfsp + - name: install + if: ${{github.event_name == 'pull_request'}} + run: | + # need a few things + sudo apt-get update -qq + sudo apt-get install -qq gcc python3 python3-pip + pip3 install toml + gcc --version + python3 --version + # adjust prefix of lfsp + - name: changeprefix + if: ${{github.event_name == 'pull_request'}} + run: | + ./scripts/changeprefix.py lfs lfsp lfsp/*.h lfsp/*.c + - name: test-compat + if: ${{github.event_name == 'pull_request'}} + run: | + TESTS=tests/test_compat.toml \ + SRC="$(find . lfsp -name '*.c' -maxdepth 1 \ + -and -not -name '*.t.*' \ + -and -not -name '*.b.*')" \ + CFLAGS="-DLFSP=lfsp/lfsp.h" \ + make test + # self-host with littlefs-fuse for a fuzz-like test fuse: runs-on: ubuntu-22.04 |