diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml new file mode 100644 index 0000000..49df2a0 --- /dev/null +++ b/.github/workflows/actions.yml @@ -0,0 +1,59 @@ +name: build + +on: [push] + +jobs: + build: + name: ${{ matrix.config.name }} + runs-on: ${{ matrix.config.os }} + strategy: + fail-fast: false + matrix: + config: + - { + name: "Windows Latest MSVC", + os: windows-latest, + build_type: "Debug", cc: "cl", cxx: "cl", + } + # TODO: this is not working, since CMake is using generator for latest Visual Studio + #- { + # name: "Windows Latest MinGW", + # os: windows-latest, + # build_type: "Debug", cc: "gcc", cxx: "g++" + # } + - { + name: "Ubuntu Latest GCC", + os: ubuntu-latest, + build_type: "Debug", cc: "gcc", cxx: "g++" + } + - { + name: "Ubuntu 16.04 GCC", + os: ubuntu-16.04, + build_type: "Debug", cc: "gcc", cxx: "g++" + } + - { + name: "macOS Latest Clang", + os: macos-latest, + build_type: "Debug", cc: "clang", cxx: "clang++" + } + + steps: + - uses: actions/checkout@v1 + - name: submodule + run: git submodule update --init --recursive + - name: configure + shell: cmake -P {0} + run: | + set(ENV{CC} ${{matrix.config.cc}}) + set(ENV{CXX} ${{matrix.config.cxx}}) + - name: generate + run: | + mkdir build + cd build + cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON -DSQLITECPP_RUN_CPPCHECK=OFF -DSQLITECPP_RUN_CPPLINT=OFF .. + - name: build + run: cmake --build build --config ${{matrix.config.build_type}} + - name: test + run: | + cd build + ctest --verbose --output-on-failure diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fce3f9..31a0dd5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,6 +147,7 @@ source_group(doc FILES ${SQLITECPP_DOC}) # list of script files of the library set(SQLITECPP_SCRIPT + .github/workflows/actions.yml .travis.yml appveyor.yml build.bat diff --git a/README.md b/README.md index 8dc8876..a4b2857 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ SQLiteC++ [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/SRombauts/SQLiteCpp/blob/master/LICENSE.txt) [![Travis CI Linux Build Status](https://travis-ci.org/SRombauts/SQLiteCpp.svg)](https://travis-ci.org/SRombauts/SQLiteCpp "Travis CI Linux Build Status") [![AppVeyor Windows Build status](https://ci.appveyor.com/api/projects/status/github/SRombauts/SQLiteCpp?svg=true)](https://ci.appveyor.com/project/SbastienRombauts/SQLiteCpp "AppVeyor Windows Build status") +[![GitHub Actions Build status](https://github.com/SRombauts/SQLiteCpp/workflows/build/badge.svg)](https://github.com/SRombauts/SQLiteCpp/actions "GitHhub Actions Build status") [![Coveralls](https://img.shields.io/coveralls/SRombauts/SQLiteCpp.svg)](https://coveralls.io/github/SRombauts/SQLiteCpp "Coveralls test coverage") [![Coverity](https://img.shields.io/coverity/scan/14508.svg)](https://scan.coverity.com/projects/srombauts-sqlitecpp "Coverity Scan Build Status") [![Join the chat at https://gitter.im/SRombauts/SQLiteCpp](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/SRombauts/SQLiteCpp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)