diff options
author | Eric Biggers <ebiggers@google.com> | 2023-03-21 20:29:45 -0700 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2023-05-30 15:56:38 -0400 |
commit | 018ddcb29239fbd0a16a54e00613954e2d88b2b6 (patch) | |
tree | 5ffcb98856e5cd3f950af137a57a1458d535f900 | |
parent | 5598a968f3ee2ba5a8a6b988343905a2831f963c (diff) | |
download | e2fsprogs-018ddcb29239fbd0a16a54e00613954e2d88b2b6.tar.gz |
ci.yml: test cross-compiling for Android
Add jobs that cross-compile e2fsprogs for Android using the Android NDK.
These use the autotools-based build system, so they're a bit different
from the actual Android builds, but they should still be useful.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | .github/workflows/ci.yml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b0f91506..0c14250a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,3 +126,36 @@ jobs: with: name: windows-${{matrix.env}}-config.h path: lib/config.h + + # Jobs that cross-compile e2fsprogs for Android using the Android NDK. Note + # that these use the autotools-based build system, which makes them a bit + # different from the actual Android builds from the Android source tree. + cross-compile-for-android: + name: Cross-compile for Android (${{matrix.arch}}) + strategy: + matrix: + include: + - { arch: aarch64, target: aarch64-linux-android } + - { arch: armv7a, target: armv7a-linux-androideabi } + - { arch: i686, target: i686-linux-android } + - { arch: x86_64, target: x86_64-linux-android } + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # See https://developer.android.com/ndk/guides/other_build_systems#autoconf + - name: configure + run: | + TOOLCHAIN=$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64 + API_LEVEL=29 # Android 10 + export AR=$TOOLCHAIN/bin/llvm-ar + export CC=$TOOLCHAIN/bin/${{matrix.target}}${API_LEVEL}-clang + export AS=$CC + export LD=$TOOLCHAIN/bin/ld + export RANLIB=$TOOLCHAIN/bin/llvm-ranlib + export STRIP=$TOOLCHAIN/bin/llvm-strip + ./configure --host=${{matrix.target}} CFLAGS="$DEF_CFLAGS" + - run: make -j8 V=1 CFLAGS_WARN="-Werror" + - uses: actions/upload-artifact@v3 + with: + name: android-${{matrix.arch}}-config.h + path: lib/config.h |