Skip to content

Commit

Permalink
Fix/travis (#609)
Browse files Browse the repository at this point in the history
* Uncomment mac os and fix bug

* Fix travis validation

* Fix intendation

* test

* Downgrade cmake

* Fix sqlite hash

* syntax error

* typo

* Trigger rebuild

* Fix target linker language issue

* Remove third party sqlite3

* Cleanup

* Revert third_party and delete sqlite3 folder
  • Loading branch information
Leon0402 committed Oct 9, 2020
1 parent 76f4d7c commit a1f4ff6
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 186 deletions.
164 changes: 75 additions & 89 deletions .travis.yml
@@ -1,6 +1,6 @@
# Defaults
os: linux
dist: bionic
dist: focal

matrix:
include:
Expand Down Expand Up @@ -38,52 +38,49 @@ matrix:
env:
- SQLITE_ORM_OMITS_CODECVT: ON

# - name: "[C++14] AppleClang-10.0.1"
# os: osx
# osx_image: xcode10.2
# language: cpp
# env:
# - SQLITE_ORM_OMITS_CODECVT: ON
# addons:
# homebrew:
# packages:
# - catch2
# - ninja
# update: true
- name: "[C++14] AppleClang-10.0.1"
os: osx
osx_image: xcode10.2
language: cpp
env:
- SQLITE_ORM_OMITS_CODECVT: ON
addons:
homebrew:
packages:
- ninja
update: true

# - name: "[C++14] LLVM/Clang (latest)"
# os: osx
# osx_image: xcode10.2
# addons:
# homebrew:
# packages:
# - llvm
# - catch2
# - ninja
# update: true
# env:
# - CPPFLAGS: "-I/usr/local/opt/llvm/include"
# - LDFLAGS: "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
# - CPATH: /usr/local/opt/llvm/include
# - LIBRARY_PATH: /usr/local/opt/llvm/lib
# - LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
# - CC: /usr/local/opt/llvm/bin/clang
# - CXX: /usr/local/opt/llvm/bin/clang++
# - SQLITE_ORM_OMITS_CODECVT: ON
- name: "[C++14] LLVM/Clang (latest)"
os: osx
osx_image: xcode10.2
addons:
homebrew:
packages:
- llvm
- ninja
update: true
env:
- CPPFLAGS: "-I/usr/local/opt/llvm/include"
- LDFLAGS: "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
- CPATH: /usr/local/opt/llvm/include
- LIBRARY_PATH: /usr/local/opt/llvm/lib
- LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
- CC: /usr/local/opt/llvm/bin/clang
- CXX: /usr/local/opt/llvm/bin/clang++
- SQLITE_ORM_OMITS_CODECVT: ON

# - name: "[C++14] GCC-6"
# os: osx
# osx_image: xcode10.2
# addons:
# homebrew:
# packages:
# - gcc@6
# - catch2
# - ninja
# update: true
# env:
# - CC: gcc-6
# - CXX: g++-6
- name: "[C++14] GCC-6"
os: osx
osx_image: xcode10.2
addons:
homebrew:
packages:
- gcc@6
- ninja
update: true
env:
- CC: gcc-6
- CXX: g++-6

- name: "[C++17] GCC-9"
addons:
Expand Down Expand Up @@ -111,52 +108,41 @@ matrix:
- CXX: g++-7
- SQLITE_ORM_CXX_STANDARD: "-DSQLITE_ORM_ENABLE_CXX_17=ON"

# - name: "[C++17] AppleClang-10.0.1"
# os: osx
# osx_image: xcode10.2
# language: cpp
# env:
# - SQLITE_ORM_OMITS_CODECVT: ON
# - SQLITE_ORM_CXX_STANDARD: "-DSQLITE_ORM_ENABLE_CXX_17=ON"
# addons:
# homebrew:
# packages:
# - catch2
# - ninja
# update: true
- name: "[C++17] AppleClang-10.0.1"
os: osx
osx_image: xcode10.2
language: cpp
env:
- SQLITE_ORM_OMITS_CODECVT: ON
- SQLITE_ORM_CXX_STANDARD: "-DSQLITE_ORM_ENABLE_CXX_17=ON"
addons:
homebrew:
packages:
- ninja
update: true

# - name: "[C++17] LLVM/Clang (latest)"
# os: osx
# osx_image: xcode10.2
# addons:
# homebrew:
# packages:
# - llvm
# - catch2
# - ninja
# update: true
# env:
# - CPPFLAGS: "-I/usr/local/opt/llvm/include"
# - LDFLAGS: "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
# - CPATH: /usr/local/opt/llvm/include
# - LIBRARY_PATH: /usr/local/opt/llvm/lib
# - LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
# - CC: /usr/local/opt/llvm/bin/clang
# - CXX: /usr/local/opt/llvm/bin/clang++
# - SQLITE_ORM_OMITS_CODECVT: ON
# - SQLITE_ORM_CXX_STANDARD: "-DSQLITE_ORM_ENABLE_CXX_17=ON"
- name: "[C++17] LLVM/Clang (latest)"
os: osx
osx_image: xcode10.2
addons:
homebrew:
packages:
- llvm
- ninja
update: true
env:
- CPPFLAGS: "-I/usr/local/opt/llvm/include"
- LDFLAGS: "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
- CPATH: /usr/local/opt/llvm/include
- LIBRARY_PATH: /usr/local/opt/llvm/lib
- LD_LIBRARY_PATH: /usr/local/opt/llvm/lib
- CC: /usr/local/opt/llvm/bin/clang
- CXX: /usr/local/opt/llvm/bin/clang++
- SQLITE_ORM_OMITS_CODECVT: ON
- SQLITE_ORM_CXX_STANDARD: "-DSQLITE_ORM_ENABLE_CXX_17=ON"

before_install:
- |
if [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" # Use coreutils from homebrew.
fi
# Add ppa repo for cmake and delete cmake 3.12.4 folder of travis
- wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
- sudo apt-add-repository -y 'deb https://apt.kitware.com/ubuntu/ bionic main'
- sudo apt-get update -qq -y
- sudo apt-get install -y cmake
- sudo rm -r /usr/local/cmake-3.12.4/
- if [[ ${TRAVIS_OS_NAME} == "osx" ]]; then export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"; fi

# scripts to run before build
before_script:
Expand All @@ -168,4 +154,4 @@ before_script:
# build examples, and run tests (ie make & make test)
script:
- cmake --build . --config Debug -- -k 10
- ctest --verbose --output-on-failure -C Debug -j $(nproc)
- ctest --verbose --output-on-failure -C Debug -j $(nproc)
19 changes: 9 additions & 10 deletions CMakeLists.txt
@@ -1,4 +1,12 @@
cmake_minimum_required (VERSION 3.16.0)
cmake_minimum_required (VERSION 3.14.0)

# PACKAGE_VERSION is used by cpack scripts currently
# Both sqlite_orm_VERSION and PACKAGE_VERSION should be the same for now

set(sqlite_orm_VERSION "1.3.0")
set(PACKAGE_VERSION ${sqlite_orm_VERSION})

project("sqlite_orm" VERSION ${PACKAGE_VERSION})

# Handling C++ standard version to use
option(SQLITE_ORM_ENABLE_CXX_17 "Enable C++ 17" OFF)
Expand All @@ -14,15 +22,6 @@ endif()
set(CMAKE_CXX_EXTENSIONS OFF)


# PACKAGE_VERSION is used by cpack scripts currently
# Both sqlite_orm_VERSION and PACKAGE_VERSION should be the same for now

set(sqlite_orm_VERSION "1.3.0")
set(PACKAGE_VERSION ${sqlite_orm_VERSION})

project("sqlite_orm" VERSION ${PACKAGE_VERSION})


set(CMAKE_VERBOSE_MAKEFILE ON)

message(STATUS "Configuring ${CMAKE_PROJECT_NAME} ${sqlite_orm_VERSION}")
Expand Down
29 changes: 0 additions & 29 deletions build.sh

This file was deleted.

9 changes: 0 additions & 9 deletions prepare-osx-with-clang.sh

This file was deleted.

9 changes: 0 additions & 9 deletions tests/CMakeLists.txt
Expand Up @@ -2,17 +2,8 @@ cmake_minimum_required (VERSION 3.2)

option(SQLITE_ORM_OMITS_CODECVT "Omits codec testing" OFF)

option(SqliteOrm_SysSqlite "Use system version of sqlite library" OFF)

if(SqliteOrm_SysSqlite)
message(FATAL_ERROR "WIP: please, disable the SqliteOrm_SysSqlite option.")
else()
add_subdirectory(third_party/sqlite)
endif()

add_executable(unit_tests tests.cpp tests2.cpp tests3.cpp tests4.cpp tests5.cpp private_getters_tests.cpp pragma_tests.cpp explicit_columns.cpp core_functions_tests.cpp index_tests.cpp constraints/composite_key.cpp static_tests.cpp operators/arithmetic_operators.cpp operators/like.cpp operators/glob.cpp operators/in.cpp operators/cast.cpp operators/is_null.cpp operators/not_operator.cpp operators/bitwise.cpp dynamic_order_by.cpp prepared_statement_tests/select.cpp prepared_statement_tests/get_all.cpp prepared_statement_tests/get_all_pointer.cpp prepared_statement_tests/get_all_optional.cpp prepared_statement_tests/update_all.cpp prepared_statement_tests/remove_all.cpp prepared_statement_tests/get.cpp prepared_statement_tests/get_pointer.cpp prepared_statement_tests/get_optional.cpp prepared_statement_tests/update.cpp prepared_statement_tests/remove.cpp prepared_statement_tests/insert.cpp prepared_statement_tests/replace.cpp prepared_statement_tests/insert_range.cpp prepared_statement_tests/replace_range.cpp prepared_statement_tests/insert_explicit.cpp pragma_tests.cpp simple_query.cpp static_tests/is_bindable.cpp static_tests/arithmetic_operators_result_type.cpp static_tests/tuple_conc.cpp static_tests/node_tuple.cpp static_tests/bindable_filter.cpp static_tests/count_tuple.cpp static_tests/member_traits_tests.cpp static_tests/select_return_type.cpp constraints/default.cpp constraints/unique.cpp constraints/foreign_key.cpp constraints/check.cpp table_tests.cpp statement_serializator_tests/primary_key.cpp statement_serializator_tests/column_names.cpp statement_serializator_tests/autoincrement.cpp statement_serializator_tests/arithmetic_operators.cpp statement_serializator_tests/core_functions.cpp statement_serializator_tests/comparison_operators.cpp statement_serializator_tests/unique.cpp statement_serializator_tests/foreign_key.cpp statement_serializator_tests/collate.cpp statement_serializator_tests/check.cpp statement_serializator_tests/index.cpp statement_serializator_tests/indexed_column.cpp unique_cases/get_all_with_two_tables.cpp unique_cases/prepare_get_all_with_case.cpp unique_cases/index_named_table_with_fk.cpp unique_cases/issue525.cpp unique_cases/delete_with_two_fields.cpp unique_cases/join_iterator_ctor_compilation_error.cpp get_all_custom_containers.cpp select_asterisk.cpp backup_tests.cpp transaction_tests.cpp)


if(SQLITE_ORM_OMITS_CODECVT)
message(STATUS "SQLITE_ORM_OMITS_CODECVT is enabled")
target_compile_definitions(unit_tests PRIVATE SQLITE_ORM_OMITS_CODECVT=1)
Expand Down
24 changes: 0 additions & 24 deletions tests/third_party/sqlite/CMakeLists.txt

This file was deleted.

16 changes: 0 additions & 16 deletions tests/third_party/sqlite/DownloadSqlite3.cmake

This file was deleted.

0 comments on commit a1f4ff6

Please sign in to comment.