aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/macos_test.yml7
-rwxr-xr-xscripts/test83
2 files changed, 60 insertions, 30 deletions
diff --git a/.github/workflows/macos_test.yml b/.github/workflows/macos_test.yml
index 83a1b35..d7509d6 100644
--- a/.github/workflows/macos_test.yml
+++ b/.github/workflows/macos_test.yml
@@ -6,13 +6,12 @@ jobs:
6 build-native: 6 build-native:
7 strategy: 7 strategy:
8 matrix: 8 matrix:
9 os: [macos-12, macos-11] 9 os: [macos-13, macos-12]
10 compiler: [clang, gcc] 10 arch: [arm64, x86_64]
11 runs-on: ${{ matrix.os }} 11 runs-on: ${{ matrix.os }}
12 continue-on-error: false 12 continue-on-error: false
13 env: 13 env:
14 CC: ${{ matrix.compiler }} 14 ARCH: ${{ matrix.arch }}
15 ARCH: native
16 name: ${{ matrix.compiler }} - ${{ matrix.os }} 15 name: ${{ matrix.compiler }} - ${{ matrix.os }}
17 steps: 16 steps:
18 - name: Install packages for macos 17 - name: Install packages for macos
diff --git a/scripts/test b/scripts/test
index f1fdd83..97e316e 100755
--- a/scripts/test
+++ b/scripts/test
@@ -10,46 +10,77 @@ if type apt-get >/dev/null 2>&1; then
10 sudo apt-get install -y cmake ninja-build 10 sudo apt-get install -y cmake ninja-build
11fi 11fi
12 12
13# generate source tree
13./autogen.sh 14./autogen.sh
14 15
15if [ "x$ARCH" = "xnative" ]; then 16if [ "$ARCH" = "" ]; then
17 ARCH=`uname -m`
18fi
19
20# test macOS
21if [ `uname` = "Darwin" ]; then
16 # test autotools 22 # test autotools
17 ./configure 23 ./configure
18 make -j 4 distcheck
19 24
20 # make distribution 25 # make distribution
21 make dist 26 make -j 4 distcheck
27
28 # test cmake
22 tar zxvf libressl-*.tar.gz 29 tar zxvf libressl-*.tar.gz
23 cd libressl-* 30 cd libressl-*
24 mkdir build-static
25 mkdir build-shared
26
27 cd build-static
28 31
29 # test cmake and ninja 32 (
30 if [ `uname` = "Darwin" ]; then 33 mkdir build-static
31 cmake -DENABLE_ASM=${ENABLE_ASM} .. 34 cd build-static
35 cmake -DCMAKE_OSX_ARCHITECTURES=$ARCH ..
32 make -j 4 36 make -j 4
33 make test 37 if [ "$ARCH" = "x86_64" ]; then
38 make test
39 fi
40 )
34 41
35 cd ../build-shared 42 (
36 cmake -DBUILD_SHARED_LIBS=ON -DENABLE_ASM=${ENABLE_ASM} .. 43 mkdir build-shared
44 cd build-shared
45 cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_OSX_ARCHITECTURES=$ARCH ..
37 make -j 4 46 make -j 4
38 make test 47 if [ "$ARCH" = "x86_64" ]; then
39 else 48 make test
49 fi
50 )
51
52# assuming Linux below
53elif [ "$ARCH" = "native" ]; then
54 # test autotools
55 ./configure
56
57 # make distribution
58 make -j 4 distcheck
59
60 tar zxvf libressl-*.tar.gz
61 cd libressl-*
62
63
64 # test cmake and ninja
65 (
66 mkdir build-static
67 cd build-static
40 cmake -GNinja -DENABLE_ASM=${ENABLE_ASM} .. 68 cmake -GNinja -DENABLE_ASM=${ENABLE_ASM} ..
41 ninja -j 4 69 ninja
42 ninja test 70 ninja test
71 )
43 72
44 cd ../build-shared 73 (
74 mkdir build-shared
75 cd build-shared
45 cmake -GNinja -DBUILD_SHARED_LIBS=ON -DENABLE_ASM=${ENABLE_ASM} .. 76 cmake -GNinja -DBUILD_SHARED_LIBS=ON -DENABLE_ASM=${ENABLE_ASM} ..
46 ninja -j 4 77 ninja
47 ninja test 78 ninja test
48 fi 79 )
49 80
50elif [ "x$ARCH" = "xmingw32" -o "x$ARCH" = "xmingw64" ]; then 81elif [ "$ARCH" = "mingw32" -o "$ARCH" = "mingw64" ]; then
51 CPU=i686 82 CPU=i686
52 if [ "x$ARCH" = "xmingw64" ]; then 83 if [ "$ARCH" = "mingw64" ]; then
53 CPU=x86_64 84 CPU=x86_64
54 fi 85 fi
55 86
@@ -75,10 +106,10 @@ elif [ "x$ARCH" = "xmingw32" -o "x$ARCH" = "xmingw64" ]; then
75 ninja -j 4 106 ninja -j 4
76 ) 107 )
77 108
78elif [ "x$ARCH" = "xarm32" -o "x$ARCH" = "xarm64" ]; then 109elif [ "$ARCH" = "arm32" -o "$ARCH" = "arm64" ]; then
79 sudo apt-get install -y qemu-user-static binfmt-support 110 sudo apt-get install -y qemu-user-static binfmt-support
80 111
81 if [ "x$ARCH" = "xarm32" ]; then 112 if [ "$ARCH" = "arm32" ]; then
82 sudo apt-get install -y g++-arm-linux-gnueabihf 113 sudo apt-get install -y g++-arm-linux-gnueabihf
83 sudo ln -sf /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 /lib/ 114 sudo ln -sf /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 /lib/
84 ./configure --host=arm-linux-gnueabihf 115 ./configure --host=arm-linux-gnueabihf
@@ -92,10 +123,10 @@ elif [ "x$ARCH" = "xarm32" -o "x$ARCH" = "xarm64" ]; then
92 123
93 file apps/openssl/.libs/openssl 124 file apps/openssl/.libs/openssl
94 125
95elif [ "x$ARCH" = "xmips32" -o "x$ARCH" = "xmips64" ]; then 126elif [ "$ARCH" = "mips32" -o "$ARCH" = "mips64" ]; then
96 sudo apt-get install -y qemu-user-static binfmt-support 127 sudo apt-get install -y qemu-user-static binfmt-support
97 128
98 if [ "x$ARCH" = "xmips32" ]; then 129 if [ "$ARCH" = "mips32" ]; then
99 sudo apt-get install -y g++-mips-linux-gnu 130 sudo apt-get install -y g++-mips-linux-gnu
100 sudo ln -sf /usr/mipsel-linux-gnu/lib/ld.so.1 /lib/ 131 sudo ln -sf /usr/mipsel-linux-gnu/lib/ld.so.1 /lib/
101 ./configure --host=mipsel-linux-gnu 132 ./configure --host=mipsel-linux-gnu
@@ -109,7 +140,7 @@ elif [ "x$ARCH" = "xmips32" -o "x$ARCH" = "xmips64" ]; then
109 140
110 file apps/openssl/.libs/openssl 141 file apps/openssl/.libs/openssl
111 142
112elif [ "x$ARCH" = "xandroid" ]; then 143elif [ "$ARCH" = "android" ]; then
113 export TC_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake 144 export TC_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake
114 145
115 # set target API level and architecture 146 # set target API level and architecture