third_party_f2fs-tools/.github/workflows/ci.yml
Bart Van Assche 405f15d7ad ci: Build f2fstools upon push and pull requests
commit cb4c5d616ccfac739cf8cef6469da631844aeb1f
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

For those who use Github to contribute f2fs-tools patches, let the
github servers build the f2fs-tools source code upon every push and pull
requests. This change does not affect users who do not use Github.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>

 create mode 100644 .github/workflows/ci.yml

Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:48 +08:00

71 lines
2.3 KiB
YAML

# See also https://docs.github.com/en/actions/learn-github-actions/expressions
# See also https://github.com/marketplace/actions/setup-android-ndk
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build:
- android
- linux-gcc
- linux-clang
- linux-x86-gcc
- linux-powerpc64-gcc
- linux-mingw64-gcc
- macos
include:
- build: android
cc: clang
host: aarch64-linux-android32
- build: linux-gcc
cc: gcc
- build: linux-clang
cc: clang
- build: linux-x86-gcc
cc: gcc
arch: x86
- build: linux-powerpc64-gcc
cc: gcc
host: powerpc64-linux-gnu
- build: linux-mingw64-gcc
cc: gcc
host: x86_64-w64-mingw32
cflags: -D__USE_MINGW_ANSI_STDIO
- build: macos
cc: clang
os: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install Android NDK
run: |
if [ ${{matrix.build}} = android ]; then \
wget --quiet https://dl.google.com/android/repository/android-ndk-r24-linux.zip; \
unzip -q android-ndk-r24-linux.zip; \
fi
- name: Install Ubuntu packages
run: |
sudo apt-get -q update
case "${{matrix.host}}" in \
x86_64-w64-mingw32) \
sudo apt-get -q install -y binutils-mingw-w64 gcc-mingw-w64;; \
powerpc64-linux-gnu) \
sudo apt-get -q install -y binutils-powerpc64-linux-gnu \
gcc-powerpc64-linux-gnu;; \
esac
- name: Build
run: |
echo "HOST=${{matrix.host}}"
NDK=$PWD/android-ndk-r24/toolchains/llvm/prebuilt/linux-x86_64/bin
export PATH="$NDK:$PATH"
./autogen.sh
./configure --host=${{matrix.host}} \
CC=${{ matrix.host && format('{0}-{1}', matrix.host, matrix.cc) || matrix.cc }} \
CFLAGS="${{matrix.cflags}}"
make -j$(nproc)