linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: linux-ext4@vger.kernel.org
Subject: [PATCH 38/38] Add a configuration file for GitHub Actions
Date: Sat, 21 Jan 2023 12:32:30 -0800	[thread overview]
Message-ID: <20230121203230.27624-39-ebiggers@kernel.org> (raw)
In-Reply-To: <20230121203230.27624-1-ebiggers@kernel.org>

From: Eric Biggers <ebiggers@google.com>

Add a workflow file for GitHub Actions, with jobs that build and test
e2fsprogs on various platforms with various options.

The workflow is configured to run on pushes only, since e2fsprogs does
not use GitHub pull requests.

This will work on any e2fsprogs fork on Github that has GitHub Actions
enabled.  For example, the results for the testing I've been doing are
at https://github.com/ebiggers/e2fsprogs/actions.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 .github/workflows/ci.yml | 116 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 116 insertions(+)
 create mode 100644 .github/workflows/ci.yml

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 000000000..29482178d
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,116 @@
+name: CI
+on: [push]
+env:
+  DEF_CFLAGS: -O2 -g -Wall
+
+jobs:
+  gcc-build-and-test:
+    name: Build and test with gcc
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - run: ./configure CC=gcc CFLAGS="$DEF_CFLAGS"
+    - run: make -j8 check V=1 CFLAGS="$DEF_CFLAGS -Werror"
+    - run: make -j8 install V=1 DESTDIR=$PWD/installdir
+    - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
+
+  clang-build-and-test:
+    name: Build and test with clang
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - name: Install dependencies
+      run: |
+        sudo apt-get update
+        sudo apt-get install -y clang
+    - run: ./configure CC=clang CFLAGS="$DEF_CFLAGS"
+    - run: make -j8 check V=1 CFLAGS="$DEF_CFLAGS -Werror"
+    - run: make -j8 install V=1 DESTDIR=$PWD/installdir
+    - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
+
+  i386-build-and-test:
+    name: Build and test with gcc -m32
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - name: Install dependencies
+      run: |
+        sudo apt-get update
+        sudo apt-get install -y gcc-multilib
+    - run: ./configure CC=gcc CFLAGS="$DEF_CFLAGS -m32" LDFLAGS="-m32"
+    - run: make -j8 check V=1 CFLAGS="$DEF_CFLAGS -m32 -Werror"
+    - run: make -j8 install V=1 DESTDIR=$PWD/installdir
+    - run: make -j8 uninstall V=1 DESTDIR=$PWD/installdir
+
+  asan-build-and-test:
+    name: Build and test with ASAN enabled
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - name: Install dependencies
+      run: |
+        sudo apt-get update
+        sudo apt-get install -y clang
+    - run: echo "ASAN_CFLAGS=$DEF_CFLAGS -fsanitize=address -fno-sanitize-recover=address" >> $GITHUB_ENV
+    - run: ./configure CC=clang CFLAGS="$ASAN_CFLAGS" LDFLAGS="$ASAN_CFLAGS"
+    - run: make -j8 check V=1 CFLAGS="$ASAN_CFLAGS -Werror"
+
+  ubsan-build-and-test:
+    name: Build and test with UBSAN enabled
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - name: Install dependencies
+      run: |
+        sudo apt-get update
+        sudo apt-get install -y clang
+    - run: echo "UBSAN_CFLAGS=$DEF_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" >> $GITHUB_ENV
+    - run: ./configure CC=clang CFLAGS="$UBSAN_CFLAGS" LDFLAGS="$UBSAN_CFLAGS"
+    - run: make -j8 check V=1 CFLAGS="$UBSAN_CFLAGS -Werror"
+
+  macos-build-and-test:
+    name: Build and test on macOS
+    runs-on: macos-latest
+    steps:
+    - uses: actions/checkout@v2
+    - run: ./configure CFLAGS="$DEF_CFLAGS"
+      # -Wno-error=deprecated-declarations is needed to suppress known warnings
+      # due to e2fsprogs' use of sbrk(0) and daemon().
+    - run: make -j8 check V=1 CFLAGS="$DEF_CFLAGS -Werror -Wno-error=deprecated-declarations"
+    - run: make -j8 install DESTDIR=$PWD/installdir
+    - run: make -j8 uninstall DESTDIR=$PWD/installdir
+
+  windows-msys2-build:
+    name: Build mke2fs on Windows with ${{matrix.sys}}
+    runs-on: windows-latest
+    strategy:
+      matrix:
+        include:
+        - { sys: mingw32, env: i686 }
+        - { sys: mingw64, env: x86_64 }
+    defaults:
+      run:
+        shell: msys2 {0}
+    steps:
+    - uses: actions/checkout@v2
+    - uses: msys2/setup-msys2@v2
+      with:
+        msystem: ${{matrix.sys}}
+        update: true
+        install: >
+          make
+          mingw-w64-${{matrix.env}}-cc
+    # For now the only parts that actually build for Windows are mke2fs and its
+    # dependencies: all libraries except libss.  The build system doesn't want
+    # to build just those parts, though, so do it one step at a time...
+    - run: ./configure CFLAGS="$DEF_CFLAGS"
+    - run: make -j8 subs V=1 CFLAGS="$DEF_CFLAGS -Werror"
+    - run: make -j8 -C lib/et/ all V=1 CFLAGS="$DEF_CFLAGS -Werror"
+    - run: make -j8 -C lib/uuid/ all V=1 CFLAGS="$DEF_CFLAGS -Werror"
+    - run: make -j8 -C lib/blkid/ all V=1 CFLAGS="$DEF_CFLAGS -Werror"
+    - run: make -j8 -C lib/ext2fs/ all V=1 CFLAGS="$DEF_CFLAGS -Werror"
+    - run: make -j8 -C lib/support/ all V=1 CFLAGS="$DEF_CFLAGS -Werror"
+    - run: make -j8 -C lib/e2p/ all V=1 CFLAGS="$DEF_CFLAGS -Werror"
+    - run: make -j8 -C misc/ mke2fs V=1 CFLAGS="$DEF_CFLAGS -Werror"
+    - run: touch image.ext4
+    - run: misc/mke2fs.exe -T ext4 image.ext4 128M
-- 
2.39.0


  parent reply	other threads:[~2023-01-21 20:37 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-21 20:31 [PATCH 00/38] e2fsprogs: misc fixes, and add a GitHub Actions file Eric Biggers
2023-01-21 20:31 ` [PATCH 01/38] configure.ac: only use Windows I/O manager on native Windows Eric Biggers
2023-01-21 20:31 ` [PATCH 02/38] configure.ac: disable tdb by default on Windows Eric Biggers
2023-01-21 20:31 ` [PATCH 03/38] configure.ac: automatically add include/mingw/ headers Eric Biggers
2023-01-21 20:31 ` [PATCH 04/38] configure: regenerate Eric Biggers
2023-01-21 20:31 ` [PATCH 05/38] config/install-sh: update to latest version Eric Biggers
2023-01-21 20:31 ` [PATCH 06/38] lib, misc: eliminate dependency on Winsock Eric Biggers
2023-01-21 20:31 ` [PATCH 07/38] lib/blkid: remove 32-bit x86 byteswap assembly Eric Biggers
2023-01-24 18:21   ` Andreas Dilger
2023-01-21 20:32 ` [PATCH 08/38] lib/blkid: fix unaligned access to hfs_mdb Eric Biggers
2023-01-21 20:32 ` [PATCH 09/38] lib/blkid: fix -Wunused-variable warning in blkid_get_dev_size() Eric Biggers
2023-01-21 20:32 ` [PATCH 10/38] lib/blkid: suppress -Wunused-result warning in blkid_flush_cache() Eric Biggers
2023-01-21 20:32 ` [PATCH 11/38] lib/blkid: suppress -Wstringop-truncation warning in blkid_strndup() Eric Biggers
2023-01-21 20:32 ` [PATCH 12/38] lib/e2p: fix a -Wunused-variable warning in getflags() Eric Biggers
2023-01-21 20:32 ` [PATCH 13/38] lib/{e2p,ss}: remove manual declarations of errno Eric Biggers
2023-01-21 20:32 ` [PATCH 14/38] lib/et: fix "unused variable" warnings when !HAVE_FCNTL Eric Biggers
2023-01-21 20:32 ` [PATCH 15/38] lib/ext2fs: remove 32-bit x86 bitops assembly Eric Biggers
2023-01-21 20:32 ` [PATCH 16/38] lib/ext2fs: consistently use #ifdefs in ext2fs_print_bmap_statistics() Eric Biggers
2023-01-21 20:32 ` [PATCH 17/38] lib/ext2fs: remove unused variable in ext2fs_xattrs_read_inode() Eric Biggers
2023-01-21 20:32 ` [PATCH 18/38] lib/ext2fs: fix a printf format specifier in file_test() Eric Biggers
2023-01-21 20:32 ` [PATCH 19/38] lib/ext2fs: fix two compiler warnings in windows_io.c Eric Biggers
2023-01-21 20:32 ` [PATCH 20/38] lib/ext2fs: fix a -Wpointer-sign warning in ext2fs_mmp_start() Eric Biggers
2023-01-21 20:32 ` [PATCH 21/38] lib/{ext2fs,support}: fix 32-bit Windows build Eric Biggers
2023-01-21 20:32 ` [PATCH 22/38] lib/ss: fix 'make install' by creating man1dir Eric Biggers
2023-01-21 20:32 ` [PATCH 23/38] lib/support: remove unused label in get_devname() Eric Biggers
2023-01-21 20:32 ` [PATCH 24/38] lib/support: clean up definition of flags_array Eric Biggers
2023-01-21 20:32 ` [PATCH 25/38] lib/uuid: remove conflicting Windows implementation of gettimeofday() Eric Biggers
2023-01-21 20:32 ` [PATCH 26/38] e2fsck: use real functions for kernel slab functions Eric Biggers
2023-01-21 20:32 ` [PATCH 27/38] misc/create_inode: fix -Wunused-variable warnings in __populate_fs() Eric Biggers
2023-01-21 20:32 ` [PATCH 28/38] misc/create_inode: simplify logic in scandir() Eric Biggers
2023-01-21 20:32 ` [PATCH 29/38] misc/e4defrag: fix -Wstringop-truncation warnings Eric Biggers
2023-01-21 20:32 ` [PATCH 30/38] misc/fuse2fs: avoid error-prone strncpy() pattern Eric Biggers
2023-01-21 20:32 ` [PATCH 31/38] misc/mk_hugefiles: simplify get_partition_start() Eric Biggers
2023-01-21 20:32 ` [PATCH 32/38] misc/mke2fs: fix Windows build Eric Biggers
2023-01-21 20:32 ` [PATCH 33/38] misc/mke2fs: fix a -Wunused-variable warning in PRS() Eric Biggers
2023-01-21 20:32 ` [PATCH 34/38] misc/tune2fs: fix setting fsuuid::fsu_len Eric Biggers
2023-01-21 20:32 ` [PATCH 35/38] misc/tune2fs: fix -Wunused-variable warnings in handle_fslabel() Eric Biggers
2023-01-21 20:32 ` [PATCH 36/38] misc/util.c: enable MinGW alarm() when building for Windows Eric Biggers
2023-01-21 20:32 ` [PATCH 37/38] resize2fs: remove unused variable from adjust_superblock() Eric Biggers
2023-01-21 20:32 ` Eric Biggers [this message]
2023-01-24 20:59 ` [PATCH 00/38] e2fsprogs: misc fixes, and add a GitHub Actions file Andreas Dilger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230121203230.27624-39-ebiggers@kernel.org \
    --to=ebiggers@kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).