[PATCH 7/7] erofs-utils: tests: enable GitHub Actions
Hu Weiwen
sehuww at mail.scut.edu.cn
Fri Jan 22 03:42:28 AEDT 2021
Use GitHub Actions to run tests automatically.
for two configuration: no lz4, with lz4 v1.8.3
run tests: make check; FSTYPE=fuse make check; sudo make check; make distcheck
Signed-off-by: Hu Weiwen <sehuww at mail.scut.edu.cn>
---
.github/workflows/c.yml | 49 +++++++++++++++++++++++++++++++++++++++++
.gitignore | 1 +
2 files changed, 50 insertions(+)
create mode 100644 .github/workflows/c.yml
diff --git a/.github/workflows/c.yml b/.github/workflows/c.yml
new file mode 100644
index 0000000..1d55feb
--- /dev/null
+++ b/.github/workflows/c.yml
@@ -0,0 +1,49 @@
+name: C CI
+
+on:
+ push:
+ pull_request:
+ branches: [ dev ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-20.04
+ strategy:
+ matrix:
+ lz4: [no, v1.9.3]
+
+ steps:
+ - name: check kernel version
+ run: uname -a
+ - uses: actions/checkout at v2
+ - name: install dependencies
+ run: sudo apt-get install uuid-dev libfuse-dev
+ - name: install lz4
+ if: ${{ matrix.lz4 != 'no' }}
+ run: |
+ cd
+ git clone --depth=1 --branch=${{ matrix.lz4 }} https://github.com/lz4/lz4.git
+ cd lz4
+ make
+ sudo make install
+ sudo ldconfig
+ - name: autogen
+ run: ./autogen.sh
+ - name: configure
+ run: ./configure --enable-fuse
+ - name: make
+ run: make
+ - name: make check
+ run: make check
+ - name: make check (fuse)
+ run: FSTYP=erofsfuse make check
+ - name: make check (root)
+ run: sudo make check
+ - uses: actions/upload-artifact at v2
+ if: ${{ !cancelled() }}
+ with:
+ name: test-results-lz4-${{ matrix.lz4 }}
+ path: tests/results
+ - name: make distcheck
+ run: make distcheck
diff --git a/.gitignore b/.gitignore
index e4349dd..0feae62 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,7 @@
*.so
*.so.dbg
*.tar.*
+!.github
#
# Generated files
--
2.30.0
More information about the Linux-erofs
mailing list