|
| 1 | +# Defaults |
| 2 | +os: linux |
| 3 | +dist: xenial |
1 | 4 |
|
2 | | -language: cpp |
3 | | -sudo: required |
| 5 | +matrix: |
| 6 | + include: |
| 7 | + - name: "GCC-9" |
| 8 | + addons: |
| 9 | + apt: |
| 10 | + sources: |
| 11 | + - ubuntu-toolchain-r-test |
| 12 | + packages: |
| 13 | + - g++-9 |
| 14 | + - ninja-build |
| 15 | + env: |
| 16 | + - CC: gcc-9 |
| 17 | + - CXX: g++-9 |
4 | 18 |
|
5 | | -compiler: |
6 | | - - clang |
| 19 | + - name: "GCC-7" |
| 20 | + addons: |
| 21 | + apt: |
| 22 | + sources: |
| 23 | + - ubuntu-toolchain-r-test |
| 24 | + packages: |
| 25 | + - g++-7 |
| 26 | + - ninja-build |
| 27 | + env: |
| 28 | + - CC: gcc-7 |
| 29 | + - CXX: g++-7 |
7 | 30 |
|
8 | | -os: |
9 | | - - osx |
| 31 | + - name: "LLVM/Clang (Travis default)" |
| 32 | + language: cpp |
| 33 | + compiler: clang |
| 34 | + addons: |
| 35 | + apt: |
| 36 | + packages: |
| 37 | + - ninja-build |
| 38 | + env: |
| 39 | + - SQLITE_ORM_OMITS_CODECVT: ON |
10 | 40 |
|
| 41 | + - name: AppleClang-10.0.1 |
| 42 | + os: osx |
| 43 | + osx_image: xcode10.2 |
| 44 | + language: cpp |
| 45 | + env: |
| 46 | + - SQLITE_ORM_OMITS_CODECVT: ON |
| 47 | + addons: |
| 48 | + homebrew: |
| 49 | + packages: |
| 50 | + - catch2 |
| 51 | + - ninja |
| 52 | + update: true |
| 53 | + |
| 54 | + - name: "LLVM/Clang (latest)" |
| 55 | + os: osx |
| 56 | + osx_image: xcode10.2 |
| 57 | + addons: |
| 58 | + homebrew: |
| 59 | + packages: |
| 60 | + - llvm |
| 61 | + - catch2 |
| 62 | + - ninja |
| 63 | + update: true |
| 64 | + env: |
| 65 | + - CPPFLAGS: "-I/usr/local/opt/llvm/include" |
| 66 | + - LDFLAGS: "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" |
| 67 | + - CPATH: /usr/local/opt/llvm/include |
| 68 | + - LIBRARY_PATH: /usr/local/opt/llvm/lib |
| 69 | + - LD_LIBRARY_PATH: /usr/local/opt/llvm/lib |
| 70 | + - CC: /usr/local/opt/llvm/bin/clang |
| 71 | + - CXX: /usr/local/opt/llvm/bin/clang++ |
| 72 | + - SQLITE_ORM_OMITS_CODECVT: ON |
| 73 | + |
| 74 | + - name: "GCC-6" |
| 75 | + os: osx |
| 76 | + osx_image: xcode10.2 |
| 77 | + addons: |
| 78 | + homebrew: |
| 79 | + packages: |
| 80 | + - gcc@6 |
| 81 | + - catch2 |
| 82 | + - ninja |
| 83 | + update: true |
| 84 | + env: |
| 85 | + - CC: gcc-6 |
| 86 | + - CXX: g++-6 |
| 87 | + |
| 88 | +before_install: |
| 89 | + - | |
| 90 | + if [[ ${TRAVIS_OS_NAME} == "osx" ]]; then |
| 91 | + export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" # Use coreutils from homebrew. |
| 92 | + fi |
| 93 | +
|
| 94 | +install: |
| 95 | + - | |
| 96 | + # Catch2 test framework |
| 97 | + if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then |
| 98 | + git clone --depth=1 --quiet https://github.com/catchorg/Catch2.git |
| 99 | + cd Catch2 |
| 100 | + cmake -Bbuild -H. -DBUILD_TESTING=OFF |
| 101 | + sudo env "PATH=$PATH" cmake --build ./build --target install |
| 102 | + fi |
| 103 | +
|
| 104 | +# scripts to run before build |
| 105 | +before_script: |
| 106 | + - if [[ "$CXX" == *"clang"* ]]; then clang --version ; fi |
| 107 | + - cd ${TRAVIS_BUILD_DIR} |
| 108 | + - mkdir compile && cd compile |
| 109 | + - cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DSQLITE_ORM_OMITS_CODECVT="${SQLITE_ORM_OMITS_CODECVT:OFF}" .. |
| 110 | + |
| 111 | +# build examples, and run tests (ie make & make test) |
11 | 112 | script: |
12 | | - - wget https://sqlite.org/2017/sqlite-amalgamation-3190300.zip |
13 | | - - unzip sqlite-amalgamation-3190300.zip |
14 | | - - mkdir sqlite_amalgamation |
15 | | - - cp -r sqlite-amalgamation-3190300/* sqlite_amalgamation |
16 | | - - rm sqlite-amalgamation-3190300.zip |
17 | | - - clang -c sqlite-amalgamation-3190300/sqlite3.c -o sqlite.static |
18 | | - - clang++ -std=c++1y tests/tests.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -stdlib=libc++ -o tests.out |
19 | | - - ./tests.out |
20 | | - - clang++ -std=c++1y tests/tests.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -stdlib=libc++ -D SQLITE_ORM_OMITS_CODECVT -o tests_without_codecvt.out |
21 | | - - ./tests_without_codecvt.out |
22 | | - - clang++ -std=c++1y tests/static_tests.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -stdlib=libc++ -o static_tests.out |
23 | | - - ./static_tests.out |
24 | | - - clang++ -std=c++1y examples/core_functions.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
25 | | - - ./a.out |
26 | | - - clang++ -std=c++1y examples/distinct.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
27 | | - - ./a.out |
28 | | - - clang++ -std=c++1y examples/enum_binding.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
29 | | - - ./a.out |
30 | | - - clang++ -std=c++1y examples/group_by.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
31 | | - - ./a.out |
32 | | - - clang++ -std=c++1y examples/in_memory.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
33 | | - - ./a.out |
34 | | - - clang++ -std=c++1y examples/iteration.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
35 | | - - ./a.out |
36 | | - - clang++ -std=c++1y examples/key_value.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
37 | | - - ./a.out |
38 | | - - clang++ -std=c++1y examples/nullable_enum_binding.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
39 | | - - ./a.out |
40 | | - - clang++ -std=c++1y examples/select.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
41 | | - - ./a.out |
42 | | - - clang++ -std=c++1y examples/subentities.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
43 | | - - ./a.out |
44 | | - - clang++ -std=c++1y examples/insert.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
45 | | - - ./a.out |
46 | | - - clang++ -std=c++1y examples/update.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
47 | | - - ./a.out |
48 | | - - clang++ -std=c++1y examples/multi_table_select.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
49 | | - - ./a.out |
50 | | - - clang++ -std=c++1y examples/cross_join.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
51 | | - - ./a.out |
52 | | - - clang++ -std=c++1y examples/blob.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
53 | | - - ./a.out |
54 | | - - clang++ -std=c++1y examples/foreign_key.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
55 | | - - ./a.out |
56 | | - - clang++ -std=c++1y examples/index.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
57 | | - - ./a.out |
58 | | - - clang++ -std=c++1y examples/date_time.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
59 | | - - ./a.out |
60 | | - - clang++ -std=c++1y examples/composite_key.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
61 | | - - ./a.out |
62 | | - - clang++ -std=c++1y examples/unique.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
63 | | - - ./a.out |
64 | | - - clang++ -std=c++1y examples/synchronous.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
65 | | - - ./a.out |
66 | | - - clang++ -std=c++1y examples/self_join.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
67 | | - - ./a.out |
68 | | - - clang++ -std=c++1y examples/natural_join.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
69 | | - - ./a.out |
70 | | - - clang++ -std=c++1y examples/union.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
71 | | - - ./a.out |
72 | | - - clang++ -std=c++1y examples/subquery.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
73 | | - - ./a.out |
74 | | - - clang++ -std=c++1y examples/having.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
75 | | - - ./a.out |
76 | | - - clang++ -std=c++1y examples/exists.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
77 | | - - ./a.out |
78 | | - - clang++ -std=c++1y examples/except_intersection.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
79 | | - - ./a.out |
80 | | - - clang++ -std=c++1y examples/custom_aliases.cpp sqlite.static -I include/ -I sqlite_amalgamation/ -ldl -lpthread -o a.out |
81 | | - - ./a.out |
| 113 | + - cmake --build . --config Debug -- -k 10 |
| 114 | + - ctest --verbose --output-on-failure -C Debug -j $(nproc) |
0 commit comments