aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/linux_test.yml64
-rwxr-xr-xscripts/travis24
2 files changed, 69 insertions, 19 deletions
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 @@
1name: linux_ci
2
3on: [push]
4
5jobs:
6 build-native:
7 strategy:
8 matrix:
9 os: [macos-latest, ubuntu-18.04]
10 compiler: [clang, gcc]
11 runs-on: ${{ matrix.os }}
12 continue-on-error: true
13 env:
14 CC: ${{ matrix.compiler }}
15 ARCH: native
16 name: ${{ matrix.compiler }} - ${{ matrix.os }}
17 steps:
18 - name: Install packages for macos
19 if: matrix.os == 'macos-latest'
20 run: brew install automake
21 - uses: actions/checkout@v2
22 - name: Run CI script
23 run: ./scripts/travis
24
25 build-other:
26 strategy:
27 matrix:
28 arch: [mingw32, mingw64, arm32, arm64]
29 runs-on: ubuntu-18.04
30 continue-on-error: true
31 env:
32 CC: gcc
33 ARCH: ${{ matrix.arch }}
34 name: ${{ matrix.arch }}
35 steps:
36 - uses: actions/checkout@v2
37 - name: Run CI script
38 run: ./scripts/travis
39
40 build-android-8-9:
41 runs-on: ubuntu-18.04
42 continue-on-error: true
43 env:
44 ARCH: android
45 MIN_NAL: 26
46 MAX_NAL: 28
47 name: Android 8.x 9
48 steps:
49 - uses: actions/checkout@v2
50 - name: Run CI script
51 run: ./scripts/travis
52
53 build-android-10-11:
54 runs-on: ubuntu-18.04
55 continue-on-error: true
56 env:
57 ARCH: android
58 MIN_NAL: 29
59 MAX_NAL: 30
60 name: Android 10 11
61 steps:
62 - uses: actions/checkout@v2
63 - name: Run CI script
64 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
97 file apps/openssl/.libs/openssl 97 file apps/openssl/.libs/openssl
98 98
99elif [ "x$ARCH" = "xandroid" ]; then 99elif [ "x$ARCH" = "xandroid" ]; then
100 touch $HOME/.android/repositories.cfg 100 sudo apt-get update
101 echo "##### Date: `date` install NDK and build tools" 101 sudo apt-get install -y cmake ninja-build
102 echo y | sdkmanager 'platforms;android-30' > /dev/null 2>&1 102
103 echo "##### Date: `date` platforms;android installed"
104 echo y | sdkmanager 'ndk-bundle' > /dev/null 2>&1
105 echo "##### Date: `date` ndk-bundle installed"
106 echo y | sdkmanager 'ndk;22.1.7171670'
107 echo "##### Date: `date` ndk installed"
108 echo y | sdkmanager 'cmake;3.18.1'
109 echo "##### Date: `date` cmake installed"
110
111 echo "##### Date: `date` sdkmanager --list"
112 sdkmanager --list
113
114 export CMAKE=$ANDROID_HOME/cmake/3.18.1/bin/cmake
115 export NINJA=$ANDROID_HOME/cmake/3.18.1/bin/ninja
116 export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle
117 export TC_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake 103 export TC_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake
118 104
119 # set target API level and architecture 105 # set target API level and architecture
@@ -143,12 +129,12 @@ elif [ "x$ARCH" = "xandroid" ]; then
143 rm -fr $build_dir 129 rm -fr $build_dir
144 mkdir $build_dir 130 mkdir $build_dir
145 cd $build_dir 131 cd $build_dir
146 $CMAKE -GNinja -DCMAKE_MAKE_PROGRAM=$NINJA \ 132 cmake -GNinja -DCMAKE_MAKE_PROGRAM=ninja \
147 -DANDROID_NDK=$ANDROID_NDK_HOME \ 133 -DANDROID_NDK=$ANDROID_NDK_HOME \
148 -DCMAKE_TOOLCHAIN_FILE=$TC_FILE \ 134 -DCMAKE_TOOLCHAIN_FILE=$TC_FILE \
149 -DANDROID_ABI=$ABI -DANDROID_NATIVE_API_LEVEL=$NAL .. 135 -DANDROID_ABI=$ABI -DANDROID_NATIVE_API_LEVEL=$NAL ..
150 136
151 $NINJA -j 4 137 ninja -j 4
152 138
153 echo "" 139 echo ""
154 file apps/openssl/openssl 140 file apps/openssl/openssl