-
Notifications
You must be signed in to change notification settings - Fork 9
/
.gitlab-ci.yml
108 lines (97 loc) · 4.03 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
image: viaduck/ci
stages:
- build
- lint
- test
variables:
GIT_SUBMODULE_STRATEGY: recursive
ANDROID_PLATFORM: "android-23"
build:linux-x86_64:
stage: build
script:
- mkdir build-linux-x86_64
- cd build-linux-x86_64
- cmake -GNinja ../ -DCRYPTO_SQLITE_BUILD_TESTS=ON -DGTEST_SRC_DIR=/usr/src/googletest/
- ninja
artifacts:
expire_in: 2h # do not pollute disk
paths:
- build-linux-x86_64/
lint:linux-x86_64:
stage: lint
script:
- vd-lint CryptoSQLite $PWD
needs:
- job: build:linux-x86_64
artifacts: false
test:linux-x86_64:
variables:
GIT_STRATEGY: none
stage: test
script:
- cd /tmp
- $OLDPWD/build-linux-x86_64/test/crypto_sqlite_test
needs:
- build:linux-x86_64
build:windows-x86_64:
image: viaduck/ci:mingw
stage: build
script:
- update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix # fix c++11 threading support on debian
- update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
- mkdir build-windows-x86_64
- cd build-windows-x86_64
- cmake -GNinja ../ -DPREBUILT_BRANCH=x86_64-w64-mingw32 -DCMAKE_TOOLCHAIN_FILE=../external/secure_memory/cmake-modules/toolchains/mingw64-x86_64.cmake -DCRYPTO_SQLITE_BUILD_TESTS=ON -DGTEST_SRC_DIR=/usr/src/googletest/
- ninja
- peldd -p "external/icu-cmake/icu_pre-prefix/src/icu_pre/bin" test/crypto_sqlite_test.exe | grep -vE '\.exe$' | xargs cp -t .
artifacts:
expire_in: 2h # do not pollute disk
paths:
- build-windows-x86_64/
test:windows-x86_64:
variables:
GIT_STRATEGY: none
script:
- cd build-windows-x86_64
- test\crypto_sqlite_test.exe # runs gtest target
stage: test
needs:
- build:windows-x86_64
tags:
- windows
build:android-arm64-v8a:
image: viaduck/ci:android
stage: build
script:
- echo $ANDROID_NDK
- mkdir build-android-arm64-v8a
- cd build-android-arm64-v8a
- cmake -GNinja ../ -DPREBUILT_BRANCH=arm64-v8a-android -DANDROID_PLATFORM=$ANDROID_PLATFORM -DANDROID_ABI=arm64-v8a -DANDROID_TOOLCHAIN=clang -DANDROID_NDK=$ANDROID_NDK -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DCRYPTO_SQLITE_BUILD_TESTS=ON -DGTEST_SRC_DIR=/usr/src/googletest/
- ninja
build:android-armeabi-v7a:
image: viaduck/ci:android
stage: build
script:
- echo $ANDROID_NDK
- mkdir build-android-armeabi-v7a
- cd build-android-armeabi-v7a
- cmake -GNinja ../ -DPREBUILT_BRANCH=armeabi-v7a-android -DANDROID_PLATFORM=$ANDROID_PLATFORM -DANDROID_ABI=armeabi-v7a -DANDROID_TOOLCHAIN=clang -DANDROID_NDK=$ANDROID_NDK -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DCRYPTO_SQLITE_BUILD_TESTS=ON -DGTEST_SRC_DIR=/usr/src/googletest/
- ninja
build:android-i686:
image: viaduck/ci:android
stage: build
script:
- echo $ANDROID_NDK
- mkdir build-android-i686
- cd build-android-i686
- cmake -GNinja ../ -DPREBUILT_BRANCH=i686-android -DANDROID_PLATFORM=$ANDROID_PLATFORM -DANDROID_ABI=x86 -DANDROID_TOOLCHAIN=clang -DANDROID_NDK=$ANDROID_NDK -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DCRYPTO_SQLITE_BUILD_TESTS=ON -DGTEST_SRC_DIR=/usr/src/googletest/
- ninja
build:android-x86_64:
image: viaduck/ci:android
stage: build
script:
- echo $ANDROID_NDK
- mkdir build-android-x86_64
- cd build-android-x86_64
- cmake -GNinja ../ -DPREBUILT_BRANCH=x86_64-android -DANDROID_PLATFORM=$ANDROID_PLATFORM -DANDROID_ABI=x86_64 -DANDROID_TOOLCHAIN=clang -DANDROID_NDK=$ANDROID_NDK -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DCRYPTO_SQLITE_BUILD_TESTS=ON -DGTEST_SRC_DIR=/usr/src/googletest/
- ninja