From 3845b1eff4d8e0cd493fff90730dfcd5499ddbaf Mon Sep 17 00:00:00 2001 From: kinichiro Date: Fri, 21 May 2021 21:02:17 +0900 Subject: Use github actions for linux test --- .github/workflows/linux_test.yml | 64 ++++++++++++++++++++++++++++++++++++++++ scripts/travis | 24 ++++----------- 2 files changed, 69 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/linux_test.yml diff --git a/.github/workflows/linux_test.yml b/.github/workflows/linux_test.yml new file mode 100644 index 0000000..c205545 --- /dev/null +++ b/.github/workflows/linux_test.yml @@ -0,0 +1,64 @@ +name: linux_ci + +on: [push] + +jobs: + build-native: + strategy: + matrix: + os: [macos-latest, ubuntu-18.04] + compiler: [clang, gcc] + runs-on: ${{ matrix.os }} + continue-on-error: true + env: + CC: ${{ matrix.compiler }} + ARCH: native + name: ${{ matrix.compiler }} - ${{ matrix.os }} + steps: + - name: Install packages for macos + if: matrix.os == 'macos-latest' + run: brew install automake + - uses: actions/checkout@v2 + - name: Run CI script + run: ./scripts/travis + + build-other: + strategy: + matrix: + arch: [mingw32, mingw64, arm32, arm64] + runs-on: ubuntu-18.04 + continue-on-error: true + env: + CC: gcc + ARCH: ${{ matrix.arch }} + name: ${{ matrix.arch }} + steps: + - uses: actions/checkout@v2 + - name: Run CI script + run: ./scripts/travis + + build-android-8-9: + runs-on: ubuntu-18.04 + continue-on-error: true + env: + ARCH: android + MIN_NAL: 26 + MAX_NAL: 28 + name: Android 8.x 9 + steps: + - uses: actions/checkout@v2 + - name: Run CI script + run: ./scripts/travis + + build-android-10-11: + runs-on: ubuntu-18.04 + continue-on-error: true + env: + ARCH: android + MIN_NAL: 29 + MAX_NAL: 30 + name: Android 10 11 + steps: + - uses: actions/checkout@v2 + - name: Run CI script + run: ./scripts/travis diff --git a/scripts/travis b/scripts/travis index 84f3f19..a18f58c 100755 --- a/scripts/travis +++ b/scripts/travis @@ -97,23 +97,9 @@ elif [ "x$ARCH" = "xarm32" -o "x$ARCH" = "xarm64" ]; then file apps/openssl/.libs/openssl elif [ "x$ARCH" = "xandroid" ]; then - touch $HOME/.android/repositories.cfg - echo "##### Date: `date` install NDK and build tools" - echo y | sdkmanager 'platforms;android-30' > /dev/null 2>&1 - echo "##### Date: `date` platforms;android installed" - echo y | sdkmanager 'ndk-bundle' > /dev/null 2>&1 - echo "##### Date: `date` ndk-bundle installed" - echo y | sdkmanager 'ndk;22.1.7171670' - echo "##### Date: `date` ndk installed" - echo y | sdkmanager 'cmake;3.18.1' - echo "##### Date: `date` cmake installed" - - echo "##### Date: `date` sdkmanager --list" - sdkmanager --list - - export CMAKE=$ANDROID_HOME/cmake/3.18.1/bin/cmake - export NINJA=$ANDROID_HOME/cmake/3.18.1/bin/ninja - export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle + sudo apt-get update + sudo apt-get install -y cmake ninja-build + export TC_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake # set target API level and architecture @@ -143,12 +129,12 @@ elif [ "x$ARCH" = "xandroid" ]; then rm -fr $build_dir mkdir $build_dir cd $build_dir - $CMAKE -GNinja -DCMAKE_MAKE_PROGRAM=$NINJA \ + cmake -GNinja -DCMAKE_MAKE_PROGRAM=ninja \ -DANDROID_NDK=$ANDROID_NDK_HOME \ -DCMAKE_TOOLCHAIN_FILE=$TC_FILE \ -DANDROID_ABI=$ABI -DANDROID_NATIVE_API_LEVEL=$NAL .. - $NINJA -j 4 + ninja -j 4 echo "" file apps/openssl/openssl -- cgit v1.2.3-55-g6feb