Skip to content

Commit 7bc3b04

Browse files
committed
link gcov only on linux and windows and clean workflow
1 parent 826d91f commit 7bc3b04

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,19 +116,16 @@ jobs:
116116
git clone https://github.com/openssl/openssl.git
117117
cd openssl
118118
export TOOLCHAIN=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64
119-
export ANDROID_API=26
120119
export ARCH=${{ matrix.arch }}
121120
export PATH=$TOOLCHAIN/bin:$PATH
122-
TARGET=android-${{ matrix.arch == 'arm64-v8a' && 'arm64' || matrix.arch }}
123121
124-
./Configure $TARGET \
122+
./Configure android-${{ matrix.arch == 'arm64-v8a' && 'arm64' || matrix.arch }} \
125123
--prefix=$PWD/build \
126124
--openssldir=$PWD/build/ssl \
127125
no-shared \
128126
no-unit-test \
129-
-D__ANDROID_API__=$ANDROID_API
127+
-D__ANDROID_API__=26
130128
make
131-
make install_sw
132129
133130
cp build/lib/libssl.a $TOOLCHAIN/sysroot/usr/lib/
134131
cp build/lib/libcrypto.a $TOOLCHAIN/sysroot/usr/lib/
@@ -249,6 +246,7 @@ jobs:
249246
cat > commands.sh << EOF
250247
mv -f /data/local/tmp/sqlite3 /system/xbin
251248
cd /data/local/tmp
249+
rm -rf .git .github build docs network sqlite #remove unused folders to save up space
252250
$(make test CC=$CC PLATFORM=$PLATFORM -n)
253251
EOF
254252
echo "::endgroup::"
@@ -263,7 +261,6 @@ jobs:
263261
adb root
264262
adb remount
265263
adb push ${{ github.workspace }}/. /data/local/tmp/
266-
adb push $ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/libc++_shared.so /data/local/tmp/
267264
adb shell "ls -lah /data/local/tmp/"
268265
adb shell "sh /data/local/tmp/commands.sh"
269266

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ else # linux
8686
endif
8787

8888
ifneq ($(COVERAGE),false)
89-
TEST_FLAGS += -lgcov -fprofile-arcs -ftest-coverage
89+
ifneq (,$(filter $(platform),linux windows))
90+
TEST_FLAGS += -lgcov
91+
endif
92+
TEST_FLAGS += -fprofile-arcs -ftest-coverage
9093
endif
9194

9295
# Windows .def file generation

0 commit comments

Comments
 (0)